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>
This commit is contained in:
andrepimenta
2025-12-06 12:32:25 +00:00
parent 5136985474
commit 2e640fa20a

View File

@@ -463,11 +463,8 @@ class ClaudeChatProvider {
const configThink = vscode.workspace.getConfiguration('claudeCodeChat');
const thinkingIntensity = configThink.get<string>('thinking.intensity', 'think');
// Prepend mode instructions if enabled
// Prepend thinking mode instructions if enabled
let actualMessage = message;
if (planMode) {
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;
}
if (thinkingMode) {
let thinkingPrompt = '';
const thinkingMesssage = ' THROUGH THIS STEP BY STEP: \n'
@@ -548,6 +545,11 @@ class ClaudeChatProvider {
args.push('--mcp-config', this.convertToWSLPath(mcpConfigPath));
}
// Add plan mode if enabled
if (planMode) {
args.push('--permission-mode', 'plan');
}
// Add model selection if not using default
if (this._selectedModel && this._selectedModel !== 'default') {
args.push('--model', this._selectedModel);