diff --git a/src/vs/workbench/contrib/chat/browser/chatInputPart.ts b/src/vs/workbench/contrib/chat/browser/chatInputPart.ts index 34a307ca8bc9e..fb69c795a7749 100644 --- a/src/vs/workbench/contrib/chat/browser/chatInputPart.ts +++ b/src/vs/workbench/contrib/chat/browser/chatInputPart.ts @@ -1500,7 +1500,10 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge } saveState(): void { - this.saveCurrentValue(this.getInputState()); + if (this.history.isAtEnd()) { + this.saveCurrentValue(this.getInputState()); + } + const inputHistory = [...this.history]; this.historyService.saveHistory(this.location, inputHistory); }