@namzu/cli 14.3.0 → 15.1.0
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/README.md +117 -17
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +26 -26
- package/dist/cli.js.map +1 -1
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/acp.js +3 -2
- package/dist/commands/acp.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +2 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/login.d.ts +2 -0
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +45 -7
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +36 -12
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/{stubs.d.ts → serve.d.ts} +1 -10
- package/dist/commands/serve.d.ts.map +1 -0
- package/dist/commands/{stubs.js → serve.js} +1 -24
- package/dist/commands/serve.js.map +1 -0
- package/dist/commands/skills.d.ts +19 -0
- package/dist/commands/skills.d.ts.map +1 -0
- package/dist/commands/skills.js +107 -0
- package/dist/commands/skills.js.map +1 -0
- package/dist/integrations/mcp/servers.d.ts +7 -0
- package/dist/integrations/mcp/servers.d.ts.map +1 -1
- package/dist/integrations/mcp/servers.js +33 -8
- package/dist/integrations/mcp/servers.js.map +1 -1
- package/dist/integrations/sessions/store.d.ts +8 -0
- package/dist/integrations/sessions/store.d.ts.map +1 -1
- package/dist/integrations/sessions/store.js +15 -0
- package/dist/integrations/sessions/store.js.map +1 -1
- package/dist/integrations/subagents/runtime.d.ts +2 -0
- package/dist/integrations/subagents/runtime.d.ts.map +1 -1
- package/dist/integrations/subagents/runtime.js +86 -13
- package/dist/integrations/subagents/runtime.js.map +1 -1
- package/dist/integrations/updates.d.ts.map +1 -1
- package/dist/integrations/updates.js +29 -4
- package/dist/integrations/updates.js.map +1 -1
- package/dist/tui/App.d.ts +10 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +1039 -252
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/ChoicePicker.d.ts +2 -1
- package/dist/tui/ChoicePicker.d.ts.map +1 -1
- package/dist/tui/ChoicePicker.js +10 -6
- package/dist/tui/ChoicePicker.js.map +1 -1
- package/dist/tui/Composer.d.ts +19 -2
- package/dist/tui/Composer.d.ts.map +1 -1
- package/dist/tui/Composer.js +526 -70
- package/dist/tui/Composer.js.map +1 -1
- package/dist/tui/CopyPicker.d.ts.map +1 -1
- package/dist/tui/CopyPicker.js +3 -4
- package/dist/tui/CopyPicker.js.map +1 -1
- package/dist/tui/EditPromptPicker.d.ts.map +1 -1
- package/dist/tui/EditPromptPicker.js +3 -4
- package/dist/tui/EditPromptPicker.js.map +1 -1
- package/dist/tui/Markdown.d.ts +3 -1
- package/dist/tui/Markdown.d.ts.map +1 -1
- package/dist/tui/Markdown.js +11 -9
- package/dist/tui/Markdown.js.map +1 -1
- package/dist/tui/PermissionOverlay.d.ts +11 -6
- package/dist/tui/PermissionOverlay.d.ts.map +1 -1
- package/dist/tui/PermissionOverlay.js +13 -20
- package/dist/tui/PermissionOverlay.js.map +1 -1
- package/dist/tui/Picker.d.ts.map +1 -1
- package/dist/tui/Picker.js +47 -11
- package/dist/tui/Picker.js.map +1 -1
- package/dist/tui/ResumePicker.d.ts.map +1 -1
- package/dist/tui/ResumePicker.js +6 -1
- package/dist/tui/ResumePicker.js.map +1 -1
- package/dist/tui/StatusBar.js +3 -3
- package/dist/tui/StatusBar.js.map +1 -1
- package/dist/tui/TextPrompt.d.ts +21 -0
- package/dist/tui/TextPrompt.d.ts.map +1 -0
- package/dist/tui/TextPrompt.js +139 -0
- package/dist/tui/TextPrompt.js.map +1 -0
- package/dist/tui/Transcript.d.ts +9 -10
- package/dist/tui/Transcript.d.ts.map +1 -1
- package/dist/tui/Transcript.js +11 -12
- package/dist/tui/Transcript.js.map +1 -1
- package/dist/tui/agent.d.ts +57 -23
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/agent.js +136 -86
- package/dist/tui/agent.js.map +1 -1
- package/dist/tui/exit-summary.d.ts.map +1 -1
- package/dist/tui/exit-summary.js +2 -1
- package/dist/tui/exit-summary.js.map +1 -1
- package/dist/tui/external-editor.d.ts +25 -0
- package/dist/tui/external-editor.d.ts.map +1 -0
- package/dist/tui/external-editor.js +169 -0
- package/dist/tui/external-editor.js.map +1 -0
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/index.js +4 -0
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/live-window.d.ts +17 -11
- package/dist/tui/live-window.d.ts.map +1 -1
- package/dist/tui/live-window.js +64 -20
- package/dist/tui/live-window.js.map +1 -1
- package/dist/tui/login-prompt.d.ts +2 -0
- package/dist/tui/login-prompt.d.ts.map +1 -1
- package/dist/tui/login-prompt.js +8 -1
- package/dist/tui/login-prompt.js.map +1 -1
- package/dist/tui/mentions.d.ts +19 -0
- package/dist/tui/mentions.d.ts.map +1 -1
- package/dist/tui/mentions.js +96 -5
- package/dist/tui/mentions.js.map +1 -1
- package/dist/tui/permission-review.d.ts +59 -0
- package/dist/tui/permission-review.d.ts.map +1 -0
- package/dist/tui/permission-review.js +219 -0
- package/dist/tui/permission-review.js.map +1 -0
- package/dist/tui/run-interruption.d.ts +14 -0
- package/dist/tui/run-interruption.d.ts.map +1 -0
- package/dist/tui/run-interruption.js +67 -0
- package/dist/tui/run-interruption.js.map +1 -0
- package/dist/tui/selection-window.d.ts +18 -0
- package/dist/tui/selection-window.d.ts.map +1 -0
- package/dist/tui/selection-window.js +37 -0
- package/dist/tui/selection-window.js.map +1 -0
- package/dist/tui/slashCommands.d.ts +48 -8
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/slashCommands.js +129 -47
- package/dist/tui/slashCommands.js.map +1 -1
- package/dist/tui/terminal-hyperlinks.d.ts +20 -0
- package/dist/tui/terminal-hyperlinks.d.ts.map +1 -0
- package/dist/tui/terminal-hyperlinks.js +70 -0
- package/dist/tui/terminal-hyperlinks.js.map +1 -0
- package/dist/tui/types.d.ts +2 -0
- package/dist/tui/types.d.ts.map +1 -1
- package/dist/tui/use-selection-index.d.ts +8 -0
- package/dist/tui/use-selection-index.d.ts.map +1 -0
- package/dist/tui/use-selection-index.js +13 -0
- package/dist/tui/use-selection-index.js.map +1 -0
- package/dist/tui/workspace-review.d.ts +15 -0
- package/dist/tui/workspace-review.d.ts.map +1 -0
- package/dist/tui/workspace-review.js +67 -0
- package/dist/tui/workspace-review.js.map +1 -0
- package/dist/version.d.ts +10 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +23 -0
- package/dist/version.js.map +1 -0
- package/package.json +8 -7
- package/dist/commands/stubs.d.ts.map +0 -1
- package/dist/commands/stubs.js.map +0 -1
- package/dist/tui/bottom-spacer.d.ts +0 -95
- package/dist/tui/bottom-spacer.d.ts.map +0 -1
- package/dist/tui/bottom-spacer.js +0 -83
- package/dist/tui/bottom-spacer.js.map +0 -1
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* How many blank rows to put above the composer so it sits at the bottom.
|
|
3
|
-
*
|
|
4
|
-
* ## The narrow defect
|
|
5
|
-
*
|
|
6
|
-
* Ink writes the transcript to native scrollback via `<Static>` and re-renders
|
|
7
|
-
* the live region — activity, composer, status bar — beneath it. Once the
|
|
8
|
-
* output exceeds the viewport the terminal has scrolled, and the composer is
|
|
9
|
-
* already at the bottom. The complaint is entirely the case before that: five
|
|
10
|
-
* lines on a forty-row terminal leaves the composer at row six with blank space
|
|
11
|
-
* under it, and the operator's eye has to find it.
|
|
12
|
-
*
|
|
13
|
-
* So this does not try to pin the composer always. It pads only while the
|
|
14
|
-
* transcript is unambiguously shorter than the viewport, and returns 0 the
|
|
15
|
-
* moment that stops being knowable. After that, the terminal does it.
|
|
16
|
-
*
|
|
17
|
-
* ## Why a rough estimate is safe here, and would not be in general
|
|
18
|
-
*
|
|
19
|
-
* The rendered height of a transcript is not knowable from this side: ink does
|
|
20
|
-
* not report it, and wrapping depends on ANSI, wide glyphs and markdown that
|
|
21
|
-
* this module does not model. That is exactly why the whole-session version of
|
|
22
|
-
* this idea is a bad one.
|
|
23
|
-
*
|
|
24
|
-
* It is safe in the short case because the error is **asymmetric**:
|
|
25
|
-
*
|
|
26
|
-
* - Overestimate the content ⇒ pad less, or not at all ⇒ the composer floats,
|
|
27
|
-
* which is precisely today's behaviour. No worse than not doing this.
|
|
28
|
-
* - Underestimate the content ⇒ pad too much ⇒ the composer is pushed off the
|
|
29
|
-
* bottom, which is worse than today.
|
|
30
|
-
*
|
|
31
|
-
* So every uncertainty is resolved toward *more* content and *less* padding:
|
|
32
|
-
* `estimateRenderedLines` counts a minimum, {@link SAFETY_ROWS} is subtracted
|
|
33
|
-
* on top, and anything unknown returns 0. Being wrong costs the feature, never
|
|
34
|
-
* the usability.
|
|
35
|
-
*/
|
|
36
|
-
/**
|
|
37
|
-
* Rows held back from the calculation.
|
|
38
|
-
*
|
|
39
|
-
* Absorbs what the estimate cannot see — a wrapped line the width maths missed,
|
|
40
|
-
* a wide glyph, a markdown block that renders taller than its source. Six is
|
|
41
|
-
* chosen to be visibly generous rather than tuned: the cost of it being too
|
|
42
|
-
* large is a small gap under the composer on a nearly-empty screen, and the
|
|
43
|
-
* cost of it being too small is a composer pushed out of view.
|
|
44
|
-
*/
|
|
45
|
-
export const SAFETY_ROWS = 6;
|
|
46
|
-
/**
|
|
47
|
-
* A deliberate UNDER-count of how tall the transcript will render.
|
|
48
|
-
*
|
|
49
|
-
* Under, not over, because it is subtracted from the space available: counting
|
|
50
|
-
* low leaves more apparent room, and the safety margin plus the guard below are
|
|
51
|
-
* what stop that becoming padding. Each entry is at least one row, and a long
|
|
52
|
-
* entry is divided by the width to approximate wrapping.
|
|
53
|
-
*/
|
|
54
|
-
export function estimateRenderedLines(transcript, columns) {
|
|
55
|
-
const width = Math.max(20, columns ?? 80);
|
|
56
|
-
let total = 0;
|
|
57
|
-
for (const entry of transcript) {
|
|
58
|
-
for (const line of entry.split('\n')) {
|
|
59
|
-
total += Math.max(1, Math.ceil(line.length / width));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return total;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Blank rows to insert above the composer, or 0 to leave the layout alone.
|
|
66
|
-
*
|
|
67
|
-
* Returns 0 whenever the answer could be wrong: no TTY, an implausible height,
|
|
68
|
-
* or a transcript long enough that the terminal has plausibly begun to scroll.
|
|
69
|
-
*/
|
|
70
|
-
export function bottomSpacerRows(input) {
|
|
71
|
-
const { rows, columns, transcript, liveRows } = input;
|
|
72
|
-
// Not a terminal, or a height too small to reason about. A pipe has no
|
|
73
|
-
// bottom to pin to.
|
|
74
|
-
if (rows === undefined || !Number.isFinite(rows) || rows < 12)
|
|
75
|
-
return 0;
|
|
76
|
-
const used = estimateRenderedLines(transcript, columns) + liveRows + SAFETY_ROWS;
|
|
77
|
-
// The transcript is at or past the viewport: the terminal is scrolling and
|
|
78
|
-
// the composer is already where it should be. Padding now would push it off.
|
|
79
|
-
if (used >= rows)
|
|
80
|
-
return 0;
|
|
81
|
-
return rows - used;
|
|
82
|
-
}
|
|
83
|
-
//# sourceMappingURL=bottom-spacer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bottom-spacer.js","sourceRoot":"","sources":["../../src/tui/bottom-spacer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAA;AAoC5B;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CACpC,UAA6B,EAC7B,OAA2B;IAE3B,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,IAAI,EAAE,CAAC,CAAA;IACzC,IAAI,KAAK,GAAG,CAAC,C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