Improve plan mode display and permission prompt

- Render ExitPlanMode as formatted markdown plan with proper headings,
  lists, and code blocks instead of raw key-value dump
- Show allowed prompts as clickable action buttons below the plan
- Use 📋 Plan header instead of 🔧 ExitPlanMode
- Permission prompt says "Approve the plan above?" with Approve button
- Hide "Always allow" for plan approvals
- Full height plan content without scroll constraint

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
andrepimenta
2026-04-14 21:18:52 +01:00
parent 6d112012b2
commit 58de99030c
4 changed files with 97 additions and 9 deletions

View File

@@ -1324,6 +1324,62 @@ const styles = `
opacity: 0.95;
}
.plan-content {
font-size: 13px;
line-height: 1.6;
}
.plan-content h1, .plan-content h2, .plan-content h3 {
margin: 12px 0 6px;
font-weight: 600;
}
.plan-content h1 { font-size: 16px; }
.plan-content h2 { font-size: 14px; }
.plan-content h3 { font-size: 13px; }
.plan-content ul, .plan-content ol {
padding-left: 20px;
margin: 4px 0;
}
.plan-content code {
font-family: var(--vscode-editor-font-family);
font-size: 12px;
background: rgba(127, 127, 127, 0.15);
padding: 1px 4px;
border-radius: 3px;
}
.plan-actions {
margin-top: 12px;
padding-top: 10px;
border-top: 1px solid var(--vscode-panel-border);
}
.plan-actions-label {
font-size: 11px;
color: var(--vscode-descriptionForeground);
margin-bottom: 8px;
}
.plan-action-btn {
display: inline-block;
background: var(--vscode-button-secondaryBackground, rgba(128, 128, 128, 0.2));
color: var(--vscode-button-secondaryForeground, var(--vscode-foreground));
border: 1px solid var(--vscode-panel-border);
padding: 5px 12px;
border-radius: 4px;
font-size: 12px;
cursor: pointer;
margin: 0 6px 6px 0;
}
.plan-action-btn:hover {
background: var(--vscode-list-hoverBackground);
border-color: var(--vscode-focusBorder);
}
/* Diff display styles for Edit tool */
.diff-container {
border: 1px solid var(--vscode-panel-border);