@miphamai/cli 0.79.1 → 0.80.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/package.json +5 -5
- package/src/shared/package-info.ts +1 -1
- package/src/ui/input.tsx +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miphamai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.80.0",
|
|
4
4
|
"description": "Mipham Code — Multi-model open-core intelligent coding terminal by MiphamAI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -43,17 +43,17 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@larksuiteoapi/node-sdk": "^1.73.0",
|
|
45
45
|
"commander": "^13.1.0",
|
|
46
|
-
"ink": "^
|
|
46
|
+
"ink": "^7.1.1",
|
|
47
47
|
"ink-text-input": "^6.0.0",
|
|
48
|
-
"react": "^
|
|
49
|
-
"react-devtools-core": "^
|
|
48
|
+
"react": "^19.3.0",
|
|
49
|
+
"react-devtools-core": "^8.0.0",
|
|
50
50
|
"yaml": "^2.9.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@mipham/shared": "workspace:*",
|
|
54
54
|
"@types/bun": "^1.3.14",
|
|
55
55
|
"@types/node": "^22.19.19",
|
|
56
|
-
"@types/react": "^
|
|
56
|
+
"@types/react": "^19.3.0",
|
|
57
57
|
"ink-testing-library": "^4.0.0",
|
|
58
58
|
"vitest": "^4.1.7"
|
|
59
59
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
export const PACKAGE_NAME = '@miphamai/cli' as const
|
|
10
10
|
|
|
11
11
|
/** 当前发布版本 */
|
|
12
|
-
export const PACKAGE_VERSION = '0.
|
|
12
|
+
export const PACKAGE_VERSION = '0.80.0' as const
|
|
13
13
|
|
|
14
14
|
/** npm install 全局安装命令 */
|
|
15
15
|
export const NPM_INSTALL_COMMAND = `npm install -g ${PACKAGE_NAME}` as const
|
package/src/ui/input.tsx
CHANGED
|
@@ -135,10 +135,10 @@ export function applyEdit(state: EditState, action: EditAction): EditState {
|
|
|
135
135
|
* isn't an edit). Extracted from the MiphamTextInput useInput handler so the macOS
|
|
136
136
|
* Backspace quirk is unit-testable.
|
|
137
137
|
*
|
|
138
|
-
* Ink
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
138
|
+
* Ink 7 correctly distinguishes the physical Backspace key (terminal sends \x7f →
|
|
139
|
+
* `key.backspace`) from the forward-Delete key (\x1b[3~ → `key.delete`). Ink 5.2.1
|
|
140
|
+
* misparsed both as `key.delete`, which the old backspace fix worked around by
|
|
141
|
+
* treating `key.delete` as backward-delete.
|
|
142
142
|
*/
|
|
143
143
|
export function keyToEditAction(
|
|
144
144
|
key: { leftArrow?: boolean; rightArrow?: boolean; backspace?: boolean; delete?: boolean },
|
|
@@ -146,7 +146,8 @@ export function keyToEditAction(
|
|
|
146
146
|
): EditAction | null {
|
|
147
147
|
if (key.leftArrow) return { type: 'moveLeft' }
|
|
148
148
|
if (key.rightArrow) return { type: 'moveRight' }
|
|
149
|
-
if (key.backspace
|
|
149
|
+
if (key.backspace) return { type: 'backspace' }
|
|
150
|
+
if (key.delete) return { type: 'delete' }
|
|
150
151
|
const cleaned = normalizeInput(input)
|
|
151
152
|
if (cleaned) return { type: 'insert', text: cleaned }
|
|
152
153
|
return null
|