Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/vs/workbench/contrib/chat/browser/chatInputPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge

private readonly _chatEditsActionsDisposables = this._register(new DisposableStore());
private readonly _chatEditsDisposables = this._register(new DisposableStore());
private _chatEditingSession: IChatEditingSession | undefined;
private _chatEditsProgress: ProgressBar | undefined;
private _chatEditsListPool: CollapsibleListPool;
private _chatEditList: IDisposableReference<WorkbenchList<IChatCollapsibleListItem>> | undefined;
Expand Down Expand Up @@ -249,15 +248,9 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge

this._attachmentModel = this._register(new ChatAttachmentModel());
this.getInputState = (): IChatInputState => {
// Get input state from widget contribs, merge with attachments, working set, and implicit context
const chatWorkingSet: { uri: URI; state: WorkingSetEntryState }[] = [];
for (const [uri, state] of this._chatEditingSession?.workingSet.entries() ?? []) {
chatWorkingSet.push({ uri, state });
}
return {
...getContribsInputState(),
chatContextAttachments: this._attachmentModel.attachments,
chatWorkingSet: chatWorkingSet
};
};
this.inputEditorMaxHeight = this.options.renderStyle === 'compact' ? INPUT_EDITOR_MAX_HEIGHT / 3 : INPUT_EDITOR_MAX_HEIGHT;
Expand Down Expand Up @@ -397,10 +390,6 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
this.history.previous() : this.history.next();

const historyAttachments = historyEntry.state?.chatContextAttachments ?? [];
this._chatEditingSession?.workingSet.clear();
for (const entry of historyEntry.state?.chatWorkingSet ?? []) {
this._chatEditingSession?.workingSet.set(entry.uri, entry.state);
}
this._attachmentModel.clearAndSetContext(...historyAttachments);

aria.status(historyEntry.text);
Expand Down Expand Up @@ -909,11 +898,9 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
this._chatEditsDisposables.clear();
this._chatEditList = undefined;
this._chatEditsProgress?.dispose();
this._chatEditingSession = undefined;
return;
}

this._chatEditingSession = chatEditingSession;
const currentChatEditingState = chatEditingSession.state.get();
if (this._chatEditList && !chatWidget?.viewModel?.requestInProgress && (currentChatEditingState === ChatEditingSessionState.Idle || currentChatEditingState === ChatEditingSessionState.Initial)) {
this._chatEditsProgress?.stop();
Expand Down