Skip to content

Commit d510e84

Browse files
authored
fix rerun commands (microsoft#210162)
1 parent 99c7626 commit d510e84

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ export function registerChatTitleActions() {
297297
}
298298
const request = chatService.getSession(item.sessionId)?.getRequests().find(candidate => candidate.id === item.requestId);
299299
if (request) {
300-
await chatService.resendRequest(request, { noCommandDetection: true, attempt: request.attempt, location: widget.location });
300+
await chatService.resendRequest(request, { noCommandDetection: false, attempt: request.attempt + 1, location: widget.location, implicitVariablesEnabled: true });
301301
}
302302
}
303303
});
@@ -333,7 +333,7 @@ export function registerChatTitleActions() {
333333
}
334334
const request = chatService.getSession(item.sessionId)?.getRequests().find(candidate => candidate.id === item.requestId);
335335
if (request) {
336-
await chatService.resendRequest(request, { noCommandDetection: true, attempt: request.attempt, location: widget.location });
336+
await chatService.resendRequest(request, { noCommandDetection: true, attempt: request.attempt, location: widget.location, implicitVariablesEnabled: true });
337337
}
338338
}
339339
});

src/vs/workbench/contrib/chat/common/chatServiceImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ export class ChatService extends Disposable implements IChatService {
406406
return;
407407
}
408408

409-
const location = options?.location ?? ChatAgentLocation.Panel;
409+
const location = options?.location ?? model.initialLocation;
410410
const attempt = options?.attempt ?? 0;
411411
const enableCommandDetection = !options?.noCommandDetection;
412412
const implicitVariablesEnabled = options?.implicitVariablesEnabled ?? false;

0 commit comments

Comments
 (0)