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
feat: implement the abort signal in /edit
diff gen
#1027
base: preview
Are you sure you want to change the base?
feat: implement the abort signal in /edit
diff gen
#1027
Conversation
✅ Deploy Preview for continuedev canceled.
|
gui/src/util/ide.ts
Outdated
@@ -114,6 +114,10 @@ export async function* ideStreamRequest<T extends keyof WebviewProtocol>( | |||
let returnVal = undefined; | |||
|
|||
const handler = (event: { data: Message }) => { | |||
// console.log("Received message", event.data); |
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.
remove
@Iamshankhadeep I think there might be a simpler solution as I'm looking at this. There's already a built-in cancellation method for the webview protocol that is used here (https://github.com/continuedev/continue/blob/preview/extensions/vscode/src/webviewProtocol.ts#L347) which we could apply here (https://github.com/continuedev/continue/blob/preview/extensions/vscode/src/webviewProtocol.ts#L411) in order to allow cancellation from the webview. And then to cancel with a keyboard shortcut, rather than adding a new one, I want to use the shortcut we already have (cmd+shift+backspace) which is implemented here. If you just make the above change first, I actually think that this line of code might already solve the problem with the command (I know we had this working before, and I think that is how) |
@Iamshankhadeep @sestinj However, if we keep the check for setInactive message ideStreamRequest's handler, then the abort is sent and the streaming cancels on command! This works. Note that this still doesn't work for ctrl+backspace (only works for ctrl+shift+backspace). |
@justinmilner1 yes this looks perfect! @Iamshankhadeep would you want to adjust to use this solution, or would it be most convenient if I went ahead and just changed this locally and pushed? |
0af2e27
to
fbf55b7
Compare
@sestinj I have updated the PR, with the new code that @justinmilner1 suggested. |
I do think the 'shift+ctrl+backspace' shortcut should be added to package.json keybindings pathway, to match the documentation. |
Hey @Iamshankhadeep - Do you want to wrap this one up? |
Okay I'm gonna get this closed out |
fixes #1012