feat: change the files encapsulation
This commit is contained in:
@@ -39,18 +39,11 @@ function M.run_chatgpt_command()
|
||||
local current_file_content, current_file_path = context.get_current_file()
|
||||
local readme_content = context.get_readme_content()
|
||||
|
||||
-- Make the prompt more readable for the O1 model:
|
||||
-- 1. Include initial prompt and user input at the start.
|
||||
-- 2. Provide a clear project structure section.
|
||||
-- 3. Clearly label the files section.
|
||||
-- 4. The file_sections already include <<<CGPT Current File blocks for each file,
|
||||
-- we just need to ensure there's a clear intro.
|
||||
|
||||
local sections = {
|
||||
conf.initial_prompt .. "\n" .. user_input,
|
||||
"\n\nProject Structure:\n",
|
||||
project_structure,
|
||||
"\n\nBelow are the files from the project, each enclosed in <<<CGPT Current File ... >>> blocks for clarity.\n"
|
||||
"\n\nBelow are the files from the project, each preceded by its filename in backticks and enclosed in triple backticks.\n"
|
||||
}
|
||||
|
||||
table.insert(sections, file_sections)
|
||||
|
||||
Reference in New Issue
Block a user