deeper-cli 1.3.2 → 1.3.3

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 CHANGED
@@ -1,60 +1,60 @@
1
- {
2
- "name": "deeper-cli",
3
- "version": "1.3.2",
4
- "description": "DeeperCode - 一句话生成完整项目的 AI Agentic CLI 工具",
5
- "type": "module",
6
- "bin": {
7
- "deeper": "dist/cli/index.js"
8
- },
9
- "main": "dist/index.js",
10
- "scripts": {
11
- "dev": "tsup --watch",
12
- "build": "tsup",
13
- "start": "node dist/cli/index.js",
14
- "test": "vitest run",
15
- "test:watch": "vitest",
16
- "lint": "eslint src/",
17
- "typecheck": "tsc --noEmit"
18
- },
19
- "keywords": [
20
- "ai",
21
- "agent",
22
- "cli",
23
- "deepseek",
24
- "coding-assistant"
25
- ],
26
- "license": "MIT",
27
- "engines": {
28
- "node": ">=20.0.0"
29
- },
30
- "dependencies": {
31
- "cheerio": "^1.2.0",
32
- "csv-parse": "^6.2.1",
33
- "diff": "^9.0.0",
34
- "fast-glob": "^3.3.3",
35
- "glob": "^13.0.6",
36
- "ink": "^5.2.1",
37
- "mkdirp": "^3.0.1",
38
- "open": "^11.0.0",
39
- "react": "^18.3.1",
40
- "toml": "^4.1.1",
41
- "ws": "^8.20.1",
42
- "yaml": "^2.9.0"
43
- },
44
- "devDependencies": {
45
- "@types/diff": "^7.0.2",
46
- "@types/node": "^25.7.0",
47
- "@types/react": "^19.2.14",
48
- "@types/ws": "^8.18.1",
49
- "tsup": "^8.5.1",
50
- "tsx": "^4.22.0",
51
- "typescript": "^5.9.3",
52
- "vitest": "^4.1.6"
53
- },
54
- "directories": {
55
- "doc": "docs",
56
- "test": "tests"
57
- },
58
- "author": "",
59
- "types": "./dist/index.d.ts"
60
- }
1
+ {
2
+ "name": "deeper-cli",
3
+ "version": "1.3.3",
4
+ "description": "DeeperCode - 一句话生成完整项目的 AI Agentic CLI 工具",
5
+ "type": "module",
6
+ "bin": {
7
+ "deeper": "dist/cli/index.js"
8
+ },
9
+ "main": "dist/index.js",
10
+ "scripts": {
11
+ "dev": "tsup --watch",
12
+ "build": "tsup",
13
+ "start": "node dist/cli/index.js",
14
+ "test": "vitest run",
15
+ "test:watch": "vitest",
16
+ "lint": "eslint src/",
17
+ "typecheck": "tsc --noEmit"
18
+ },
19
+ "keywords": [
20
+ "ai",
21
+ "agent",
22
+ "cli",
23
+ "deepseek",
24
+ "coding-assistant"
25
+ ],
26
+ "license": "MIT",
27
+ "engines": {
28
+ "node": ">=20.0.0"
29
+ },
30
+ "dependencies": {
31
+ "cheerio": "^1.2.0",
32
+ "csv-parse": "^6.2.1",
33
+ "diff": "^9.0.0",
34
+ "fast-glob": "^3.3.3",
35
+ "glob": "^13.0.6",
36
+ "ink": "^5.2.1",
37
+ "mkdirp": "^3.0.1",
38
+ "open": "^11.0.0",
39
+ "react": "^18.3.1",
40
+ "toml": "^4.1.1",
41
+ "ws": "^8.20.1",
42
+ "yaml": "^2.9.0"
43
+ },
44
+ "devDependencies": {
45
+ "@types/diff": "^7.0.2",
46
+ "@types/node": "^25.7.0",
47
+ "@types/react": "^19.2.14",
48
+ "@types/ws": "^8.18.1",
49
+ "tsup": "^8.5.1",
50
+ "tsx": "^4.22.0",
51
+ "typescript": "^5.9.3",
52
+ "vitest": "^4.1.6"
53
+ },
54
+ "directories": {
55
+ "doc": "docs",
56
+ "test": "tests"
57
+ },
58
+ "author": "",
59
+ "types": "./dist/index.d.ts"
60
+ }
@@ -1130,7 +1130,10 @@ async function loadNamedSession(history: Message[], name: string) {
1130
1130
  if (!existsSync(file)) { O(r(`会话不存在: ${name}\n\n`)); return; }
1131
1131
  const data = JSON.parse(readFileSync(file, 'utf-8'));
1132
1132
  history.push({ role: 'system', content: `[已加载: ${name} (${data.messages?.length || 0} 条)]` });
1133
- if (data.messages) for (const m of data.messages) history.push(m);
1133
+ if (data.messages) for (const m of data.messages) {
1134
+ if (m.role === 'tool' && !m.name) m.name = 'tool';
1135
+ history.push(m);
1136
+ }
1134
1137
  trimHistory(history, MAX_HISTORY);
1135
1138
  O(g(`已加载: ${name}`) + '\n\n');
1136
1139
  }
@@ -1143,7 +1146,10 @@ async function loadLatestSession(history: Message[]) {
1143
1146
  const data = JSON.parse(readFileSync(file, 'utf-8'));
1144
1147
  const label = files[0].replace(/^sess_|\.json$/g, '');
1145
1148
  history.push({ role: 'system', content: `[已加载: ${label} (${data.messages?.length || 0} 条)]` });
1146
- if (data.messages) for (const m of data.messages) history.push(m);
1149
+ if (data.messages) for (const m of data.messages) {
1150
+ if (m.role === 'tool' && !m.name) m.name = 'tool';
1151
+ history.push(m);
1152
+ }
1147
1153
  trimHistory(history, MAX_HISTORY);
1148
1154
  O(g(`已加载: ${label}`) + '\n\n');
1149
1155
  }