feat: change to token calculation again
This commit is contained in:
@@ -87,6 +87,7 @@ function M.load()
|
||||
"No config file found (tried .chatgpt_config.yaml, chatgpt_config.yaml). Using defaults.",
|
||||
vim.log.levels.WARN
|
||||
)
|
||||
config.max_token = 2048
|
||||
return config
|
||||
end
|
||||
|
||||
@@ -120,7 +121,7 @@ function M.load()
|
||||
if type(result.initial_files) == "table" then
|
||||
config.initial_files = result.initial_files
|
||||
end
|
||||
if type(result.include_file_contents) == "boolean" then -- LOAD NEW FLAG
|
||||
if type(result.include_file_contents) == "boolean" then
|
||||
config.include_file_contents = result.include_file_contents
|
||||
end
|
||||
if type(result.preview_changes) == "boolean" then
|
||||
@@ -153,10 +154,17 @@ function M.load()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if type(result.max_token) == "number" then
|
||||
config.max_token = result.max_token
|
||||
else
|
||||
config.max_token = 2048
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
config.initial_prompt = "You are a coding assistant who receives a project's context and user instructions..."
|
||||
config.max_token = 2048
|
||||
end
|
||||
|
||||
-- Merge default prompt blocks
|
||||
|
||||
Reference in New Issue
Block a user