Skip to content

Language settings for copilot answers - #173

Closed
neutrinoA4 wants to merge 3 commits into
CopilotC-Nvim:canaryfrom
neutrinoA4:dev_language
Closed

Language settings for copilot answers#173
neutrinoA4 wants to merge 3 commits into
CopilotC-Nvim:canaryfrom
neutrinoA4:dev_language

Conversation

@neutrinoA4

Copy link
Copy Markdown
Contributor

Hi! I re-implemented the functionality implemented in the following link on this branch.
#51

If it is not unnecessary, please consider merging it.


---Prompt for the user to provide a language
--- @param language string
function M.PROMPT_ANSWER_LANGUAGE_TEMPLATE(language)

@deathbeam deathbeam Mar 16, 2024

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be in prompts file anymore. Now its used for populating prompts whn completing automatically so if this isnt part of it it should not be here

Comment thread lua/CopilotChat/init.lua
end

for _, prompt in pairs(config.prompts) do
prompt.prompt = prompt.prompt .. ' ' .. prompts.PROMPT_ANSWER_LANGUAGE_TEMPLATE(config.language)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not edit config, see how updating prompt is handled elsewhere.

Comment thread README.md
},
opts = {
debug = true, -- Enable debugging
-- language = "English" -- Copilot answer language settings when using default prompts. Default language is English.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this, add the default config part to default config section (e.g just mirror the change in config.lua)

@deathbeam

Copy link
Copy Markdown
Collaborator

Also should this be part of user prompt? Wouldnt adjustng system prompt be better?

@deathbeam

Copy link
Copy Markdown
Collaborator

Also maybe something like configurable prompt_suffix would be even better and more flexible? E.g you could just put there anything and it would be added to prompt and then just put to README in configuration section how to for example set the language

@neutrinoA4 neutrinoA4 closed this Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants