@ww_nero/mini-cli 1.0.56 → 1.0.57
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 +1 -1
- package/src/config.js +6 -7
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -39,9 +39,11 @@ const COMPACT_SUMMARY_PROMPT = `请对以下对话进行总结,用于上下文
|
|
|
39
39
|
- 用户最后一次请求的具体内容
|
|
40
40
|
|
|
41
41
|
请确保总结完整、准确,以便在压缩后能够继续完成用户的任务。`;
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
const detectCommandPath = () => {
|
|
43
|
+
if (process.platform === 'win32') return 'C:/Windows/System32/wsl.exe';
|
|
44
|
+
if (process.platform === 'darwin') return '/bin/zsh';
|
|
45
|
+
return '/bin/bash';
|
|
46
|
+
};
|
|
45
47
|
|
|
46
48
|
const DEFAULT_CHAT_ENDPOINTS = [
|
|
47
49
|
{
|
|
@@ -83,7 +85,6 @@ const DEFAULT_SETTINGS = {
|
|
|
83
85
|
mcpServers: {},
|
|
84
86
|
tools: {},
|
|
85
87
|
commands: [],
|
|
86
|
-
commandPath: DEFAULT_COMMAND_PATH,
|
|
87
88
|
maxToolTokens: DEFAULT_MAX_TOOL_TOKENS,
|
|
88
89
|
compactTokenThreshold: DEFAULT_COMPACT_TOKEN_THRESHOLD,
|
|
89
90
|
allowedCommands: [...DEFAULT_ALLOWED_COMMANDS]
|
|
@@ -330,9 +331,7 @@ const loadSettings = ({ defaultTools = [] } = {}) => {
|
|
|
330
331
|
return defaultTools.filter((name) => toolConfig[name] !== false);
|
|
331
332
|
})(),
|
|
332
333
|
commands: ensureArrayOfStrings(parsed.commands),
|
|
333
|
-
commandPath:
|
|
334
|
-
? parsed.commandPath.trim()
|
|
335
|
-
: DEFAULT_COMMAND_PATH,
|
|
334
|
+
commandPath: detectCommandPath(),
|
|
336
335
|
maxToolTokens: normalizePositiveInteger(
|
|
337
336
|
parsed.maxToolTokens,
|
|
338
337
|
DEFAULT_MAX_TOOL_TOKENS
|