From a57ed0c3b23eb2cf02118abc2f83857fe1f7c789 Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 16 Mar 2026 07:59:31 +0530 Subject: [PATCH 01/14] chore: no ai panel title in browser --- src/nls/root/strings.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nls/root/strings.js b/src/nls/root/strings.js index 18d6cd7dc..0a2cdf16f 100644 --- a/src/nls/root/strings.js +++ b/src/nls/root/strings.js @@ -1829,6 +1829,7 @@ define({ "AI_UPSELL_DIALOG_MESSAGE": "You’ve discovered {0}. To proceed, you’ll need an AI subscription or credits.", // AI CHAT PANEL + "AI_CHAT_TITLE_NO_AI": "Phoenix Code AI", "AI_CHAT_TITLE": "Claude Code", "AI_CHAT_NEW_SESSION_TITLE": "Start a new conversation", "AI_CHAT_NEW_BTN": "New", From 47de89dc94ce1e9217bac9e752c7638d45d18815 Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 16 Mar 2026 08:09:10 +0530 Subject: [PATCH 02/14] fix(ai): match plan card code styling with assistant messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use same pre/code styles as main chat messages — position:relative for copy button, matching background/border, monospace font, and hover reveal for copy button. Add ul/ol/li spacing. --- src/styles/Extn-AIChatPanel.less | 50 +++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/src/styles/Extn-AIChatPanel.less b/src/styles/Extn-AIChatPanel.less index 721f9de7c..2a1e0e6df 100644 --- a/src/styles/Extn-AIChatPanel.less +++ b/src/styles/Extn-AIChatPanel.less @@ -1115,22 +1115,64 @@ } code { - background: rgba(255, 255, 255, 0.06); + background-color: rgba(255, 255, 255, 0.08); + color: @project-panel-text-1; padding: 1px 4px; border-radius: 3px; - font-size: 0.9em; + font-size: @sidebar-small-font-size; + font-family: 'SourceCodePro-Medium', 'SourceCodePro', monospace; } pre { - background: rgba(0, 0, 0, 0.2); - padding: 8px; + background-color: rgba(0, 0, 0, 0.3); + border: 1px solid rgba(255, 255, 255, 0.06); + padding: 8px 10px; border-radius: 4px; overflow-x: auto; + position: relative; code { background: none; padding: 0; + border-radius: 0; + font-size: @sidebar-small-font-size; + line-height: 1.5; + color: @project-panel-text-1; } + + .ai-copy-btn { + position: absolute; + top: 4px; + right: 4px; + background: rgba(255, 255, 255, 0.08); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 4px; + color: rgba(255, 255, 255, 0.5); + cursor: pointer; + padding: 2px 6px; + font-size: 12px; + line-height: 1; + opacity: 0; + transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease; + + &:hover { + background: rgba(255, 255, 255, 0.15); + color: rgba(255, 255, 255, 0.85); + } + } + + &:hover .ai-copy-btn { + opacity: 1; + } + } + + ul, ol { + margin: 4px 0 8px 0; + padding-left: 18px; + } + + li { + margin-bottom: 2px; } } From 15f8383d543370c094c5f8ff22674662e8f296eb Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 16 Mar 2026 08:45:02 +0530 Subject: [PATCH 03/14] fix(ai): add heading, strong, blockquote styles to plan card Use @project-panel-text-1 for h1-h4 and strong text so they render correctly in both light and dark themes. Add blockquote and link styles matching the main chat message content area. --- src/styles/Extn-AIChatPanel.less | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/styles/Extn-AIChatPanel.less b/src/styles/Extn-AIChatPanel.less index 2a1e0e6df..dde434082 100644 --- a/src/styles/Extn-AIChatPanel.less +++ b/src/styles/Extn-AIChatPanel.less @@ -1114,6 +1114,31 @@ } } + h1, h2, h3, h4 { + font-weight: 600; + color: @project-panel-text-1; + } + + h1 { font-size: @label-font-size; margin: 12px 0 4px 0; } + h2 { font-size: @menu-item-font-size; margin: 10px 0 4px 0; } + h3 { font-size: @sidebar-content-font-size; margin: 8px 0 3px 0; } + h4 { font-size: @sidebar-content-font-size; margin: 6px 0 2px 0; opacity: 0.85; } + + strong { + color: @project-panel-text-1; + } + + a { + color: #6b9eff; + } + + blockquote { + border-left: 3px solid rgba(107, 158, 255, 0.3); + margin: 6px 0; + padding: 2px 10px; + color: @project-panel-text-2; + } + code { background-color: rgba(255, 255, 255, 0.08); color: @project-panel-text-1; From ed5b691c038663ab2464f734e5bf064574a438bd Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 16 Mar 2026 10:43:57 +0530 Subject: [PATCH 04/14] chore: refine ai panle styles --- src/styles/Extn-AIChatPanel.less | 44 ++++++++++++++++++++---------- src/styles/brackets_variables.less | 7 ++++- 2 files changed, 36 insertions(+), 15 deletions(-) diff --git a/src/styles/Extn-AIChatPanel.less b/src/styles/Extn-AIChatPanel.less index dde434082..92f31500e 100644 --- a/src/styles/Extn-AIChatPanel.less +++ b/src/styles/Extn-AIChatPanel.less @@ -410,7 +410,7 @@ color: @project-panel-text-1; padding: 1px 4px; border-radius: 3px; - font-size: @sidebar-small-font-size; + font-size: @sidebar-md-code-font-size; font-family: 'SourceCodePro-Medium', 'SourceCodePro', monospace; } @@ -427,7 +427,7 @@ background: none; padding: 0; border-radius: 0; - font-size: @sidebar-small-font-size; + font-size: 1em; line-height: 1.5; color: @project-panel-text-1; } @@ -475,14 +475,22 @@ } h1, h2, h3, h4 { - font-weight: 600; color: @project-panel-text-1; + line-height: 1.25em; } - h1 { font-size: @label-font-size; margin: 12px 0 4px 0; } - h2 { font-size: @menu-item-font-size; margin: 10px 0 4px 0; } - h3 { font-size: @sidebar-content-font-size; margin: 8px 0 3px 0; } - h4 { font-size: @sidebar-content-font-size; margin: 6px 0 2px 0; opacity: 0.85; } + h1 { + font-size: @sidebar-md-h1-font-size; + margin: 12px 0 4px 0; + padding-bottom: .3em; + } + h2 { + font-size: @sidebar-md-h2-font-size; + margin: 10px 0 4px 0; + padding-bottom: .3em; + } + h3 { font-size: @sidebar-md-h3-font-size; margin: 8px 0 4px 0; } + h4 { font-size: @sidebar-md-h4-font-size; margin: 6px 0 4px 0; opacity: 0.85; } table { display: block; @@ -1115,14 +1123,22 @@ } h1, h2, h3, h4 { - font-weight: 600; color: @project-panel-text-1; + line-height: 1.25em; } - h1 { font-size: @label-font-size; margin: 12px 0 4px 0; } - h2 { font-size: @menu-item-font-size; margin: 10px 0 4px 0; } - h3 { font-size: @sidebar-content-font-size; margin: 8px 0 3px 0; } - h4 { font-size: @sidebar-content-font-size; margin: 6px 0 2px 0; opacity: 0.85; } + h1 { + font-size: @sidebar-md-h1-font-size; + margin: 12px 0 4px 0; + padding-bottom: .3em; + } + h2 { + font-size: @sidebar-md-h2-font-size; + margin: 10px 0 4px 0; + padding-bottom: .3em; + } + h3 { font-size: @sidebar-md-h3-font-size; margin: 8px 0 4px 0; } + h4 { font-size: @sidebar-md-h4-font-size; margin: 6px 0 4px 0; opacity: 0.85; } strong { color: @project-panel-text-1; @@ -1144,7 +1160,7 @@ color: @project-panel-text-1; padding: 1px 4px; border-radius: 3px; - font-size: @sidebar-small-font-size; + font-size: @sidebar-md-code-font-size; font-family: 'SourceCodePro-Medium', 'SourceCodePro', monospace; } @@ -1160,7 +1176,7 @@ background: none; padding: 0; border-radius: 0; - font-size: @sidebar-small-font-size; + font-size: 1em; line-height: 1.5; color: @project-panel-text-1; } diff --git a/src/styles/brackets_variables.less b/src/styles/brackets_variables.less index b690782ed..32061a5c8 100644 --- a/src/styles/brackets_variables.less +++ b/src/styles/brackets_variables.less @@ -37,6 +37,11 @@ @sidebar-small-font-size: 12px; // secondary content, inline code, status text @sidebar-xs-font-size: 11px; // meta info, timestamps, chips +@sidebar-md-h1-font-size: 2em; +@sidebar-md-h2-font-size: 1.5em; +@sidebar-md-h3-font-size: 1.25em; +@sidebar-md-h4-font-size: 1.1em; +@sidebar-md-code-font-size: .9em; /* CSS triangles */ @inline-triangle-size: 9px; @@ -72,4 +77,4 @@ @z-index-brackets-context-menu-base: 1000; @z-index-brackets-stylesheet-menu: 1000; @z-index-brackets-inline-editor-error: 1000; -@z-index-brackets-topmost-overlay: 10000; \ No newline at end of file +@z-index-brackets-topmost-overlay: 10000; From 155e15c4c9502c02e7eefe5afdcf47cdecd893d7 Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 16 Mar 2026 11:01:58 +0530 Subject: [PATCH 05/14] feat(ai): code block title bar and footer CSS Add styles for .ai-code-header (language label, copy, collapse), .ai-code-footer (expand/collapse from bottom), and collapsed state that clips code to 5 lines. Remove old .ai-copy-btn overlay styles. --- src/styles/Extn-AIChatPanel.less | 137 ++++++++++++++++++++----------- 1 file changed, 87 insertions(+), 50 deletions(-) diff --git a/src/styles/Extn-AIChatPanel.less b/src/styles/Extn-AIChatPanel.less index 92f31500e..980f20085 100644 --- a/src/styles/Extn-AIChatPanel.less +++ b/src/styles/Extn-AIChatPanel.less @@ -423,6 +423,12 @@ margin: 6px 0; position: relative; + &.collapsed code { + display: block; + max-height: 7.5em; // ~5 lines at 1.5 line-height + overflow: hidden; + } + code { background: none; padding: 0; @@ -431,31 +437,6 @@ line-height: 1.5; color: @project-panel-text-1; } - - .ai-copy-btn { - position: absolute; - top: 4px; - right: 4px; - background: rgba(255, 255, 255, 0.08); - border: 1px solid rgba(255, 255, 255, 0.1); - border-radius: 4px; - color: rgba(255, 255, 255, 0.5); - cursor: pointer; - padding: 2px 6px; - font-size: 12px; - line-height: 1; - opacity: 0; - transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease; - - &:hover { - background: rgba(255, 255, 255, 0.15); - color: rgba(255, 255, 255, 0.85); - } - } - - &:hover .ai-copy-btn { - opacity: 1; - } } ul, ol { @@ -1084,6 +1065,83 @@ } } +/* ── Code block title bar ──────────────────────────────────────────── */ +.ai-code-header { + display: flex; + align-items: center; + justify-content: space-between; + margin: -8px -10px 6px -10px; + padding: 4px 8px; + background-color: rgba(255, 255, 255, 0.04); + border-bottom: 1px solid rgba(255, 255, 255, 0.06); + border-radius: 3px 3px 0 0; + font-size: @sidebar-small-font-size; + user-select: none; +} + +.ai-code-lang { + color: @project-panel-text-2; + text-transform: lowercase; +} + +.ai-code-actions { + display: flex; + align-items: center; + gap: 2px; +} + +.ai-code-copy-btn, +.ai-code-collapse-btn { + background: none; + border: none; + color: @project-panel-text-2; + cursor: pointer; + padding: 1px 5px; + border-radius: 3px; + font-size: @sidebar-small-font-size; + line-height: 1; + transition: background-color 0.15s ease, color 0.15s ease; + + &:hover { + background: rgba(255, 255, 255, 0.08); + color: @project-panel-text-1; + } + + i { + font-size: 11px; + } +} + +.ai-code-copy-btn span { + margin-left: 2px; +} + +.ai-code-footer { + display: flex; + justify-content: center; + margin: 6px -10px -8px -10px; + padding: 3px 8px; + background-color: rgba(255, 255, 255, 0.04); + border-top: 1px solid rgba(255, 255, 255, 0.06); + border-radius: 0 0 3px 3px; +} + +.ai-code-expand-btn { + background: none; + border: none; + color: @project-panel-text-2; + cursor: pointer; + font-size: @sidebar-small-font-size; + padding: 1px 8px; + border-radius: 3px; + transition: background-color 0.15s ease, color 0.15s ease; + + &:hover { + background: rgba(255, 255, 255, 0.08); + color: @project-panel-text-1; + } +} + /* ── Plan card (ExitPlanMode) ───────────────────────────────────────── */ .ai-msg-plan { margin-bottom: 8px; @@ -1172,6 +1230,10 @@ overflow-x: auto; position: relative; + &.collapsed code { + display: none; + } + code { background: none; padding: 0; @@ -1180,31 +1242,6 @@ line-height: 1.5; color: @project-panel-text-1; } - - .ai-copy-btn { - position: absolute; - top: 4px; - right: 4px; - background: rgba(255, 255, 255, 0.08); - border: 1px solid rgba(255, 255, 255, 0.1); - border-radius: 4px; - color: rgba(255, 255, 255, 0.5); - cursor: pointer; - padding: 2px 6px; - font-size: 12px; - line-height: 1; - opacity: 0; - transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease; - - &:hover { - background: rgba(255, 255, 255, 0.15); - color: rgba(255, 255, 255, 0.85); - } - } - - &:hover .ai-copy-btn { - opacity: 1; - } } ul, ol { From ffd5447326945ec10b84849a9a0d6103e00ef4f8 Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 16 Mar 2026 11:35:11 +0530 Subject: [PATCH 06/14] feat(ai): add i18n strings for code blocks and plan mode Add AI_CHAT_CODE_DEFAULT_LANG, AI_CHAT_CODE_COLLAPSE, AI_CHAT_CODE_EXPAND, AI_CHAT_CODE_EXPAND_LINES, AI_CHAT_CODE_COLLAPSE_FOOTER, and AI_CHAT_PLAN_REVISE_DEFAULT strings for internationalization. --- src/nls/root/strings.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/nls/root/strings.js b/src/nls/root/strings.js index 0a2cdf16f..c168dee77 100644 --- a/src/nls/root/strings.js +++ b/src/nls/root/strings.js @@ -1925,6 +1925,12 @@ define({ "AI_CHAT_PLAN_APPROVE": "Approve", "AI_CHAT_PLAN_REVISE": "Revise", "AI_CHAT_PLAN_FEEDBACK_PLACEHOLDER": "What would you like changed?", + "AI_CHAT_PLAN_REVISE_DEFAULT": "Please revise the plan.", + "AI_CHAT_CODE_DEFAULT_LANG": "text", + "AI_CHAT_CODE_COLLAPSE": "Collapse", + "AI_CHAT_CODE_EXPAND": "Expand", + "AI_CHAT_CODE_EXPAND_LINES": "Click to expand - {0} lines", + "AI_CHAT_CODE_COLLAPSE_FOOTER": "Click to collapse", "AI_CHAT_QUESTION_OTHER": "Type a custom answer\u2026", "AI_CHAT_IMAGE_LIMIT": "Maximum {0} images allowed", "AI_CHAT_IMAGE_REMOVE": "Remove image", From e56f775881fcdb4c30c74df30112eae029a288e2 Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 16 Mar 2026 11:41:02 +0530 Subject: [PATCH 07/14] feat(ai): hint Claude to enter plan mode for complex tasks --- src-node/claude-code-agent.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src-node/claude-code-agent.js b/src-node/claude-code-agent.js index 108bad9d1..ba5c56db4 100644 --- a/src-node/claude-code-agent.js +++ b/src-node/claude-code-agent.js @@ -474,6 +474,8 @@ async function _runQuery(requestId, prompt, projectPath, model, signal, locale, "capture the full editor, specific panels, the code area, or the live preview. " + "For HTML/CSS/JS with live preview, execJsInLivePreview can run JS in the " + "browser to confirm behavior." + + "\n\nFor complex tasks involving multiple files or significant architecture, " + + "enter plan mode to propose a plan before implementing." + (locale && !locale.startsWith("en") ? "\n\nThe user's display language is " + locale + ". " + "Respond in this language unless they write in a different language." From 894257cef6a0fbe9b8b226c56ef97c85c1cad250 Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 16 Mar 2026 11:46:14 +0530 Subject: [PATCH 08/14] fix(ai): improve plan mode hint with specific triggers --- src-node/claude-code-agent.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src-node/claude-code-agent.js b/src-node/claude-code-agent.js index ba5c56db4..1f7216e9d 100644 --- a/src-node/claude-code-agent.js +++ b/src-node/claude-code-agent.js @@ -474,8 +474,9 @@ async function _runQuery(requestId, prompt, projectPath, model, signal, locale, "capture the full editor, specific panels, the code area, or the live preview. " + "For HTML/CSS/JS with live preview, execJsInLivePreview can run JS in the " + "browser to confirm behavior." + - "\n\nFor complex tasks involving multiple files or significant architecture, " + - "enter plan mode to propose a plan before implementing." + + "\n\nFor tasks that involve creating new applications, modifying multiple files, " + + "or making architectural changes, enter plan mode first to propose a plan " + + "for user approval before writing code." + (locale && !locale.startsWith("en") ? "\n\nThe user's display language is " + locale + ". " + "Respond in this language unless they write in a different language." From f460929d324f9c99e9cb9aea08be2cd2601bc293 Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 16 Mar 2026 11:55:31 +0530 Subject: [PATCH 09/14] build: update pro deps --- tracking-repos.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracking-repos.json b/tracking-repos.json index 50016da60..d9c3503fc 100644 --- a/tracking-repos.json +++ b/tracking-repos.json @@ -1,5 +1,5 @@ { "phoenixPro": { - "commitID": "ca8641e99f5954e259d1408d8bda62a5a16d4384" + "commitID": "f460b987bb7488f3030742afad7d61e7200f7e40" } } From 2483a8d1c7c69e7a8924f0b8e4fc60be09576ed5 Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 16 Mar 2026 11:56:54 +0530 Subject: [PATCH 10/14] fix(ai): broaden plan mode trigger to extensive modifications --- src-node/claude-code-agent.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-node/claude-code-agent.js b/src-node/claude-code-agent.js index 1f7216e9d..43ae21422 100644 --- a/src-node/claude-code-agent.js +++ b/src-node/claude-code-agent.js @@ -474,8 +474,8 @@ async function _runQuery(requestId, prompt, projectPath, model, signal, locale, "capture the full editor, specific panels, the code area, or the live preview. " + "For HTML/CSS/JS with live preview, execJsInLivePreview can run JS in the " + "browser to confirm behavior." + - "\n\nFor tasks that involve creating new applications, modifying multiple files, " + - "or making architectural changes, enter plan mode first to propose a plan " + + "\n\nFor tasks that involve creating new applications, extensive modifications, " + + "or architectural changes, enter plan mode first to propose a plan " + "for user approval before writing code." + (locale && !locale.startsWith("en") ? "\n\nThe user's display language is " + locale + ". " + From bc94212fc455463972f024f0c1edcc4f24bec433 Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 16 Mar 2026 13:19:07 +0530 Subject: [PATCH 11/14] feat(ai): preview button strings and CSS for edit summary Add AI_CHAT_PREVIEW_OPEN and AI_CHAT_PREVIEW_VIEWING i18n strings. Add .ai-edit-preview-btn styles with active/hover states for the live preview toggle button in edit summaries. --- src/nls/root/strings.js | 2 ++ src/styles/Extn-AIChatPanel.less | 36 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/src/nls/root/strings.js b/src/nls/root/strings.js index c168dee77..113f66fa6 100644 --- a/src/nls/root/strings.js +++ b/src/nls/root/strings.js @@ -1931,6 +1931,8 @@ define({ "AI_CHAT_CODE_EXPAND": "Expand", "AI_CHAT_CODE_EXPAND_LINES": "Click to expand - {0} lines", "AI_CHAT_CODE_COLLAPSE_FOOTER": "Click to collapse", + "AI_CHAT_PREVIEW_OPEN": "Preview", + "AI_CHAT_PREVIEW_VIEWING": "Previewing", "AI_CHAT_QUESTION_OTHER": "Type a custom answer\u2026", "AI_CHAT_IMAGE_LIMIT": "Maximum {0} images allowed", "AI_CHAT_IMAGE_REMOVE": "Remove image", diff --git a/src/styles/Extn-AIChatPanel.less b/src/styles/Extn-AIChatPanel.less index 980f20085..0aee24059 100644 --- a/src/styles/Extn-AIChatPanel.less +++ b/src/styles/Extn-AIChatPanel.less @@ -847,6 +847,42 @@ } } +.ai-edit-preview-btn { + display: flex; + align-items: center; + gap: 4px; + margin-top: 6px; + background: rgba(102, 187, 106, 0.1); + border: 1px solid rgba(102, 187, 106, 0.25); + color: #66bb6a; + font-size: @sidebar-small-font-size; + padding: 4px 12px; + border-radius: 4px; + cursor: pointer; + transition: background-color 0.15s ease, border-color 0.15s ease; + + &:hover:not(.active) { + background: rgba(102, 187, 106, 0.18); + border-color: rgba(102, 187, 106, 0.4); + } + + &.active { + background: rgba(102, 187, 106, 0.15); + border-color: rgba(102, 187, 106, 0.3); + color: #66bb6a; + cursor: pointer; + + &:hover { + background: rgba(102, 187, 106, 0.1); + border-color: rgba(102, 187, 106, 0.2); + } + } + + i { + font-size: 11px; + } +} + /* ── Initial restore point (PUC) ────────────────────────────────────── */ .ai-msg-restore-point { display: flex; From 3416f2a0501112e7289640c2cf4443ca1ac2028f Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 16 Mar 2026 13:45:36 +0530 Subject: [PATCH 12/14] build: update pro deps --- tracking-repos.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracking-repos.json b/tracking-repos.json index d9c3503fc..80c28b12a 100644 --- a/tracking-repos.json +++ b/tracking-repos.json @@ -1,5 +1,5 @@ { "phoenixPro": { - "commitID": "f460b987bb7488f3030742afad7d61e7200f7e40" + "commitID": "5d0f096c6bcefcc80bf6da3a3b9504348448416a" } } From 569b92bb5de655aae4b739d52877d532394c0a6d Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 16 Mar 2026 14:56:25 +0530 Subject: [PATCH 13/14] fix(ai): write plan files to disk and fix Windows path check Write plan files to disk via fs.writeFileSync so Claude can read them back later. Normalize backslashes for Windows path detection in the .claude/plans/ check. --- src-node/claude-code-agent.js | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src-node/claude-code-agent.js b/src-node/claude-code-agent.js index 43ae21422..fac1e11ac 100644 --- a/src-node/claude-code-agent.js +++ b/src-node/claude-code-agent.js @@ -586,27 +586,33 @@ async function _runQuery(requestId, prompt, projectPath, model, signal, locale, async (input) => { console.log("[Phoenix AI] Intercepted Write tool"); // Capture plan content when writing to .claude/plans/ - // Don't open plan files in editor — shown in plan card UI + // Plan files: capture content for plan card, write to disk + // but don't open in editor const writePath = input.tool_input.file_path || ""; - if (writePath.includes("/.claude/plans/")) { + const normalizedPath = writePath.replace(/\\/g, "/"); + if (normalizedPath.includes("/.claude/plans/")) { _lastPlanContent = input.tool_input.content || ""; console.log("[Phoenix AI] Captured plan content:", _lastPlanContent.length + "ch"); + // Write to disk so Claude can read it back later + try { + const dir = path.dirname(writePath); + if (!fs.existsSync(dir)) { + fs.mkdirSync(dir, { recursive: true }); + } + fs.writeFileSync(writePath, input.tool_input.content || "", "utf8"); + } catch (err) { + console.warn("[Phoenix AI] Failed to write plan file:", err.message); + } + let planReason = "Plan file saved."; if (_queuedClarification) { - return { - hookSpecificOutput: { - hookEventName: "PreToolUse", - permissionDecision: "deny", - permissionDecisionReason: - "Plan file saved." + CLARIFICATION_HINT - } - }; + planReason += CLARIFICATION_HINT; } return { hookSpecificOutput: { hookEventName: "PreToolUse", permissionDecision: "deny", - permissionDecisionReason: "Plan file saved." + permissionDecisionReason: planReason } }; } From ba119aaff39e64ea953f6c8ccb0f8533332f2798 Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 16 Mar 2026 14:56:52 +0530 Subject: [PATCH 14/14] build: update pro deps --- tracking-repos.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracking-repos.json b/tracking-repos.json index 80c28b12a..66abb0da1 100644 --- a/tracking-repos.json +++ b/tracking-repos.json @@ -1,5 +1,5 @@ { "phoenixPro": { - "commitID": "5d0f096c6bcefcc80bf6da3a3b9504348448416a" + "commitID": "21f226b54906adc5bd2cb0dd0d68d587dc9d22fe" } }