@vincemakes/kiso-tui 0.47.3 → 0.49.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/lines.js +6 -1
- package/package.json +2 -2
package/dist/lines.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { elapsedLabel } from "@vincemakes/kiso-tui-cells";
|
|
2
|
+
import { hunksOf } from "@vincemakes/kiso-tui-cells/diff";
|
|
2
3
|
/**
|
|
3
4
|
* Event rendering for the terminal. Pure (testable): given the render
|
|
4
5
|
* input, produce the lines a human sees. Colors are raw ANSI — no
|
|
@@ -125,7 +126,11 @@ function approvalDetail(name, input, resolvePath) {
|
|
|
125
126
|
return `\n ${escapeTerminal(resolvePath(String(input.path ?? "?")))}\n ${escapeTerminal(content)}`;
|
|
126
127
|
}
|
|
127
128
|
if (name === "edit_file") {
|
|
128
|
-
|
|
129
|
+
// ADR-0061: either vocabulary, every hunk — the labels say what the
|
|
130
|
+
// panel always meant (replace THIS with THAT)
|
|
131
|
+
const hunks = hunksOf(input) ?? [];
|
|
132
|
+
const pairs = hunks.map((h) => `\n replace: ${escapeTerminal(h.search)}\n with: ${escapeTerminal(h.replace)}`).join("");
|
|
133
|
+
return `\n ${escapeTerminal(resolvePath(String(input.path ?? "?")))}${pairs}`;
|
|
129
134
|
}
|
|
130
135
|
return `\n ${escapeTerminal(JSON.stringify(input))}`;
|
|
131
136
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-tui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"description": "kiso tui \u2014 the pure terminal layer (cell renderer, dock, raw editor, diff, palette). Zero runtime dependencies: input is data, output is bytes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,6 +35,6 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/vincemakes/kiso/tree/main/packages/tui#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@vincemakes/kiso-tui-cells": "0.
|
|
38
|
+
"@vincemakes/kiso-tui-cells": "0.49.0"
|
|
39
39
|
}
|
|
40
40
|
}
|