@zhongqian97-code/ecode 0.5.38 → 0.5.39
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/{chunk-GR5MASXF.js → chunk-3H2EMIKF.js} +1 -1
- package/dist/{chunk-7DHMJ6NS.js → chunk-C6OEWQCD.js} +1 -1
- package/dist/{chunk-O4YFKL3N.js → chunk-LAAABQR4.js} +11 -1
- package/dist/index.js +5 -5
- package/dist/{ui-XL5IDLH5.js → ui-FSBOFWL3.js} +2 -2
- package/dist/{web-7WWKTWTB.js → web-L77TJPHI.js} +2 -2
- package/package.json +1 -1
|
@@ -5,6 +5,12 @@ const _ew=process.emitWarning.bind(process);process.emitWarning=function(w,...a)
|
|
|
5
5
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "fs";
|
|
6
6
|
import { homedir } from "os";
|
|
7
7
|
import { join } from "path";
|
|
8
|
+
function expandTilde(p) {
|
|
9
|
+
if (p === "~" || p.startsWith("~/") || p.startsWith("~\\")) {
|
|
10
|
+
return join(homedir(), p.slice(1));
|
|
11
|
+
}
|
|
12
|
+
return p;
|
|
13
|
+
}
|
|
8
14
|
var MODEL_CONTEXT_LIMITS = {
|
|
9
15
|
// OpenAI GPT 系列
|
|
10
16
|
"gpt-4o": 128e3,
|
|
@@ -87,7 +93,11 @@ function loadConfig() {
|
|
|
87
93
|
// 容易引入歧义,因此仅支持配置文件覆盖
|
|
88
94
|
dangerousPatterns: fileConfig.dangerousPatterns ?? DEFAULTS.dangerousPatterns,
|
|
89
95
|
// logDir: ECODE_LOG_DIR 环境变量 > 配置文件 > undefined(禁用日志)
|
|
90
|
-
|
|
96
|
+
// expandTilde 将 ~ 替换为 homedir(),Node.js 不执行 shell 的 ~ 展开
|
|
97
|
+
logDir: (() => {
|
|
98
|
+
const raw = process.env.ECODE_LOG_DIR ?? fileConfig.logDir ?? DEFAULTS.logDir;
|
|
99
|
+
return raw ? expandTilde(raw) : raw;
|
|
100
|
+
})(),
|
|
91
101
|
// contextLimit 仅支持配置文件配置:数值类型在文件中更直观,
|
|
92
102
|
// 环境变量还需要 parseInt 转换,增加出错风险
|
|
93
103
|
contextLimit: fileConfig.contextLimit,
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
cmdSessionsInspect,
|
|
6
6
|
cmdSessionsList,
|
|
7
7
|
cmdSessionsReplay
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3H2EMIKF.js";
|
|
9
9
|
import {
|
|
10
10
|
APPLY_PATCH_TOOL,
|
|
11
11
|
BASH_TOOL,
|
|
@@ -34,14 +34,14 @@ import {
|
|
|
34
34
|
todo,
|
|
35
35
|
webFetch,
|
|
36
36
|
writeFile
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-C6OEWQCD.js";
|
|
38
38
|
import {
|
|
39
39
|
createSessionMetadata,
|
|
40
40
|
generateTitle,
|
|
41
41
|
loadConfig,
|
|
42
42
|
updateSessionMetadata,
|
|
43
43
|
writeSessionMetadata
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-LAAABQR4.js";
|
|
45
45
|
|
|
46
46
|
// src/index.ts
|
|
47
47
|
import { createRequire } from "module";
|
|
@@ -810,7 +810,7 @@ if (rawArgs[0] === "web") {
|
|
|
810
810
|
webAutoApprove = true;
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
|
-
const { buildServer, generateAccessToken } = await import("./web-
|
|
813
|
+
const { buildServer, generateAccessToken } = await import("./web-L77TJPHI.js");
|
|
814
814
|
const token = generateAccessToken();
|
|
815
815
|
const manager = new SessionManager(finalConfig);
|
|
816
816
|
const server = await buildServer({
|
|
@@ -905,6 +905,6 @@ Node.js 16/18 \u8BF7\u4F7F\u7528 --web \u6216 --pipe \u6A21\u5F0F\u3002
|
|
|
905
905
|
);
|
|
906
906
|
process.exit(1);
|
|
907
907
|
}
|
|
908
|
-
const { App, React, render } = await import("./ui-
|
|
908
|
+
const { App, React, render } = await import("./ui-FSBOFWL3.js");
|
|
909
909
|
render(React.createElement(App, { config: finalConfig, version: VERSION, autoMode, registry, trustedSkillDirs, initialMessages }));
|
|
910
910
|
}
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
todo,
|
|
27
27
|
webFetch,
|
|
28
28
|
writeFile
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-C6OEWQCD.js";
|
|
30
30
|
import {
|
|
31
31
|
loadJobs,
|
|
32
32
|
removeJob,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
getContextLimit,
|
|
39
39
|
updateSessionMetadata,
|
|
40
40
|
writeSessionMetadata
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-LAAABQR4.js";
|
|
42
42
|
|
|
43
43
|
// src/ui/index.ts
|
|
44
44
|
import { default as default2 } from "react";
|
|
@@ -3,7 +3,7 @@ const _ew=process.emitWarning.bind(process);process.emitWarning=function(w,...a)
|
|
|
3
3
|
import {
|
|
4
4
|
cmdSessionsFork,
|
|
5
5
|
cmdSessionsReplay
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3H2EMIKF.js";
|
|
7
7
|
import {
|
|
8
8
|
loadJobs,
|
|
9
9
|
removeJob,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
listSessions,
|
|
16
16
|
loadMessagesFromJsonl,
|
|
17
17
|
saveConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LAAABQR4.js";
|
|
19
19
|
|
|
20
20
|
// src/web/server.ts
|
|
21
21
|
import Fastify from "fastify";
|