@zhongqian97-code/ecode 0.5.39 → 0.5.40
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-LAAABQR4.js → chunk-72HNTRAP.js} +4 -1
- package/dist/{chunk-C6OEWQCD.js → chunk-7RQ4D4K6.js} +1 -1
- package/dist/{chunk-3H2EMIKF.js → chunk-FPB3QTP5.js} +1 -1
- package/dist/index.js +9 -6
- package/dist/{ui-FSBOFWL3.js → ui-3AW6W2SI.js} +2 -2
- package/dist/{web-L77TJPHI.js → web-JLLCAFXF.js} +2 -2
- package/package.json +1 -1
|
@@ -107,7 +107,10 @@ function loadConfig() {
|
|
|
107
107
|
systemPrompt: process.env.ECODE_SYSTEM_PROMPT ?? fileConfig.systemPrompt,
|
|
108
108
|
// providers/defaultProvider 仅支持配置文件配置,不支持环境变量注入
|
|
109
109
|
providers: fileConfig.providers,
|
|
110
|
-
defaultProvider: fileConfig.defaultProvider
|
|
110
|
+
defaultProvider: fileConfig.defaultProvider,
|
|
111
|
+
// ECODE_WEB_TOKEN 环境变量优先;未设时从配置文件读取;
|
|
112
|
+
// 两者均未设时保持 undefined,运行时由 generateAccessToken() 生成随机令牌
|
|
113
|
+
webToken: process.env.ECODE_WEB_TOKEN ?? fileConfig.webToken
|
|
111
114
|
};
|
|
112
115
|
}
|
|
113
116
|
function saveConfig(partial) {
|
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-FPB3QTP5.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-7RQ4D4K6.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-72HNTRAP.js";
|
|
45
45
|
|
|
46
46
|
// src/index.ts
|
|
47
47
|
import { createRequire } from "module";
|
|
@@ -810,8 +810,8 @@ if (rawArgs[0] === "web") {
|
|
|
810
810
|
webAutoApprove = true;
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
|
-
const { buildServer, generateAccessToken } = await import("./web-
|
|
814
|
-
const token = generateAccessToken();
|
|
813
|
+
const { buildServer, generateAccessToken } = await import("./web-JLLCAFXF.js");
|
|
814
|
+
const token = finalConfig.webToken ?? generateAccessToken();
|
|
815
815
|
const manager = new SessionManager(finalConfig);
|
|
816
816
|
const server = await buildServer({
|
|
817
817
|
config: finalConfig,
|
|
@@ -827,6 +827,9 @@ if (rawArgs[0] === "web") {
|
|
|
827
827
|
ecode web admin started`);
|
|
828
828
|
console.log(` Bind: ${webHost}:${webPort}`);
|
|
829
829
|
console.log(` URL: ${accessUrl}`);
|
|
830
|
+
if (finalConfig.webToken) {
|
|
831
|
+
console.log(` Token: fixed (from config)`);
|
|
832
|
+
}
|
|
830
833
|
console.log(`
|
|
831
834
|
Press Ctrl+C to stop.
|
|
832
835
|
`);
|
|
@@ -905,6 +908,6 @@ Node.js 16/18 \u8BF7\u4F7F\u7528 --web \u6216 --pipe \u6A21\u5F0F\u3002
|
|
|
905
908
|
);
|
|
906
909
|
process.exit(1);
|
|
907
910
|
}
|
|
908
|
-
const { App, React, render } = await import("./ui-
|
|
911
|
+
const { App, React, render } = await import("./ui-3AW6W2SI.js");
|
|
909
912
|
render(React.createElement(App, { config: finalConfig, version: VERSION, autoMode, registry, trustedSkillDirs, initialMessages }));
|
|
910
913
|
}
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
todo,
|
|
27
27
|
webFetch,
|
|
28
28
|
writeFile
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-7RQ4D4K6.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-72HNTRAP.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-FPB3QTP5.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-72HNTRAP.js";
|
|
19
19
|
|
|
20
20
|
// src/web/server.ts
|
|
21
21
|
import Fastify from "fastify";
|