dsh-ssh-tui 0.4.0 → 0.4.1
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/lib/tui.js +32 -24
- package/lib/tui.js.map +1 -1
- package/package.json +1 -1
package/lib/tui.js
CHANGED
|
@@ -3331,19 +3331,30 @@ export class SshTui {
|
|
|
3331
3331
|
/** The transcript rows that support per-row expand/collapse. */
|
|
3332
3332
|
collapsibleRows() {
|
|
3333
3333
|
const compact = this.isCompactView();
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
return row.kind === 'reasoning'
|
|
3338
|
-
|| row.kind === 'tool'
|
|
3339
|
-
|| row.kind === 'subagent'
|
|
3334
|
+
if (compact) {
|
|
3335
|
+
const groups = compactToolGroups(this.rows.filter((row) => row.kind === 'tool'));
|
|
3336
|
+
const rows = this.rows.filter((row) => row.kind === 'subagent'
|
|
3340
3337
|
|| row.kind === 'plan'
|
|
3341
3338
|
|| row.kind === 'question'
|
|
3342
3339
|
|| row.kind === 'goal'
|
|
3343
|
-
|| row.kind === 'compaction'
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3340
|
+
|| row.kind === 'compaction');
|
|
3341
|
+
const callAnchor = groups.calls.at(-1);
|
|
3342
|
+
const editAnchor = groups.edits.at(-1);
|
|
3343
|
+
if (callAnchor !== undefined)
|
|
3344
|
+
rows.push(callAnchor);
|
|
3345
|
+
if (editAnchor !== undefined)
|
|
3346
|
+
rows.push(editAnchor);
|
|
3347
|
+
return rows;
|
|
3348
|
+
}
|
|
3349
|
+
const rows = this.rows.filter((row) => row.kind === 'reasoning'
|
|
3350
|
+
|| row.kind === 'tool'
|
|
3351
|
+
|| row.kind === 'subagent'
|
|
3352
|
+
|| row.kind === 'plan'
|
|
3353
|
+
|| row.kind === 'question'
|
|
3354
|
+
|| row.kind === 'goal'
|
|
3355
|
+
|| row.kind === 'compaction'
|
|
3356
|
+
|| row.kind === 'prompt');
|
|
3357
|
+
if (this.streaming !== undefined && this.streaming.reasoning !== '') {
|
|
3347
3358
|
this.streamingReasoning ??= { kind: 'streaming-reasoning', expanded: false };
|
|
3348
3359
|
rows.push(this.streamingReasoning);
|
|
3349
3360
|
}
|
|
@@ -3853,22 +3864,9 @@ export class SshTui {
|
|
|
3853
3864
|
const compactGroups = compact
|
|
3854
3865
|
? compactToolGroups(this.rows.filter((row) => row.kind === 'tool'))
|
|
3855
3866
|
: undefined;
|
|
3856
|
-
const compactEditCard = compactGroups?.edits[0];
|
|
3857
|
-
const compactCallCard = compactGroups?.calls[0];
|
|
3858
3867
|
for (const row of this.rows) {
|
|
3859
|
-
if (compact && (row.kind === 'reasoning' || row.kind === 'prompt'))
|
|
3868
|
+
if (compact && (row.kind === 'reasoning' || row.kind === 'prompt' || row.kind === 'tool'))
|
|
3860
3869
|
continue;
|
|
3861
|
-
if (compact && compactGroups !== undefined && row.kind === 'tool') {
|
|
3862
|
-
if (row === compactEditCard) {
|
|
3863
|
-
this.paintCompactSummary(addDisplay, row, 'edits', compactGroups, width);
|
|
3864
|
-
continue;
|
|
3865
|
-
}
|
|
3866
|
-
if (row === compactCallCard) {
|
|
3867
|
-
this.paintCompactSummary(addDisplay, row, 'calls', compactGroups, width);
|
|
3868
|
-
continue;
|
|
3869
|
-
}
|
|
3870
|
-
continue;
|
|
3871
|
-
}
|
|
3872
3870
|
if (row.kind === 'brand-logo') {
|
|
3873
3871
|
const variant = DEEPSEEK_LOGO_VARIANTS.find(candidate => candidate.width <= width - 2)
|
|
3874
3872
|
?? DEEPSEEK_LOGO_VARIANTS[DEEPSEEK_LOGO_VARIANTS.length - 1];
|
|
@@ -4109,6 +4107,16 @@ export class SshTui {
|
|
|
4109
4107
|
}
|
|
4110
4108
|
}
|
|
4111
4109
|
}
|
|
4110
|
+
if (compact && compactGroups !== undefined) {
|
|
4111
|
+
const editAnchor = compactGroups.edits.at(-1);
|
|
4112
|
+
const callAnchor = compactGroups.calls.at(-1);
|
|
4113
|
+
if (callAnchor !== undefined) {
|
|
4114
|
+
this.paintCompactSummary(addDisplay, callAnchor, 'calls', compactGroups, width);
|
|
4115
|
+
}
|
|
4116
|
+
if (editAnchor !== undefined) {
|
|
4117
|
+
this.paintCompactSummary(addDisplay, editAnchor, 'edits', compactGroups, width);
|
|
4118
|
+
}
|
|
4119
|
+
}
|
|
4112
4120
|
if (this.waitCardVisible()) {
|
|
4113
4121
|
const copy = waitCardCopy(this.waitCardSource());
|
|
4114
4122
|
const started = this.waitStartedAt ?? Date.now();
|