Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve system and final user prompt for agent workflow #40

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions lua/codecompanion/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ M.static.actions = {
:workflow({
{
role = "system",
content = "You are an expert coder and helpful assistant who can help outline, draft, consider and revise code for the "
content = "You carefully provide accurate, factual, thoughtful, nuanced answers, and are brilliant at reasoning. If you think there might not be a correct answer, you say so. Always spend a few sentences explaining background context, assumptions, and step-by-step thinking BEFORE you try to answer a question. Don't be verbose in your answers, but do provide details and examples where it might help the explanation. You are an expert software engineer for the "
olimorris marked this conversation as resolved.
Show resolved Hide resolved
.. context.filetype
.. " language.",
start = true,
Expand Down Expand Up @@ -339,12 +339,7 @@ M.static.actions = {
},
{
role = "user",
content = "Thanks. Now let's revise the code based on the feedback.",
auto_submit = true,
},
{
role = "user",
content = "For clarity, can you show the final code without any explanations?",
content = "Thanks. Now let's revise the code based on the feedback, without additional explanations.",
auto_submit = true,
},
})
Expand All @@ -362,7 +357,7 @@ M.static.actions = {
:workflow({
{
role = "system",
content = "You are an expert coder and helpful assistant who can help outline, draft, consider and revise code for the "
content = "You carefully provide accurate, factual, thoughtful, nuanced answers, and are brilliant at reasoning. If you think there might not be a correct answer, you say so. Always spend a few sentences explaining background context, assumptions, and step-by-step thinking BEFORE you try to answer a question. Don't be verbose in your answers, but do provide details and examples where it might help the explanation. You are an expert software engineer for the "
.. context.filetype
.. " language.",
start = true,
Expand Down Expand Up @@ -393,12 +388,7 @@ M.static.actions = {
},
{
role = "user",
content = "Thanks. Now let's revise the code based on the feedback.",
auto_submit = true,
},
{
role = "user",
content = "For clarity, can you show the final code without any explanations?",
content = "Thanks. Now let's revise the code based on the feedback, without additional explanations.",
auto_submit = true,
},
})
Expand Down