@miphamai/cli 0.85.34 → 0.85.36
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 +4 -4
- package/package.json +1 -1
- package/src/commands/environment.ts +53 -69
- package/src/commands/git.ts +53 -16
- package/src/commands/keys.ts +28 -17
- package/src/commands/project.ts +10 -17
- package/src/commands/workflow-view.ts +24 -6
- package/src/core/context.ts +22 -5
- package/src/core/engine.ts +32 -5
- package/src/core/hooks-config.ts +32 -0
- package/src/core/improvement-track.ts +37 -1
- package/src/core/memory/memory-loader.ts +2 -2
- package/src/core/meta-rule-engine.ts +3 -1
- package/src/core/rule-engine.ts +11 -5
- package/src/core/session-log.ts +14 -6
- package/src/core/task-performance.ts +41 -0
- package/src/daemon/attach-protocol.ts +25 -0
- package/src/daemon/engine-capabilities.ts +124 -2
- package/src/daemon/remote-engine.ts +161 -4
- package/src/daemon/server.ts +13 -1
- package/src/daemon/session-worker.ts +50 -0
- package/src/i18n-core/detect.ts +16 -4
- package/src/i18n-core/locales/en-US.json +7 -5
- package/src/i18n-core/locales/zh-CN.json +7 -5
- package/src/i18n-core/preference.ts +55 -0
- package/src/index.tsx +3 -2
- package/src/mcp/registry.ts +29 -1
- package/src/shared/package-info.ts +3 -3
- package/src/tools/exec/git.ts +82 -0
- package/src/ui/app.tsx +26 -19
- package/src/ui/commands.ts +527 -100
- package/src/ui/strip-indent.ts +9 -4
package/src/ui/strip-indent.ts
CHANGED
|
@@ -6,10 +6,15 @@ export function stripIndent(strings: TemplateStringsArray, ...values: unknown[])
|
|
|
6
6
|
let result = strings.reduce((acc, s, i) => acc + s + (values[i] ?? ''), '')
|
|
7
7
|
// Remove leading newline
|
|
8
8
|
result = result.replace(/^\n/, '')
|
|
9
|
-
//
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
// Minimum indent across non-empty lines. Taking the FIRST line's indent (the
|
|
10
|
+
// old behaviour) chops characters off every interpolated line that was
|
|
11
|
+
// indented less — `join('\n')` values lost their first letters on lines 2..n.
|
|
12
|
+
const indents = result
|
|
13
|
+
.split('\n')
|
|
14
|
+
.filter((line) => line.trim() !== '')
|
|
15
|
+
.map((line) => line.match(/^ */)![0].length)
|
|
16
|
+
const indent = indents.length > 0 ? Math.min(...indents) : 0
|
|
17
|
+
if (indent > 0) {
|
|
13
18
|
result = result
|
|
14
19
|
.split('\n')
|
|
15
20
|
.map((line) => line.slice(indent))
|