@ww_nero/mini-cli 1.0.80 → 1.0.82
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 +40 -40
- package/package.json +38 -38
- package/src/chat.js +1150 -1150
- package/src/config.js +342 -387
- package/src/index.js +39 -39
- package/src/llm.js +147 -147
- package/src/prompt/tool.js +18 -18
- package/src/request.js +338 -328
- package/src/tools/bash.js +144 -144
- package/src/tools/edit.js +137 -137
- package/src/tools/index.js +74 -74
- package/src/tools/mcp.js +503 -503
- package/src/tools/read.js +44 -44
- package/src/tools/skills.js +49 -49
- package/src/tools/todos.js +90 -90
- package/src/tools/write.js +66 -66
- package/src/utils/cliOptions.js +9 -9
- package/src/utils/git.js +89 -89
- package/src/utils/history.js +181 -181
- package/src/utils/model.js +131 -131
- package/src/utils/output.js +75 -75
- package/src/utils/renderer.js +102 -102
- package/src/utils/settings.js +77 -77
- package/src/utils/skills.js +250 -250
- package/src/utils/think.js +214 -214
package/src/tools/read.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
const { resolveWorkspacePath, readTextFile } = require('../utils/helpers');
|
|
2
|
-
|
|
3
|
-
const readFile = async ({ filePath } = {}, context = {}) => {
|
|
4
|
-
if (!filePath || typeof filePath !== 'string') {
|
|
5
|
-
return 'filePath 参数不能为空';
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
let absolutePath;
|
|
9
|
-
try {
|
|
10
|
-
absolutePath = resolveWorkspacePath(context.workspaceRoot, filePath);
|
|
11
|
-
} catch (error) {
|
|
12
|
-
return `无效路径: ${error.message}`;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
try {
|
|
16
|
-
return await readTextFile(absolutePath);
|
|
17
|
-
} catch (error) {
|
|
18
|
-
return `读取失败 ${filePath}: ${error.message}`;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const schema = {
|
|
23
|
-
type: 'function',
|
|
24
|
-
function: {
|
|
25
|
-
name: 'read',
|
|
26
|
-
description: '读取指定相对路径的文本类文件完整内容,不支持二进制文件',
|
|
27
|
-
parameters: {
|
|
28
|
-
type: 'object',
|
|
29
|
-
properties: {
|
|
30
|
-
filePath: {
|
|
31
|
-
type: 'string',
|
|
32
|
-
description: '文本文件的相对路径,例如 src/App.js'
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
required: ['filePath']
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
module.exports = {
|
|
41
|
-
name: 'read',
|
|
42
|
-
schema,
|
|
43
|
-
handler: readFile
|
|
44
|
-
};
|
|
1
|
+
const { resolveWorkspacePath, readTextFile } = require('../utils/helpers');
|
|
2
|
+
|
|
3
|
+
const readFile = async ({ filePath } = {}, context = {}) => {
|
|
4
|
+
if (!filePath || typeof filePath !== 'string') {
|
|
5
|
+
return 'filePath 参数不能为空';
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
let absolutePath;
|
|
9
|
+
try {
|
|
10
|
+
absolutePath = resolveWorkspacePath(context.workspaceRoot, filePath);
|
|
11
|
+
} catch (error) {
|
|
12
|
+
return `无效路径: ${error.message}`;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
return await readTextFile(absolutePath);
|
|
17
|
+
} catch (error) {
|
|
18
|
+
return `读取失败 ${filePath}: ${error.message}`;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const schema = {
|
|
23
|
+
type: 'function',
|
|
24
|
+
function: {
|
|
25
|
+
name: 'read',
|
|
26
|
+
description: '读取指定相对路径的文本类文件完整内容,不支持二进制文件',
|
|
27
|
+
parameters: {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
filePath: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: '文本文件的相对路径,例如 src/App.js'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
required: ['filePath']
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
module.exports = {
|
|
41
|
+
name: 'read',
|
|
42
|
+
schema,
|
|
43
|
+
handler: readFile
|
|
44
|
+
};
|
package/src/tools/skills.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
const { readSkillFile, toDisplayPath, SKILL_ENTRY_FILE } = require('../utils/skills');
|
|
2
|
-
|
|
3
|
-
const handler = async ({ skillName, filePath } = {}) => {
|
|
4
|
-
try {
|
|
5
|
-
const result = readSkillFile({
|
|
6
|
-
skillName,
|
|
7
|
-
filePath
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
success: true,
|
|
12
|
-
skillsRoot: toDisplayPath(result.skillsRoot),
|
|
13
|
-
skillName: result.skillName,
|
|
14
|
-
filePath: result.filePath,
|
|
15
|
-
absolutePath: result.absoluteFilePath,
|
|
16
|
-
content: result.content
|
|
17
|
-
};
|
|
18
|
-
} catch (error) {
|
|
19
|
-
return `读取 skill 失败:${error.message}`;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const schema = {
|
|
24
|
-
type: 'function',
|
|
25
|
-
function: {
|
|
26
|
-
name: 'skills',
|
|
27
|
-
description: '读取 ~/.mini/skills 下指定 skill 的文件内容(默认入口文件为 SKILL.md)',
|
|
28
|
-
parameters: {
|
|
29
|
-
type: 'object',
|
|
30
|
-
properties: {
|
|
31
|
-
skillName: {
|
|
32
|
-
type: 'string',
|
|
33
|
-
description: 'skill 名称'
|
|
34
|
-
},
|
|
35
|
-
filePath: {
|
|
36
|
-
type: 'string',
|
|
37
|
-
description: `相对于 skill 目录的文件路径,默认 ${SKILL_ENTRY_FILE}`
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
required: ['skillName']
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
module.exports = {
|
|
46
|
-
name: 'skills',
|
|
47
|
-
schema,
|
|
48
|
-
handler
|
|
49
|
-
};
|
|
1
|
+
const { readSkillFile, toDisplayPath, SKILL_ENTRY_FILE } = require('../utils/skills');
|
|
2
|
+
|
|
3
|
+
const handler = async ({ skillName, filePath } = {}) => {
|
|
4
|
+
try {
|
|
5
|
+
const result = readSkillFile({
|
|
6
|
+
skillName,
|
|
7
|
+
filePath
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
success: true,
|
|
12
|
+
skillsRoot: toDisplayPath(result.skillsRoot),
|
|
13
|
+
skillName: result.skillName,
|
|
14
|
+
filePath: result.filePath,
|
|
15
|
+
absolutePath: result.absoluteFilePath,
|
|
16
|
+
content: result.content
|
|
17
|
+
};
|
|
18
|
+
} catch (error) {
|
|
19
|
+
return `读取 skill 失败:${error.message}`;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const schema = {
|
|
24
|
+
type: 'function',
|
|
25
|
+
function: {
|
|
26
|
+
name: 'skills',
|
|
27
|
+
description: '读取 ~/.mini/skills 下指定 skill 的文件内容(默认入口文件为 SKILL.md)',
|
|
28
|
+
parameters: {
|
|
29
|
+
type: 'object',
|
|
30
|
+
properties: {
|
|
31
|
+
skillName: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'skill 名称'
|
|
34
|
+
},
|
|
35
|
+
filePath: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: `相对于 skill 目录的文件路径,默认 ${SKILL_ENTRY_FILE}`
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
required: ['skillName']
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
module.exports = {
|
|
46
|
+
name: 'skills',
|
|
47
|
+
schema,
|
|
48
|
+
handler
|
|
49
|
+
};
|
package/src/tools/todos.js
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
const chalk = require('chalk');
|
|
2
|
-
|
|
3
|
-
const STATUS_EMOJI = {
|
|
4
|
-
pending: '⬜',
|
|
5
|
-
in_progress: '🕒',
|
|
6
|
-
completed: '✅'
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const formatTodosList = (todos = []) => {
|
|
10
|
-
if (!Array.isArray(todos) || todos.length === 0) {
|
|
11
|
-
return '暂无待办事项';
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const lines = todos.map(item => {
|
|
15
|
-
const emoji = STATUS_EMOJI[item.status] || STATUS_EMOJI.pending;
|
|
16
|
-
const content = String(item.content || '').replace(/\s+/g, ' ').trim();
|
|
17
|
-
return `${emoji} ${content}`;
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
return `${lines.join('\n')}`;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const validateTodos = (todos) => {
|
|
24
|
-
if (!Array.isArray(todos)) {
|
|
25
|
-
return 'todos 必须是数组';
|
|
26
|
-
}
|
|
27
|
-
for (const item of todos) {
|
|
28
|
-
if (!item || typeof item !== 'object') {
|
|
29
|
-
return 'todos 中的每一项必须是对象';
|
|
30
|
-
}
|
|
31
|
-
if (!item.id || !item.content || !item.status) {
|
|
32
|
-
return '每个待办事项必须包含 id/content/status';
|
|
33
|
-
}
|
|
34
|
-
if (!['pending', 'in_progress', 'completed'].includes(item.status)) {
|
|
35
|
-
return 'status 仅支持 pending/in_progress/completed';
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return null;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
let lastTodos = [];
|
|
42
|
-
|
|
43
|
-
const writeTodos = async ({ todos } = {}) => {
|
|
44
|
-
const error = validateTodos(todos);
|
|
45
|
-
if (error) {
|
|
46
|
-
return error;
|
|
47
|
-
}
|
|
48
|
-
lastTodos = todos;
|
|
49
|
-
const formatted = formatTodosList(todos);
|
|
50
|
-
return formatted;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const schema = {
|
|
54
|
-
type: 'function',
|
|
55
|
-
function: {
|
|
56
|
-
name: 'todos',
|
|
57
|
-
description: '更新任务列表(创建、修改、完成)',
|
|
58
|
-
parameters: {
|
|
59
|
-
type: 'object',
|
|
60
|
-
properties: {
|
|
61
|
-
todos: {
|
|
62
|
-
type: 'array',
|
|
63
|
-
items: {
|
|
64
|
-
type: 'object',
|
|
65
|
-
properties: {
|
|
66
|
-
id: { type: 'string' },
|
|
67
|
-
content: { type: 'string' },
|
|
68
|
-
status: {
|
|
69
|
-
type: 'string',
|
|
70
|
-
enum: ['pending', 'in_progress', 'completed']
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
required: ['id', 'content', 'status']
|
|
74
|
-
},
|
|
75
|
-
description: '完整的待办事项数组'
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
required: ['todos']
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
const getLastTodos = () => lastTodos;
|
|
84
|
-
|
|
85
|
-
module.exports = {
|
|
86
|
-
name: 'todos',
|
|
87
|
-
schema,
|
|
88
|
-
handler: writeTodos,
|
|
89
|
-
getLastTodos
|
|
90
|
-
};
|
|
1
|
+
const chalk = require('chalk');
|
|
2
|
+
|
|
3
|
+
const STATUS_EMOJI = {
|
|
4
|
+
pending: '⬜',
|
|
5
|
+
in_progress: '🕒',
|
|
6
|
+
completed: '✅'
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const formatTodosList = (todos = []) => {
|
|
10
|
+
if (!Array.isArray(todos) || todos.length === 0) {
|
|
11
|
+
return '暂无待办事项';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const lines = todos.map(item => {
|
|
15
|
+
const emoji = STATUS_EMOJI[item.status] || STATUS_EMOJI.pending;
|
|
16
|
+
const content = String(item.content || '').replace(/\s+/g, ' ').trim();
|
|
17
|
+
return `${emoji} ${content}`;
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
return `${lines.join('\n')}`;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const validateTodos = (todos) => {
|
|
24
|
+
if (!Array.isArray(todos)) {
|
|
25
|
+
return 'todos 必须是数组';
|
|
26
|
+
}
|
|
27
|
+
for (const item of todos) {
|
|
28
|
+
if (!item || typeof item !== 'object') {
|
|
29
|
+
return 'todos 中的每一项必须是对象';
|
|
30
|
+
}
|
|
31
|
+
if (!item.id || !item.content || !item.status) {
|
|
32
|
+
return '每个待办事项必须包含 id/content/status';
|
|
33
|
+
}
|
|
34
|
+
if (!['pending', 'in_progress', 'completed'].includes(item.status)) {
|
|
35
|
+
return 'status 仅支持 pending/in_progress/completed';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
let lastTodos = [];
|
|
42
|
+
|
|
43
|
+
const writeTodos = async ({ todos } = {}) => {
|
|
44
|
+
const error = validateTodos(todos);
|
|
45
|
+
if (error) {
|
|
46
|
+
return error;
|
|
47
|
+
}
|
|
48
|
+
lastTodos = todos;
|
|
49
|
+
const formatted = formatTodosList(todos);
|
|
50
|
+
return formatted;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const schema = {
|
|
54
|
+
type: 'function',
|
|
55
|
+
function: {
|
|
56
|
+
name: 'todos',
|
|
57
|
+
description: '更新任务列表(创建、修改、完成)',
|
|
58
|
+
parameters: {
|
|
59
|
+
type: 'object',
|
|
60
|
+
properties: {
|
|
61
|
+
todos: {
|
|
62
|
+
type: 'array',
|
|
63
|
+
items: {
|
|
64
|
+
type: 'object',
|
|
65
|
+
properties: {
|
|
66
|
+
id: { type: 'string' },
|
|
67
|
+
content: { type: 'string' },
|
|
68
|
+
status: {
|
|
69
|
+
type: 'string',
|
|
70
|
+
enum: ['pending', 'in_progress', 'completed']
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
required: ['id', 'content', 'status']
|
|
74
|
+
},
|
|
75
|
+
description: '完整的待办事项数组'
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
required: ['todos']
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const getLastTodos = () => lastTodos;
|
|
84
|
+
|
|
85
|
+
module.exports = {
|
|
86
|
+
name: 'todos',
|
|
87
|
+
schema,
|
|
88
|
+
handler: writeTodos,
|
|
89
|
+
getLastTodos
|
|
90
|
+
};
|
package/src/tools/write.js
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
const { resolveWorkspacePath, writeTextFile } = require('../utils/helpers');
|
|
2
|
-
|
|
3
|
-
const countLines = (text = '') => {
|
|
4
|
-
if (!text) return 0;
|
|
5
|
-
const normalized = text.replace(/\r/g, '');
|
|
6
|
-
const newlineMatches = normalized.match(/\n/g);
|
|
7
|
-
const newlineCount = Array.isArray(newlineMatches) ? newlineMatches.length : 0;
|
|
8
|
-
const endsWithNewline = normalized.endsWith('\n');
|
|
9
|
-
return endsWithNewline ? newlineCount : newlineCount + 1;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const writeFile = async ({ filePath, content } = {}, context = {}) => {
|
|
13
|
-
if (!filePath || typeof filePath !== 'string') {
|
|
14
|
-
return 'filePath 参数不能为空';
|
|
15
|
-
}
|
|
16
|
-
if (typeof content !== 'string') {
|
|
17
|
-
return 'content 必须是字符串';
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
let absolutePath;
|
|
21
|
-
try {
|
|
22
|
-
absolutePath = resolveWorkspacePath(context.workspaceRoot, filePath);
|
|
23
|
-
} catch (error) {
|
|
24
|
-
return `无效路径: ${error.message}`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
await writeTextFile(absolutePath, content);
|
|
29
|
-
return {
|
|
30
|
-
success: true,
|
|
31
|
-
message: `写入成功: ${filePath}`,
|
|
32
|
-
content,
|
|
33
|
-
lineCount: countLines(content)
|
|
34
|
-
};
|
|
35
|
-
} catch (error) {
|
|
36
|
-
return `写入失败 ${filePath}: ${error.message}`;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const schema = {
|
|
41
|
-
type: 'function',
|
|
42
|
-
function: {
|
|
43
|
-
name: 'write',
|
|
44
|
-
description: '向文件写入完整内容(不存在则创建)',
|
|
45
|
-
parameters: {
|
|
46
|
-
type: 'object',
|
|
47
|
-
properties: {
|
|
48
|
-
filePath: {
|
|
49
|
-
type: 'string',
|
|
50
|
-
description: '文件的相对路径'
|
|
51
|
-
},
|
|
52
|
-
content: {
|
|
53
|
-
type: 'string',
|
|
54
|
-
description: '写入的完整内容'
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
required: ['filePath', 'content']
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
module.exports = {
|
|
63
|
-
name: 'write',
|
|
64
|
-
schema,
|
|
65
|
-
handler: writeFile
|
|
66
|
-
};
|
|
1
|
+
const { resolveWorkspacePath, writeTextFile } = require('../utils/helpers');
|
|
2
|
+
|
|
3
|
+
const countLines = (text = '') => {
|
|
4
|
+
if (!text) return 0;
|
|
5
|
+
const normalized = text.replace(/\r/g, '');
|
|
6
|
+
const newlineMatches = normalized.match(/\n/g);
|
|
7
|
+
const newlineCount = Array.isArray(newlineMatches) ? newlineMatches.length : 0;
|
|
8
|
+
const endsWithNewline = normalized.endsWith('\n');
|
|
9
|
+
return endsWithNewline ? newlineCount : newlineCount + 1;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const writeFile = async ({ filePath, content } = {}, context = {}) => {
|
|
13
|
+
if (!filePath || typeof filePath !== 'string') {
|
|
14
|
+
return 'filePath 参数不能为空';
|
|
15
|
+
}
|
|
16
|
+
if (typeof content !== 'string') {
|
|
17
|
+
return 'content 必须是字符串';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
let absolutePath;
|
|
21
|
+
try {
|
|
22
|
+
absolutePath = resolveWorkspacePath(context.workspaceRoot, filePath);
|
|
23
|
+
} catch (error) {
|
|
24
|
+
return `无效路径: ${error.message}`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
await writeTextFile(absolutePath, content);
|
|
29
|
+
return {
|
|
30
|
+
success: true,
|
|
31
|
+
message: `写入成功: ${filePath}`,
|
|
32
|
+
content,
|
|
33
|
+
lineCount: countLines(content)
|
|
34
|
+
};
|
|
35
|
+
} catch (error) {
|
|
36
|
+
return `写入失败 ${filePath}: ${error.message}`;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const schema = {
|
|
41
|
+
type: 'function',
|
|
42
|
+
function: {
|
|
43
|
+
name: 'write',
|
|
44
|
+
description: '向文件写入完整内容(不存在则创建)',
|
|
45
|
+
parameters: {
|
|
46
|
+
type: 'object',
|
|
47
|
+
properties: {
|
|
48
|
+
filePath: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: '文件的相对路径'
|
|
51
|
+
},
|
|
52
|
+
content: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
description: '写入的完整内容'
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
required: ['filePath', 'content']
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
module.exports = {
|
|
63
|
+
name: 'write',
|
|
64
|
+
schema,
|
|
65
|
+
handler: writeFile
|
|
66
|
+
};
|
package/src/utils/cliOptions.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const CLI_OPTIONS = [
|
|
2
|
-
{ flags: '-i, --input <text>', description: '启动后先发送一条问题' },
|
|
3
|
-
{ flags: '-m, --model <name>', description: '指定启动模型名称(等同于运行 /model <name>)' },
|
|
4
|
-
{ flags: '-r, --resume', description: '启动时自动恢复最近一条历史会话' }
|
|
5
|
-
];
|
|
6
|
-
|
|
7
|
-
module.exports = {
|
|
8
|
-
CLI_OPTIONS
|
|
9
|
-
};
|
|
1
|
+
const CLI_OPTIONS = [
|
|
2
|
+
{ flags: '-i, --input <text>', description: '启动后先发送一条问题' },
|
|
3
|
+
{ flags: '-m, --model <name>', description: '指定启动模型名称(等同于运行 /model <name>)' },
|
|
4
|
+
{ flags: '-r, --resume', description: '启动时自动恢复最近一条历史会话' }
|
|
5
|
+
];
|
|
6
|
+
|
|
7
|
+
module.exports = {
|
|
8
|
+
CLI_OPTIONS
|
|
9
|
+
};
|