@testany/hephos 0.3.10 → 0.3.13
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/out/repl/ReplModeInk.d.ts.map +1 -1
- package/out/repl/ReplModeInk.js +45 -22
- package/out/repl/ReplModeInk.js.map +1 -1
- package/out/repl/components/HistoryOverlay.d.ts +4 -2
- package/out/repl/components/HistoryOverlay.d.ts.map +1 -1
- package/out/repl/components/HistoryOverlay.js +26 -10
- package/out/repl/components/HistoryOverlay.js.map +1 -1
- package/out/repl/hooks/useHistory.d.ts +32 -12
- package/out/repl/hooks/useHistory.d.ts.map +1 -1
- package/out/repl/hooks/useHistory.js +152 -100
- package/out/repl/hooks/useHistory.js.map +1 -1
- package/package.json +4 -1
- package/patches/ink-text-input+6.0.0.patch +39 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testany/hephos",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
4
4
|
"description": "Hephos - full CLI+REPL bundle for multi-agent conversation orchestration (depends on agent-chatter core)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./out/cli.js",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"ink-text-input": "^6.0.0",
|
|
33
33
|
"inquirer": "^9.3.8",
|
|
34
34
|
"inquirer-autocomplete-standalone": "^0.8.1",
|
|
35
|
+
"patch-package": "^8.0.1",
|
|
35
36
|
"react": "^19.2.0"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
"vitest": "^4.0.9"
|
|
43
44
|
},
|
|
44
45
|
"scripts": {
|
|
46
|
+
"postinstall": "patch-package",
|
|
45
47
|
"build": "tsc",
|
|
46
48
|
"build:watch": "tsc --watch",
|
|
47
49
|
"test": "vitest run",
|
|
@@ -53,6 +55,7 @@
|
|
|
53
55
|
},
|
|
54
56
|
"files": [
|
|
55
57
|
"out/**/*",
|
|
58
|
+
"patches/**/*",
|
|
56
59
|
"LICENSE",
|
|
57
60
|
"README.md"
|
|
58
61
|
],
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
diff --git a/node_modules/ink-text-input/build/index.js b/node_modules/ink-text-input/build/index.js
|
|
2
|
+
index ada7cdc..822b1af 100644
|
|
3
|
+
--- a/node_modules/ink-text-input/build/index.js
|
|
4
|
+
+++ b/node_modules/ink-text-input/build/index.js
|
|
5
|
+
@@ -73,11 +73,29 @@ function TextInput({ value: originalValue, placeholder = '', focus = true, mask,
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
else if (key.backspace || key.delete) {
|
|
9
|
+
- if (cursorOffset > 0) {
|
|
10
|
+
- nextValue =
|
|
11
|
+
- originalValue.slice(0, cursorOffset - 1) +
|
|
12
|
+
- originalValue.slice(cursorOffset, originalValue.length);
|
|
13
|
+
- nextCursorOffset--;
|
|
14
|
+
+ // ink maps keys incorrectly: \x7f (actual Backspace) -> key.delete, \b (Ctrl+H) -> key.backspace
|
|
15
|
+
+ // Real Delete key sends escape sequence [3~ which ink also maps to key.delete
|
|
16
|
+
+ // We detect actual Backspace by checking if input is \x7f (DEL character)
|
|
17
|
+
+ const isActualBackspace = key.delete && input === '\x7f';
|
|
18
|
+
+ const isCtrlH = key.backspace; // \b maps to key.backspace
|
|
19
|
+
+
|
|
20
|
+
+ if (isActualBackspace || isCtrlH) {
|
|
21
|
+
+ // Backspace: delete character BEFORE cursor
|
|
22
|
+
+ if (cursorOffset > 0) {
|
|
23
|
+
+ nextValue =
|
|
24
|
+
+ originalValue.slice(0, cursorOffset - 1) +
|
|
25
|
+
+ originalValue.slice(cursorOffset, originalValue.length);
|
|
26
|
+
+ nextCursorOffset--;
|
|
27
|
+
+ }
|
|
28
|
+
+ }
|
|
29
|
+
+ else if (key.delete) {
|
|
30
|
+
+ // Forward delete (real Delete key via [3~): delete character AT cursor position
|
|
31
|
+
+ if (cursorOffset < originalValue.length) {
|
|
32
|
+
+ nextValue =
|
|
33
|
+
+ originalValue.slice(0, cursorOffset) +
|
|
34
|
+
+ originalValue.slice(cursorOffset + 1, originalValue.length);
|
|
35
|
+
+ // Cursor position stays the same
|
|
36
|
+
+ }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else {
|