-
Notifications
You must be signed in to change notification settings - Fork 304
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
Cody Web: Log inline edit in history #5935
base: main
Are you sure you want to change the base?
Conversation
|
let responseMessage = `Inline ${this.config.task.intent} change was triggered over:\n` | ||
responseMessage += '``` \n' + `${this.config.task.original}\n` + '```\n' | ||
responseMessage += 'Inline change response: \n' | ||
responseMessage += '```\n' + `${responseContent}\n` + '```' |
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.
Can you get this reviewed from @taiyab?
Original content might be missing for insert
intent and thus only extra \n
will be added. We can make it conditional.
f2db49e
to
56ae168
Compare
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.
I think the edit history should be done in the FixupController for each fixup step. Right now we are hard coded the interaction in provider that wouldn't handle the error in chat UI if the task failed.
I'm happy to chat more and pair on Monday if you have time!
@@ -97,6 +103,9 @@ export class EditProvider { | |||
onTurnComplete: async () => { | |||
typewriter.close() | |||
typewriter.stop() | |||
if (options?.saveInHistory) { | |||
void this.saveEditAsChatEntry(text) |
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.
We can add the feature flag check inside saveEditChatHistory instead? Wdyt?
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.
This change isn't part of any feature flagged feature. We just want to log in history any custom command or OOTB prompts/commands actions
responseMessage += 'Inline change response: \n' | ||
responseMessage += '```\n' + `${responseContent}\n` + '```' | ||
|
||
const chatEntry: SerializedChatTranscript = { |
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.
Hmmm I think it might be safer if we use chatBuilder for creating each message and response in different step of inline edit inside FixupController.
Cc @dominiccooney @pkukielka for advices + verify if this would affect inline edits in JB |
Closes SRCH-1043
It simply adds log-in history for inline edit commands/prompts
Test plan