diff --git a/src/components/ChatInterface.jsx b/src/components/ChatInterface.jsx
index b0caae7..f730153 100755
--- a/src/components/ChatInterface.jsx
+++ b/src/components/ChatInterface.jsx
@@ -451,6 +451,32 @@ const MessageComponent = memo(({ message, index, prevMessage, createDiff, onFile
}
}
+ // Special handling for exit_plan_mode tool
+ if (message.toolName === 'exit_plan_mode') {
+ try {
+ const input = JSON.parse(message.toolInput);
+ if (input.plan) {
+ // Replace escaped newlines with actual newlines
+ const planContent = input.plan.replace(/\\n/g, '\n');
+ return (
+
+
+
+ 📋 View implementation plan
+
+
+ {planContent}
+
+
+ );
+ }
+ } catch (e) {
+ // Fall back to regular display
+ }
+ }
+
// Regular tool input display for other tools
return (
@@ -537,6 +563,30 @@ const MessageComponent = memo(({ message, index, prevMessage, createDiff, onFile
}
}
+ // Special handling for exit_plan_mode tool results
+ if (message.toolName === 'exit_plan_mode') {
+ try {
+ // The content should be JSON with a "plan" field
+ const parsed = JSON.parse(content);
+ if (parsed.plan) {
+ // Replace escaped newlines with actual newlines
+ const planContent = parsed.plan.replace(/\\n/g, '\n');
+ return (
+
+
+ Implementation Plan
+
+
+ {planContent}
+
+
+ );
+ }
+ } catch (e) {
+ // Fall through to regular handling
+ }
+ }
+
// Special handling for interactive prompts
if (content.includes('Do you want to proceed?') && message.toolName === 'Bash') {
const lines = content.split('\n');