mirror of
https://github.com/Microsoft/vscode
synced 2024-09-28 15:32:07 +00:00
edit chat view: start editing session when created (#229975)
This commit is contained in:
parent
ec1125c2d1
commit
6be9a301e8
|
@ -539,7 +539,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
|
|||
const toolbarsContainer = elements.inputToolbars;
|
||||
this.chatEditingSessionWidgetContainer = elements.chatEditingSessionWidgetContainer;
|
||||
this.initAttachedContext(this.attachedContextContainer);
|
||||
this.renderChatEditingSessionState(null, this.location === ChatAgentLocation.EditingSession);
|
||||
this.renderChatEditingSessionState(null);
|
||||
|
||||
const inputScopedContextKeyService = this._register(this.contextKeyService.createScoped(inputContainer));
|
||||
CONTEXT_IN_CHAT_INPUT.bindTo(inputScopedContextKeyService).set(true);
|
||||
|
|
|
@ -808,6 +808,14 @@ export class ChatWidget extends Disposable implements IChatWidget {
|
|||
}
|
||||
}));
|
||||
|
||||
if (this._location.location === ChatAgentLocation.EditingSession) {
|
||||
const currentSession = this.chatEditingService.currentEditingSession;
|
||||
if (currentSession && (currentSession.chatSessionId !== model.sessionId)) {
|
||||
currentSession?.stop();
|
||||
}
|
||||
this.chatEditingService.startOrContinueEditingSession(model.sessionId);
|
||||
}
|
||||
|
||||
if (this.tree) {
|
||||
this.onDidChangeItems();
|
||||
revealLastElement(this.tree);
|
||||
|
|
Loading…
Reference in a new issue