CON-223 Correct diff streaming abort (#1263)
Co-authored-by: Justin Milner <jmilner@jmilner-lt2.deka.local>
This commit is contained in:
parent
2ba12638e4
commit
1de0d8a291
2 changed files with 7 additions and 0 deletions
|
|
@ -471,6 +471,10 @@ export class VsCodeWebviewProtocol {
|
|||
if (content) {
|
||||
yield { content };
|
||||
}
|
||||
if (protocol.abortedMessageIds.has(msg.messageId)) {
|
||||
protocol.abortedMessageIds.delete(msg.messageId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
yield { done: true, content: "" };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,6 +115,9 @@ export async function* ideStreamRequest<T extends keyof WebviewProtocol>(
|
|||
let returnVal = undefined;
|
||||
|
||||
const handler = (event: { data: Message }) => {
|
||||
if (event.data.messageType === "setInactive") {
|
||||
postToIde("abort", undefined, messageId);
|
||||
}
|
||||
if (event.data.messageId === messageId) {
|
||||
const responseData = safeParseResponse(event.data.data);
|
||||
if (responseData.done) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue