Skip to content

Commit 8a2d927

Browse files
authored
remove code smells for checkpoint rendering in coding agent session (microsoft#258914)
remove code smells
1 parent ff2dc0d commit 8a2d927

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -555,12 +555,11 @@ export class ChatListItemRenderer extends Disposable implements ITreeRenderer<Ch
555555
}
556556

557557
templateData.checkpointToolbar.context = element;
558-
const isLockedToCodingAgent = ChatContextKeys.lockedToCodingAgent.getValue(templateData.contextKeyService);
559-
templateData.checkpointContainer.classList.toggle('hidden', isResponseVM(element) || !this.configService.getValue<boolean>(ChatConfiguration.CheckpointsEnabled) || isLockedToCodingAgent);
560-
561558
const checkpointEnabled = this.configService.getValue<boolean>(ChatConfiguration.CheckpointsEnabled)
562559
&& (this.rendererOptions.restorable ?? true);
563560

561+
templateData.checkpointContainer.classList.toggle('hidden', isResponseVM(element) || !(checkpointEnabled));
562+
564563
// Only show restore container when we have a checkpoint and not editing
565564
const shouldShowRestore = this.viewModel?.model.checkpoint && !this.viewModel?.editing && (index === this.delegate.getListLength() - 1);
566565
templateData.checkpointRestoreContainer.classList.toggle('hidden', !(shouldShowRestore && checkpointEnabled));

0 commit comments

Comments
 (0)