@vincemakes/kiso-code 0.1.27 → 0.1.29

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.
Files changed (2) hide show
  1. package/dist/chat.js +36 -0
  2. package/package.json +8 -8
package/dist/chat.js CHANGED
@@ -99,6 +99,34 @@ function approvalDiff(name, input) {
99
99
  * stream here. Events without a render (stop, expired, resolved, …) → null,
100
100
  * and the consumer skips them — the pipe bytes stay identical.
101
101
  */
102
+ /**
103
+ * ⑥ todo round: translate a do-not-compact-tagged tool result whose
104
+ * content follows the todo echo contract (a [todo] header line + one
105
+ * `[pending|active|done] text` line per item) into the checklist cell's
106
+ * structured items. Null = not a checklist — the ordinary result cell
107
+ * renders. Keyed on the TAG (what the extension declared), never on a
108
+ * tool name; the parse is graceful so a foreign tagged result still
109
+ * renders normally.
110
+ */
111
+ function parseChecklist(tags, content) {
112
+ if (!(tags ?? []).includes("do-not-compact"))
113
+ return null;
114
+ const items = [];
115
+ let header = "";
116
+ for (const line of content.split("\n")) {
117
+ const head = /^\[todo\] (.*)$/.exec(line);
118
+ if (head !== null) {
119
+ header = head[1];
120
+ continue;
121
+ }
122
+ const m = /^\[(pending|active|done)\] (.*)$/.exec(line);
123
+ if (m !== null)
124
+ items.push({ text: m[2], status: m[1] });
125
+ }
126
+ if (items.length === 0)
127
+ return null;
128
+ return { header, items };
129
+ }
102
130
  function toRenderInput(ev) {
103
131
  switch (ev.type) {
104
132
  case "user_input":
@@ -191,6 +219,14 @@ export async function consumeRun(session, run, input, turnNo, faux, liveInput, s
191
219
  case "tool_result": {
192
220
  const text = typeof ev.content === "string" ? ev.content : "";
193
221
  body.toolResult(ev.callId, { content: text, isError: ev.isError });
222
+ // ⑥ todo round: a result tagged do-not-compact whose content
223
+ // follows the checklist shape also renders as the durable
224
+ // checklist cell (the CLI translates Event → the tui's own
225
+ // shape; a non-matching parse falls back to the ordinary
226
+ // result cell — never hide information).
227
+ const checklist = parseChecklist(ev.tags, text);
228
+ if (checklist !== null)
229
+ body.checklist(checklist.header, checklist.items);
194
230
  break;
195
231
  }
196
232
  case "text_delta":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-code",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "description": "kiso CLI — the coding-agent reference product: kiso chat / kiso resume / kiso sessions.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -18,13 +18,13 @@
18
18
  "test": "vitest run"
19
19
  },
20
20
  "dependencies": {
21
- "@vincemakes/kiso-core": "0.1.27",
22
- "@vincemakes/kiso-evals": "0.1.27",
23
- "@vincemakes/kiso-provider-anthropic": "0.1.27",
24
- "@vincemakes/kiso-provider-openai": "0.1.27",
25
- "@vincemakes/kiso-runtime": "0.1.27",
26
- "@vincemakes/kiso-tools-node": "0.1.27",
27
- "@vincemakes/kiso-tui": "0.1.27"
21
+ "@vincemakes/kiso-core": "0.1.29",
22
+ "@vincemakes/kiso-evals": "0.1.29",
23
+ "@vincemakes/kiso-provider-anthropic": "0.1.29",
24
+ "@vincemakes/kiso-provider-openai": "0.1.29",
25
+ "@vincemakes/kiso-runtime": "0.1.29",
26
+ "@vincemakes/kiso-tools-node": "0.1.29",
27
+ "@vincemakes/kiso-tui": "0.1.29"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "^26.1.2",