codemini-cli 0.3.0 → 0.3.2
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 +2 -1
- package/souls/anime.md +13 -2
- package/souls/caveman.md +12 -2
- package/souls/ceo.md +14 -3
- package/souls/default.md +10 -2
- package/souls/pirate.md +13 -3
- package/souls/playful.md +13 -3
- package/souls/professional.md +13 -3
- package/src/cli.js +2 -1
- package/src/commands/chat.js +3 -0
- package/src/commands/run.js +6 -2
- package/src/core/agent-loop.js +13 -9
- package/src/core/ast.js +2 -55
- package/src/core/bounded-cache.js +121 -0
- package/src/core/chat-runtime.js +552 -143
- package/src/core/config-store.js +30 -0
- package/src/core/constants.js +171 -0
- package/src/core/crypto-utils.js +18 -0
- package/src/core/memory-policy.js +27 -0
- package/src/core/memory-prompt.js +45 -0
- package/src/core/memory-store.js +181 -0
- package/src/core/paths.js +8 -0
- package/src/core/project-index.js +6 -34
- package/src/core/provider/anthropic.js +388 -0
- package/src/core/provider/index.js +37 -0
- package/src/core/soul.js +3 -2
- package/src/core/tools.js +175 -71
- package/src/tui/chat-app.js +291 -38
- package/src/tui/tool-activity/presenters/command.js +14 -1
- package/src/tui/tool-activity/presenters/files.js +23 -1
- package/src/tui/tool-activity/presenters/system.js +1 -1
- package/src/tui/tool-narration/presenters/glob.js +2 -2
- package/src/tui/tool-narration/presenters/grep.js +2 -2
- package/src/tui/tool-narration/presenters/list.js +2 -2
- package/src/tui/tool-narration/presenters/run.js +2 -2
|
@@ -19,8 +19,30 @@ export function describeFileToolActivity(copy, parsed, options = {}) {
|
|
|
19
19
|
if (parsed.base === 'patch') {
|
|
20
20
|
return describePathTool(copy, parsed, { done: copy.toolActivity.donePatch, doing: copy.toolActivity.doingPatch }, options);
|
|
21
21
|
}
|
|
22
|
-
if (parsed.base === 'list'
|
|
22
|
+
if (parsed.base === 'list') {
|
|
23
23
|
return describePathTool(copy, parsed, { done: copy.toolActivity.doneList, doing: copy.toolActivity.doingList }, options);
|
|
24
24
|
}
|
|
25
|
+
if (parsed.base === 'glob') {
|
|
26
|
+
return describePathTool(
|
|
27
|
+
copy,
|
|
28
|
+
parsed,
|
|
29
|
+
{
|
|
30
|
+
done: copy.toolActivity.doneGlob || copy.toolActivity.doneList,
|
|
31
|
+
doing: copy.toolActivity.doingGlob || copy.toolActivity.doingList
|
|
32
|
+
},
|
|
33
|
+
options
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
if (parsed.base === 'grep') {
|
|
37
|
+
return describePathTool(
|
|
38
|
+
copy,
|
|
39
|
+
parsed,
|
|
40
|
+
{
|
|
41
|
+
done: copy.toolActivity.doneGrep || copy.toolActivity.doneList,
|
|
42
|
+
doing: copy.toolActivity.doingGrep || copy.toolActivity.doingList
|
|
43
|
+
},
|
|
44
|
+
options
|
|
45
|
+
);
|
|
46
|
+
}
|
|
25
47
|
return '';
|
|
26
48
|
}
|
|
@@ -2,7 +2,7 @@ import { makeBlocked, trimText } from '../common.js';
|
|
|
2
2
|
|
|
3
3
|
export function describeSystemToolActivity(copy, parsed, { done = false, blocked = false } = {}) {
|
|
4
4
|
if (parsed.base === 'project_index') {
|
|
5
|
-
if (blocked) return `${copy.toolActivity.blocked}:
|
|
5
|
+
if (blocked) return `${copy.toolActivity.blocked}: ${copy.toolActivity.doingProjectIndex}`;
|
|
6
6
|
return done ? copy.toolActivity.doneProjectIndex : copy.toolActivity.doingProjectIndex;
|
|
7
7
|
}
|
|
8
8
|
if (parsed.base === 'file_index') {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const globPresenter = {
|
|
2
2
|
prelude: {
|
|
3
|
-
en: ({ target }) => (target ? `I'll
|
|
4
|
-
zh: ({ target }) => (target ?
|
|
3
|
+
en: ({ target }) => (target ? `I'll find files matching ${target} first.` : 'I\'ll find the relevant files by pattern first.'),
|
|
4
|
+
zh: ({ target }) => (target ? `我先按模式查找匹配 ${target} 的文件。` : '我先按模式查找相关文件。')
|
|
5
5
|
},
|
|
6
6
|
completion: {
|
|
7
7
|
en: () => 'I have the relevant context now. Do you want me to make the change next, or summarize the findings first?',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const grepPresenter = {
|
|
2
2
|
prelude: {
|
|
3
|
-
en: () => `I'll search the
|
|
4
|
-
zh: () => '
|
|
3
|
+
en: ({ target }) => (target ? `I'll search the codebase for the keyword ${target} first.` : `I'll search the codebase by keyword first.`),
|
|
4
|
+
zh: ({ target }) => (target ? `我先按关键词搜索 ${target} 相关的代码位置。` : '我先按关键词搜索相关代码位置。')
|
|
5
5
|
},
|
|
6
6
|
completion: {
|
|
7
7
|
en: () => 'I found the relevant spots. Do you want me to make the change next, or summarize the findings first?',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const listPresenter = {
|
|
2
2
|
prelude: {
|
|
3
|
-
en: ({ target }) => (target ? `I'll
|
|
4
|
-
zh: ({ target }) => (target ?
|
|
3
|
+
en: ({ target }) => (target ? `I'll list the contents of ${target} first.` : 'I\'ll list the relevant directory contents first.'),
|
|
4
|
+
zh: ({ target }) => (target ? `我先列出 ${target} 目录内容。` : '我先列出相关目录内容。')
|
|
5
5
|
},
|
|
6
6
|
completion: {
|
|
7
7
|
en: () => 'I have the relevant context now. Do you want me to make the change next, or summarize the findings first?',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const runPresenter = {
|
|
2
2
|
prelude: {
|
|
3
|
-
en: () => `I'll
|
|
4
|
-
zh: () => '
|
|
3
|
+
en: ({ target }) => (target ? `I'll run ${target} first and check the result.` : `I'll run the relevant command first and check the result.`),
|
|
4
|
+
zh: ({ target }) => (target ? `我先执行 ${target},再看一下结果。` : '我先执行相关命令,再看一下结果。')
|
|
5
5
|
},
|
|
6
6
|
completion: {
|
|
7
7
|
en: () => 'That step is finished. Do you want me to act on the result next, or summarize what it means first?',
|