@vincemakes/kiso-tui-cells 0.23.0 → 0.24.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/dist/components.d.ts +18 -67
- package/dist/components.js +374 -515
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/render.js +17 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* package); the cli never imports it directly. Experimental — no
|
|
7
7
|
* API-stability promise yet.
|
|
8
8
|
*/
|
|
9
|
-
export { SPINNER, foldLine, foldWords, visibleWidth, bodySpacing, Container, cellComponent, focusToken, ROLLUP_NOUN,
|
|
9
|
+
export { SPINNER, foldLine, foldWords, visibleWidth, bodySpacing, Container, cellComponent, focusToken, ROLLUP_NOUN, foldTerms, CAP_TASK_LIVE, formatDuration, statusLine, boxTop, boxBottom, terminalPipe, type FrameCtx, type RenderLine, type Component, type BodyCell, } from "./components.js";
|
|
10
10
|
export { editFileDiff, truncateDiff, writeFileDiff, type DiffLine, type DiffResult } from "./diff.js";
|
|
11
11
|
export { pendingQueueRows } from "./components.js";
|
|
12
12
|
export { charWidth, displayWidth, leadWidth, widthOf } from "./width.js";
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* package); the cli never imports it directly. Experimental — no
|
|
7
7
|
* API-stability promise yet.
|
|
8
8
|
*/
|
|
9
|
-
export { SPINNER, foldLine, foldWords, visibleWidth, bodySpacing, Container, cellComponent, focusToken, ROLLUP_NOUN,
|
|
9
|
+
export { SPINNER, foldLine, foldWords, visibleWidth, bodySpacing, Container, cellComponent, focusToken, ROLLUP_NOUN, foldTerms, CAP_TASK_LIVE, formatDuration, statusLine, boxTop, boxBottom, terminalPipe, } from "./components.js";
|
|
10
10
|
export { editFileDiff, truncateDiff, writeFileDiff } from "./diff.js";
|
|
11
11
|
// W22 (the v8 input round): the pending-queue chips — the SAME
|
|
12
12
|
// UserMessage chip with the □ gutter, pre-rendered above the input
|
package/dist/render.js
CHANGED
|
@@ -179,6 +179,8 @@ function toolSummaryDetail(name, input, result) {
|
|
|
179
179
|
}
|
|
180
180
|
case "list_dir":
|
|
181
181
|
return String(input.path ?? "(root)");
|
|
182
|
+
case "search_text":
|
|
183
|
+
return searchSubject(input);
|
|
182
184
|
default:
|
|
183
185
|
return String(input.path ?? input.command ?? "");
|
|
184
186
|
}
|
|
@@ -197,10 +199,25 @@ export function toolTarget(name, input) {
|
|
|
197
199
|
return String(input.command ?? "?");
|
|
198
200
|
case "list_dir":
|
|
199
201
|
return String(input.path ?? "(root)");
|
|
202
|
+
case "search_text":
|
|
203
|
+
return searchSubject(input);
|
|
200
204
|
default:
|
|
201
205
|
return String(input.path ?? input.command ?? "");
|
|
202
206
|
}
|
|
203
207
|
}
|
|
208
|
+
/** R13 — a search's subject is WHAT IT LOOKED FOR. The schema is
|
|
209
|
+
* `pattern` (required) + `path` (optional), and both switches here fell
|
|
210
|
+
* through to the default, which reads `path` — so a search of the whole
|
|
211
|
+
* tree had an EMPTY head row, and one scoped to a directory named the
|
|
212
|
+
* directory instead of the pattern. The scope is a fact too, so it
|
|
213
|
+
* rides behind: `search TODO · src`. */
|
|
214
|
+
function searchSubject(input) {
|
|
215
|
+
const pattern = String(input.pattern ?? input.query ?? "");
|
|
216
|
+
const path = input.path === undefined || input.path === null || input.path === "" ? "" : String(input.path);
|
|
217
|
+
if (pattern === "")
|
|
218
|
+
return path;
|
|
219
|
+
return path === "" ? pattern : `${pattern} · ${path}`;
|
|
220
|
+
}
|
|
204
221
|
/** The exit code of a shell result: parsed from the failure text, 0 on success. */
|
|
205
222
|
function exitCodeOf(result) {
|
|
206
223
|
if (!result.isError)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-tui-cells",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "kiso tui-cells — the components cell renderer (components, diff, width, the render slice). Zero runtime dependencies: input is data, output is bytes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|