tycono 0.3.14-beta.20 → 0.3.14-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -70,8 +70,8 @@ function eventLine(ev: SSEEvent): string | null {
|
|
|
70
70
|
catch { t = '--:--:--'; }
|
|
71
71
|
const r = (ev.roleId ?? '').padEnd(12);
|
|
72
72
|
switch (ev.type) {
|
|
73
|
-
case 'text': { const x = ((ev.data.text as string) ?? '').trim(); return x ? `${t} ${r} ${x.slice(0, 120)}` : null; }
|
|
74
|
-
case 'thinking': { const x = ((ev.data.text as string) ?? '').trim(); return x ? `${t} ${r} \uD83D\uDCAD ${x.slice(0, 80)}` : null; }
|
|
73
|
+
case 'text': { const x = ((ev.data.text as string) ?? '').replace(/\n/g, ' ').trim(); return x ? `${t} ${r} ${x.slice(0, 120)}` : null; }
|
|
74
|
+
case 'thinking': { const x = ((ev.data.text as string) ?? '').replace(/\n/g, ' ').trim(); return x ? `${t} ${r} \uD83D\uDCAD ${x.slice(0, 80)}` : null; }
|
|
75
75
|
case 'tool:start': { const n = (ev.data.name as string) ?? ''; const d = ev.data.input ? (((ev.data.input as any).file_path || (ev.data.input as any).command || (ev.data.input as any).pattern || '') as string).slice(0, 50) : ''; return `${t} ${r} \u2192 ${n} ${d}`; }
|
|
76
76
|
case 'tool:result': return `${t} ${r} \u2190 ${(ev.data.name as string) ?? ''} done`;
|
|
77
77
|
case 'msg:start': return `${t} ${r} \u25B6 Started`;
|
|
@@ -157,6 +157,9 @@ const PanelModeInner: React.FC<PanelModeProps> = ({
|
|
|
157
157
|
const leftWidth = 28;
|
|
158
158
|
const termCols = process.stdout.columns || 120;
|
|
159
159
|
const rightWidth = termCols - leftWidth - 3;
|
|
160
|
+
const headerLines = 2;
|
|
161
|
+
const footerLines = 3;
|
|
162
|
+
const contentHeight = Math.max(termHeight - headerLines - footerLines, 5);
|
|
160
163
|
|
|
161
164
|
// === Build left column: OrgTree ===
|
|
162
165
|
const ceoIcon = statuses['ceo'] === 'working' ? '\u25CF' : statuses['ceo'] === 'done' ? '\u2713' : '\u25CB';
|
|
@@ -176,7 +179,7 @@ const PanelModeInner: React.FC<PanelModeProps> = ({
|
|
|
176
179
|
const rightContentLines: string[] = [];
|
|
177
180
|
let selectedDocPath: string | null = null;
|
|
178
181
|
if (rightTab === 'stream') {
|
|
179
|
-
const maxEv = Math.max(5,
|
|
182
|
+
const maxEv = Math.max(5, contentHeight - 2);
|
|
180
183
|
const filtered = selectedRoleId ? events.filter(e => e.roleId === selectedRoleId) : events;
|
|
181
184
|
const visible = filtered.slice(-maxEv);
|
|
182
185
|
for (const ev of visible) {
|
|
@@ -237,11 +240,8 @@ const PanelModeInner: React.FC<PanelModeProps> = ({
|
|
|
237
240
|
}
|
|
238
241
|
}
|
|
239
242
|
|
|
240
|
-
// === Merge left + right,
|
|
241
|
-
const
|
|
242
|
-
const footerLines = 2; // separator + keybindings
|
|
243
|
-
const contentHeight = Math.max(termHeight - headerLines - footerLines, 5);
|
|
244
|
-
const maxRows = Math.max(leftLines.length, rightContentLines.length, contentHeight);
|
|
243
|
+
// === Merge left + right, cap to terminal height ===
|
|
244
|
+
const maxRows = contentHeight;
|
|
245
245
|
|
|
246
246
|
const rows: Array<{ left: string; right: string; leftSelected: boolean; leftWorking: boolean }> = [];
|
|
247
247
|
for (let i = 0; i < maxRows; i++) {
|