@vincemakes/kiso-tui-cells 0.32.0 → 0.32.1

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/render.d.ts CHANGED
@@ -194,6 +194,22 @@ export declare function renderToolSummary(name: string, input: Record<string, un
194
194
  * the summary detail uses, WITHOUT the counts (the header names what
195
195
  * was expanded, not its size). */
196
196
  export declare function toolTarget(name: string, input: Record<string, unknown>): string;
197
+ /**
198
+ * HF-1 (0.32.1) — a head row is ONE row, whatever the model wrote.
199
+ *
200
+ * The owner's 0.32.0 dogfood: the model issued a heredoc shell command
201
+ * (`python3 - <<'EOF' …`), the running card's head carried its newlines
202
+ * into the compositor, invariant ①b threw in the field and the process
203
+ * died. `escapeTerminal` keeps `\n` on purpose (text blocks need it); a
204
+ * HEAD ROW does not — it is one physical row by construction. So every
205
+ * builder that puts a tool's target on a row projects the breaks to a
206
+ * visible mark first: a line break becomes `⏎` (CRLF is one), a tab
207
+ * becomes one cell of space (its width is a property of the column, and
208
+ * a cut row has no column to give it). The full command is still on the
209
+ * approval panel and in the durable log; the row says what ran, in one
210
+ * row.
211
+ */
212
+ export declare function oneRow(text: string): string;
197
213
  /** k-units for the status line: 12345 → 12.3k, 800 → 800, null → ?. */
198
214
  export declare function kUnit(value: number | null): string;
199
215
  /**
package/dist/render.js CHANGED
@@ -167,7 +167,7 @@ export function renderToolSummary(name, input, result, reason = null) {
167
167
  }
168
168
  const mark = result.isError ? `${p.red}✗${p.reset}` : `${p.bold}✓${p.reset}`;
169
169
  const shortName = name.replace("_file", "");
170
- const detail = toolSummaryDetail(name, input, result);
170
+ const detail = oneRow(toolSummaryDetail(name, input, result)); // HF-1: one row, whatever the command
171
171
  return `${mark} ${escapeTerminal(`${shortName} ${detail}`)}`;
172
172
  }
173
173
  function toolSummaryDetail(name, input, result) {
@@ -213,6 +213,27 @@ function toolSummaryDetail(name, input, result) {
213
213
  * the summary detail uses, WITHOUT the counts (the header names what
214
214
  * was expanded, not its size). */
215
215
  export function toolTarget(name, input) {
216
+ return oneRow(toolTargetRaw(name, input));
217
+ }
218
+ /**
219
+ * HF-1 (0.32.1) — a head row is ONE row, whatever the model wrote.
220
+ *
221
+ * The owner's 0.32.0 dogfood: the model issued a heredoc shell command
222
+ * (`python3 - <<'EOF' …`), the running card's head carried its newlines
223
+ * into the compositor, invariant ①b threw in the field and the process
224
+ * died. `escapeTerminal` keeps `\n` on purpose (text blocks need it); a
225
+ * HEAD ROW does not — it is one physical row by construction. So every
226
+ * builder that puts a tool's target on a row projects the breaks to a
227
+ * visible mark first: a line break becomes `⏎` (CRLF is one), a tab
228
+ * becomes one cell of space (its width is a property of the column, and
229
+ * a cut row has no column to give it). The full command is still on the
230
+ * approval panel and in the durable log; the row says what ran, in one
231
+ * row.
232
+ */
233
+ export function oneRow(text) {
234
+ return text.replace(/\r\n|\n|\r/g, "\u23ce").replace(/\t/g, " ");
235
+ }
236
+ function toolTargetRaw(name, input) {
216
237
  switch (name) {
217
238
  case "read_file":
218
239
  case "write_file":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-tui-cells",
3
- "version": "0.32.0",
3
+ "version": "0.32.1",
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",