@miphamai/cli 0.85.16 → 0.85.17

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Mipham Code v0.85.16
1
+ # Mipham Code v0.85.17
2
2
 
3
3
  **Multi-model open-core intelligent coding terminal** — 12 AI providers, 137 commands, 31 tools, 28 skills + marketplace, self-update. AI-assisted code generation, security auditing, MCP protocol, and extensible skills — in a single CLI.
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miphamai/cli",
3
- "version": "0.85.16",
3
+ "version": "0.85.17",
4
4
  "description": "Mipham Code — Multi-model open-core intelligent coding terminal by MiphamAI",
5
5
  "keywords": [
6
6
  "ai",
@@ -9,7 +9,7 @@
9
9
  export const PACKAGE_NAME = '@miphamai/cli' as const
10
10
 
11
11
  /** 当前发布版本 */
12
- export const PACKAGE_VERSION = '0.85.16' as const
12
+ export const PACKAGE_VERSION = '0.85.17' as const
13
13
 
14
14
  /** npm install 全局安装命令 */
15
15
  export const NPM_INSTALL_COMMAND = `npm install -g ${PACKAGE_NAME}` as const
@@ -90,4 +90,4 @@ export const TOOL_COUNT = 31 as const
90
90
  * —— `test/e2e/full-pipeline.test.ts` 在 Linux 上整文件 skip、在 macOS 上跑 ——
91
91
  * 但**总数相同**(两边都把被 skip 的算进去)。
92
92
  */
93
- export const TEST_COUNT = 4019 as const
93
+ export const TEST_COUNT = 4020 as const
@@ -254,8 +254,14 @@ export function sanitizeInlineField(input: string): string {
254
254
  * else: right for a name in a listing, wrong for a command's output, which is
255
255
  * legitimately multi-line. This is the same recipe minus that one character.
256
256
  *
257
- * `\t` and `\n` are exactly what stays. Neither can move the cursor backwards or
258
- * begin an escape sequence. Everything else goes, ESC and DEL included, so a file
257
+ * `\n` is what stays — a line break, whose width is measured line by line. `\t` does
258
+ * **not** stay: Ink lays text out with `string-width`, which scores a tab as **0
259
+ * columns**, then writes the tab through to the frame, while the terminal advances a
260
+ * tab to the next tab stop (up to +8 columns). The row ends up wider than the width
261
+ * Ink budgeted and draws over the row below. That a tab cannot move the cursor
262
+ * *backwards* or open an escape sequence is the wrong test — its danger is advancing
263
+ * *unknowingly*. So `\t` → a single space, the same move `stripControlCharsForCheck`
264
+ * makes, so words do not merge. Everything else goes, ESC and DEL included, so a file
259
265
  * name or a `printf` payload cannot reach the terminal as CR (overwrite the line —
260
266
  * `printf 'safe.txt\rrm -rf /'` shows the second half), BEL, or a CSI/OSC
261
267
  * introducer. C1 (U+0080–U+009F) goes with them: its 8-bit CSI is the same
@@ -272,7 +278,12 @@ export function sanitizeInlineField(input: string): string {
272
278
  */
273
279
  export function stripControlCharsForDisplay(input: string): string {
274
280
  if (!input) return input
275
- return stripDangerousUnicode(input).replace(/[\x00-\x08\x0b-\x1f\x7f\x80-\x9f]/g, '')
281
+ return (
282
+ stripDangerousUnicode(input)
283
+ // `\t` first (→ space), so it cannot reach the terminal as a tab stop jump.
284
+ .replace(/\t/g, ' ')
285
+ .replace(/[\x00-\x08\x0b-\x1f\x7f\x80-\x9f]/g, '')
286
+ )
276
287
  }
277
288
 
278
289
  /**