Skip to content

Commit 1624dbb

Browse files
authored
fix hidden redo button (microsoft#258898)
fix hiddne redo button
1 parent ec84917 commit 1624dbb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/vs/workbench/contrib/chat/browser/chatListRenderer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,11 +558,12 @@ export class ChatListItemRenderer extends Disposable implements ITreeRenderer<Ch
558558
const isLockedToCodingAgent = ChatContextKeys.lockedToCodingAgent.getValue(templateData.contextKeyService);
559559
templateData.checkpointContainer.classList.toggle('hidden', isResponseVM(element) || !this.configService.getValue<boolean>(ChatConfiguration.CheckpointsEnabled) || isLockedToCodingAgent);
560560

561-
const checkpointEnabled = this.configService.getValue<boolean>(ChatConfiguration.CheckpointsEnabled) && this.rendererOptions.restorable;
561+
const checkpointEnabled = this.configService.getValue<boolean>(ChatConfiguration.CheckpointsEnabled)
562+
&& (this.rendererOptions.restorable ?? true);
562563

563564
// Only show restore container when we have a checkpoint and not editing
564565
const shouldShowRestore = this.viewModel?.model.checkpoint && !this.viewModel?.editing && (index === this.delegate.getListLength() - 1);
565-
templateData.checkpointRestoreContainer.classList.toggle('hidden', !shouldShowRestore || checkpointEnabled);
566+
templateData.checkpointRestoreContainer.classList.toggle('hidden', !(shouldShowRestore && checkpointEnabled));
566567

567568
const editing = element.id === this.viewModel?.editing?.id;
568569
const isInput = this.configService.getValue<string>('chat.editRequests') === 'input';

0 commit comments

Comments
 (0)