Skip to content

Commit 2e640fa

Browse files
andrepimentaclaude
andcommitted
Use --permission-mode plan flag for plan mode
Replace message prepending with native CLI flag for cleaner implementation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5136985 commit 2e640fa

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/extension.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,11 +463,8 @@ class ClaudeChatProvider {
463463
const configThink = vscode.workspace.getConfiguration('claudeCodeChat');
464464
const thinkingIntensity = configThink.get<string>('thinking.intensity', 'think');
465465

466-
// Prepend mode instructions if enabled
466+
// Prepend thinking mode instructions if enabled
467467
let actualMessage = message;
468-
if (planMode) {
469-
actualMessage = 'PLAN FIRST FOR THIS MESSAGE ONLY: Plan first before making any changes. Show me in detail what you will change and wait for my explicit approval in a separate message before proceeding. Do not implement anything until I confirm. This planning requirement applies ONLY to this current message. \n\n' + message;
470-
}
471468
if (thinkingMode) {
472469
let thinkingPrompt = '';
473470
const thinkingMesssage = ' THROUGH THIS STEP BY STEP: \n'
@@ -548,6 +545,11 @@ class ClaudeChatProvider {
548545
args.push('--mcp-config', this.convertToWSLPath(mcpConfigPath));
549546
}
550547

548+
// Add plan mode if enabled
549+
if (planMode) {
550+
args.push('--permission-mode', 'plan');
551+
}
552+
551553
// Add model selection if not using default
552554
if (this._selectedModel && this._selectedModel !== 'default') {
553555
args.push('--model', this._selectedModel);

0 commit comments

Comments
 (0)