feat: change the prompt to work better

This commit is contained in:
2024-12-16 19:54:19 +01:00
parent 71a3da5923
commit 37d9978314
2 changed files with 25 additions and 7 deletions

View File

@@ -103,13 +103,15 @@ function M.run_chatgpt_command()
end
local initial_sections = {
conf.initial_prompt .. "\n" .. user_input,
"\n\nProject name: " .. (conf.project_name or "") .. "\n",
"\n\nProject Structure:\n",
"### Basic Prompt Instructions:\n",
conf.initial_prompt .. "\n\n\n",
"### User Instructions:\n",
user_input .. "\n\n\n",
"### Context/Data:\n",
"Project name: " .. (conf.project_name or "") .. "\n",
"Project Structure:\n",
project_structure,
table.concat(included_sections, "\n"),
"\n\nPlease respond with a YAML listing which files you need from the project. For example:\n",
"project_name: " .. (conf.project_name or "") .. "\nfiles:\n - path: \"relative/path/to/file\"\n\n"
table.concat(included_sections, "\n")
}
local prompt = table.concat(initial_sections, "\n")