-
Notifications
You must be signed in to change notification settings - Fork 359
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
Implement edit/insert prompts #5958
Conversation
|
@@ -177,7 +177,9 @@ function iconForContextItem(contextItem: SerializedContextItem): React.Component | |||
? SYMBOL_CONTEXT_MENTION_PROVIDER.id | |||
: contextItem.type === 'repository' || contextItem.type === 'tree' | |||
? REMOTE_REPOSITORY_PROVIDER_URI | |||
: contextItem.providerUri | |||
: contextItem.type === 'openctx' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated improvement.
@@ -415,6 +415,7 @@ export interface Prompt { | |||
description?: string | |||
draft: boolean | |||
autoSubmit?: boolean | |||
mode?: PromptMode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the version for the api change is already handled in the code for the oct relase
closes: https://linear.app/sourcegraph/issue/SRCH-1172/prompts-can-output-into-3-places
This PR integrates with the prompt mode (chat | edit | insert) from the SG API. Prompts with edit or insert mode are executed using the
executeEdit
, the same way the commands are executed. The prompt is used as the instruction text forexecuteEdit
. First the chat transcript is created, context is fetched and then theexecuteEdit
is called. TheFixupTask
from the execution is used to construct the response in chat. The response for now shows the diff only.In BG, the state for interactions mode is saved as intent. The dropdown and icon indicator for to allow users to manually change the mode and to see which mode is set, is only available behind the OneBox feature flag and will not be released yet.
Test plan
Changelog