@vincemakes/kiso-tui-cells 0.47.2 → 0.47.3
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.js +16 -3
- package/dist/strings.js +12 -3
- package/package.json +1 -1
package/dist/components.js
CHANGED
|
@@ -35,7 +35,7 @@ import { bannerLines, breathFrame, cutLine, escapeTerminal, oneRow, stripAnsi, f
|
|
|
35
35
|
// module (the tui's components shim re-exports it) — one import edge,
|
|
36
36
|
// and it points one way: md.ts measures with the width authority, never
|
|
37
37
|
// back through here.
|
|
38
|
-
import { headingLevel, renderBlock, renderMarkdown } from "./md.js";
|
|
38
|
+
import { headingLevel, inlineSpans, renderBlock, renderMarkdown } from "./md.js";
|
|
39
39
|
import { hunksDiff, hunksOf } from "./diff.js";
|
|
40
40
|
export { MdStream, renderBlock, renderMarkdown } from "./md.js";
|
|
41
41
|
/** The spinner glyphs, cycled by the compositor's on-demand tick. */
|
|
@@ -412,6 +412,16 @@ export function pendingQueueRows(lines, W, waiting = "step") {
|
|
|
412
412
|
* one dim row that says so. With colour off there is no grey and no
|
|
413
413
|
* italic to tell it by, so there — and only there — its first row opens
|
|
414
414
|
* with the plain word `thinking:`.
|
|
415
|
+
*
|
|
416
|
+
* 0.47.3 — a paragraph's INLINE markdown is drawn, as the answer's is
|
|
417
|
+
* (`inlineSpans`, with the grey italic as the style every span closes
|
|
418
|
+
* back to): a reasoning summary opens on a `**title**`, and its asterisks
|
|
419
|
+
* read as noise. `**bold**`, code spans, links and escapes render; a
|
|
420
|
+
* marker with no closer yet stays literal (the stream's half-written
|
|
421
|
+
* `**`). Blocks do not: a paragraph is still one folded run, so lists,
|
|
422
|
+
* headings and fences read as their source. An italic span inside
|
|
423
|
+
* thinking is already italic, so its closing SGR 23 is dropped — kept,
|
|
424
|
+
* it would end the paragraph's own italic halfway through.
|
|
415
425
|
*/
|
|
416
426
|
class ThinkingBlock {
|
|
417
427
|
cell;
|
|
@@ -429,6 +439,7 @@ class ThinkingBlock {
|
|
|
429
439
|
return [cutLine(`${mark}${p.dim}${p.italic}thinking \u00b7 hidden \u00b7 ctrl+t${p.italicEnd}${p.reset}`, W)];
|
|
430
440
|
const room = proseRoom(W);
|
|
431
441
|
const plainWord = p.italic === "" && p.dim === "" ? "thinking: " : "";
|
|
442
|
+
const base = `${p.dim}${p.italic}`;
|
|
432
443
|
const rows = [];
|
|
433
444
|
for (const para of text.split(/\n\s*\n/)) {
|
|
434
445
|
const flat = para.replace(/\s+/g, " ").trim();
|
|
@@ -436,9 +447,11 @@ class ThinkingBlock {
|
|
|
436
447
|
continue;
|
|
437
448
|
if (rows.length > 0)
|
|
438
449
|
rows.push("");
|
|
439
|
-
const
|
|
450
|
+
const spans = inlineSpans(flat, base);
|
|
451
|
+
const styled = p.italicEnd === "" ? spans : spans.split(p.italicEnd).join("");
|
|
452
|
+
const lead = rows.length === 0 ? `${plainWord}${styled}` : styled;
|
|
440
453
|
for (const line of foldWords(lead, room))
|
|
441
|
-
rows.push(`${rows.length === 0 ? mark : THINK_COL}${
|
|
454
|
+
rows.push(`${rows.length === 0 ? mark : THINK_COL}${base}${line}${p.italicEnd}${p.reset}`);
|
|
442
455
|
}
|
|
443
456
|
return rows;
|
|
444
457
|
}
|
package/dist/strings.js
CHANGED
|
@@ -277,9 +277,14 @@ export const KEY_BINDINGS = [
|
|
|
277
277
|
* list — and the drift was visible on a single screen: a card head
|
|
278
278
|
* reading `read` directly above one reading `list_dir`.
|
|
279
279
|
*
|
|
280
|
-
* An unmapped tool (
|
|
281
|
-
* name. Inventing a verb for a tool this package has never heard
|
|
282
|
-
* would be a worse lie than printing what the model actually calls.
|
|
280
|
+
* An unmapped tool (a third party's extension, an MCP server's) renders
|
|
281
|
+
* its own name. Inventing a verb for a tool this package has never heard
|
|
282
|
+
* of would be a worse lie than printing what the model actually calls.
|
|
283
|
+
*
|
|
284
|
+
* kiso's OWN tools are not unknown, wherever they ship (owner, 2026-10-08):
|
|
285
|
+
* the task runner's `task_stop` and the first-party extensions' `delegate`,
|
|
286
|
+
* `read_skill` and `ask_user` are named here too. This narrows the rule
|
|
287
|
+
* above, which had read "an extension's" as any extension's.
|
|
283
288
|
*/
|
|
284
289
|
const DISPLAY_VERB = {
|
|
285
290
|
read_file: "read",
|
|
@@ -288,6 +293,10 @@ const DISPLAY_VERB = {
|
|
|
288
293
|
write_file: "write",
|
|
289
294
|
edit_file: "edit",
|
|
290
295
|
shell: "shell",
|
|
296
|
+
task_stop: "stop task",
|
|
297
|
+
delegate: "subagents",
|
|
298
|
+
read_skill: "read skill",
|
|
299
|
+
ask_user: "ask user",
|
|
291
300
|
};
|
|
292
301
|
/** A tool's name as the SCREEN says it. Display-only: the raw name stays
|
|
293
302
|
* on the cell, and dispatch, the mode gate, the policy keys, the /last
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-tui-cells",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.3",
|
|
4
4
|
"description": "kiso tui-cells \u2014 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",
|