@leanandmean/coding-agent 0.74.1-scramjet.32 → 0.74.1-scramjet.34
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/CHANGELOG.md +2 -0
- package/dist/config.d.ts +8 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +26 -19
- package/dist/config.js.map +1 -1
- package/dist/core/exec.d.ts +12 -0
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +69 -20
- package/dist/core/exec.js.map +1 -1
- package/dist/core/extensions/types.d.ts +6 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +8 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +54 -17
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +46 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +33 -14
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/version-check.d.ts +17 -5
- package/dist/utils/version-check.d.ts.map +1 -1
- package/dist/utils/version-check.js +46 -4
- package/dist/utils/version-check.js.map +1 -1
- package/docs/extensions.md +27 -4
- package/docs/packages.md +2 -0
- package/docs/tui.md +25 -4
- package/package.json +2 -2
package/docs/tui.md
CHANGED
|
@@ -14,7 +14,7 @@ The interactive mode separates terminal output into append-only committed histor
|
|
|
14
14
|
|
|
15
15
|
Mutable output is tail-windowed to at most `terminal.rows - 1` rendered lines before it is written, so live content cannot push mutable rows into native scrollback. Finalization removes the mutable preview and commits the component's finalized presentation once. Pending tools form an ordering barrier, and image-backed tools commit only after their conversions settle.
|
|
16
16
|
|
|
17
|
-
At the TUI API level, `setLiveRegionStart(component)` selects the first direct child in the live canvas, `commit()`
|
|
17
|
+
At the TUI API level, `setLiveRegionStart(component)` selects the first direct child in the live canvas, `commit()` schedules atomic append of newly finalized rows, `commitNow()` renders immediately and waits for terminal output to flush when controls must not receive input first, and `rebuild()` deliberately repaints retained history. Detaching the selected component safely resets committed rendering and returns the TUI to legacy full-repaint rendering. Routine updates, content shrink, temporary-UI dismissal, and height-only resize do not clear scrollback or replay committed history. Width and theme changes, session reconstruction, presentation-setting changes, reload, resume, and external-editor return use deliberate rebuilds because retained output must be reflowed or restyled; those rebuilds intentionally bottom-anchor the display.
|
|
18
18
|
|
|
19
19
|
Overlays remain screen-relative and are composed over the bounded live canvas. Closing an overlay or autocomplete restores the underlying live rows without mutating committed history.
|
|
20
20
|
|
|
@@ -108,16 +108,33 @@ pi.on("session_start", async (_event, ctx) => {
|
|
|
108
108
|
});
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
**In custom tools** via `
|
|
111
|
+
**In custom tools** via `ctx.ui.custom()`:
|
|
112
112
|
|
|
113
113
|
```typescript
|
|
114
114
|
async execute(toolCallId, params, onUpdate, ctx, signal) {
|
|
115
|
-
const
|
|
115
|
+
const result = await ctx.ui.custom((_tui, _theme, _keybindings, done) => myComponent(done));
|
|
116
116
|
// ...
|
|
117
|
-
handle.close();
|
|
118
117
|
}
|
|
119
118
|
```
|
|
120
119
|
|
|
120
|
+
### Tool-attached committed context
|
|
121
|
+
|
|
122
|
+
A pending sequential tool can pair compact live controls with immutable long-form context committed at that tool's transcript position:
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
const result = await ctx.ui.custom(
|
|
126
|
+
(_tui, _theme, _keybindings, done) => new ApprovalSelector(done),
|
|
127
|
+
{
|
|
128
|
+
toolAttachedContext: {
|
|
129
|
+
toolCallId,
|
|
130
|
+
render: (_tui, theme) => new Markdown(completePayload, 0, 0, getMarkdownTheme()),
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
);
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The context is constructed after the controls factory resolves, anchored to the named pending tool row, and committed once. The editor is defocused before terminal flushing begins; controls receive focus only after that flush settles. It is retained internally for deliberate width/theme rebuilds but is not persisted or sent to the model. Native scrollback retention depends on terminal capacity and configuration. The operation fails closed when the row is missing, settled, or cannot be flushed; use it only from the sequential tool identified by `toolCallId`.
|
|
137
|
+
|
|
121
138
|
## Overlays
|
|
122
139
|
|
|
123
140
|
Overlays render components on top of existing content without clearing the screen. Pass `{ overlay: true }` to `ctx.ui.custom()`:
|
|
@@ -722,6 +739,8 @@ pi.registerCommand("settings", {
|
|
|
722
739
|
container.addChild(settingsList);
|
|
723
740
|
|
|
724
741
|
return {
|
|
742
|
+
get focused() { return settingsList.focused; },
|
|
743
|
+
set focused(value) { settingsList.focused = value; },
|
|
725
744
|
render: (w) => container.render(w),
|
|
726
745
|
invalidate: () => container.invalidate(),
|
|
727
746
|
handleInput: (data) => settingsList.handleInput?.(data),
|
|
@@ -731,6 +750,8 @@ pi.registerCommand("settings", {
|
|
|
731
750
|
});
|
|
732
751
|
```
|
|
733
752
|
|
|
753
|
+
With `enableSearch`, typing fuzzy-filters labels, Backspace edits the query, and Up/Down plus Enter/Space navigate and activate matches. `SettingsList` propagates focus to its search input and nested focusable submenus for IME cursor placement; a wrapper returned from `ctx.ui.custom()` must forward `focused` as shown above.
|
|
754
|
+
|
|
734
755
|
**Examples:** [tools.ts](../examples/extensions/tools.ts)
|
|
735
756
|
|
|
736
757
|
### Pattern 4: Persistent Status Indicator
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leanandmean/coding-agent",
|
|
3
|
-
"version": "0.74.1-scramjet.
|
|
3
|
+
"version": "0.74.1-scramjet.34",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@leanandmean/agent": "0.74.1-scramjet.15",
|
|
37
37
|
"@leanandmean/ai": "0.74.1-scramjet.11",
|
|
38
|
-
"@leanandmean/tui": "0.74.1-scramjet.
|
|
38
|
+
"@leanandmean/tui": "0.74.1-scramjet.10",
|
|
39
39
|
"@silvia-odwyer/photon-node": "^0.3.4",
|
|
40
40
|
"chalk": "^5.5.0",
|
|
41
41
|
"dictionary-en": "^4.0.0",
|