diff --git a/apps/x/apps/renderer/src/components/chat-input-with-mentions.tsx b/apps/x/apps/renderer/src/components/chat-input-with-mentions.tsx index ec98aa88..878ba8ca 100644 --- a/apps/x/apps/renderer/src/components/chat-input-with-mentions.tsx +++ b/apps/x/apps/renderer/src/components/chat-input-with-mentions.tsx @@ -302,12 +302,12 @@ function ChatInputInner({ const permFullW = 65 + 8 // "Auto" label const permIconW = 28 + 8 const base = 28 + 80 + 28 + 2 * 8 // +btn + model + submit + 2 outer gaps - // Min container width to fit each level without overflowing - const t0 = base + permFullW + workDirFullW + searchFullW + codeFullW // all full - const t1 = base + permFullW + workDirFullW + searchFullW + codeIconW // code → icon - const t2 = base + permFullW + workDirFullW + searchIconW + codeIconW // search → icon - const t3 = base + permFullW + workDirIconW + searchIconW + codeIconW // workDir → icon - const t4 = base + permIconW + workDirIconW + searchIconW + codeIconW // perm → icon + // Collapse order right→left: code(1) → perm(2) → search(3) → workDir(4) + const t0 = base + workDirFullW + searchFullW + permFullW + codeFullW // all full + const t1 = base + workDirFullW + searchFullW + permFullW + codeIconW // code → icon + const t2 = base + workDirFullW + searchFullW + permIconW + codeIconW // perm → icon + const t3 = base + workDirFullW + searchIconW + permIconW + codeIconW // search → icon + const t4 = base + workDirIconW + searchIconW + permIconW + codeIconW // workDir → icon setCollapseLevel(w >= t0 ? 0 : w >= t1 ? 1 : w >= t2 ? 2 : w >= t3 ? 3 : w >= t4 ? 4 : 4) }) ro.observe(el) @@ -897,7 +897,7 @@ function ChatInputInner({ {workDir && ( - {collapseLevel >= 3 ? ( + {collapseLevel >= 4 ? (