Resumable intermediates #2

Merged
tangent merged 17 commits from resumable-intermediates into main 2026-08-23 23:59:39 -06:00
Showing only changes of commit 1595ac2b2c - Show all commits
+4 -2
View File
@@ -3,7 +3,9 @@
package.path = (arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)")) .. "lib" .. package.config:sub(1, 1) .. "?.lua;" .. package.path package.path = (arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)")) .. "lib" .. package.config:sub(1, 1) .. "?.lua;" .. package.path
local utility = require "utility" local utility = require "utility"
local maximum_bytes = 40000 local config = utility.get_config("read-only")
if not config.llm_covers then config.llm_covers = {} end
if not config.llm_covers.maximum_bytes then config.llm_covers.maximum_bytes = 40000 end
local read_all = function(file_name) local read_all = function(file_name)
return utility.open(file_name, "r", function(file) return utility.open(file_name, "r", function(file)
@@ -25,7 +27,7 @@ for _, path in ipairs{ ".", "extracted_texts", } do
local path, name, extension = utility.split_path_components(file_name) local path, name, extension = utility.split_path_components(file_name)
local text = read_all(file_name) local text = read_all(file_name)
print(math.floor(#text/maximum_bytes + 1), math.floor(#text/1000) .. "k", name) print(math.floor(#text/config.llm_covers.maximum_bytes + 1), math.floor(#text/1000) .. "k", name)
end) end)
print("Press enter.") print("Press enter.")
io.read("*line") io.read("*line")