@ia-ccun/code-agent-cli 0.0.7 → 0.0.9
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 +4 -4
- package/config/agent/extensions/working-msg.ts +4 -4
- package/config.json +20 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ aicode-cli -p "你的指令"
|
|
|
52
52
|
```json
|
|
53
53
|
{
|
|
54
54
|
"name": "aicode-cli",
|
|
55
|
-
"banner": ["
|
|
55
|
+
"banner": ["Code is poetry", "Build with pride"],
|
|
56
56
|
"themeColor": "#49bccf",
|
|
57
57
|
"configDir": ".aicode-cli"
|
|
58
58
|
}
|
|
@@ -81,9 +81,9 @@ aicode-cli -p "你的指令"
|
|
|
81
81
|
|
|
82
82
|
// 多条标语(随机显示)
|
|
83
83
|
"banner": [
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
84
|
+
"Code is poetry",
|
|
85
|
+
"Build with pride",
|
|
86
|
+
"Ideas become reality"
|
|
87
87
|
]
|
|
88
88
|
```
|
|
89
89
|
|
|
@@ -34,7 +34,7 @@ let startTime = 0;
|
|
|
34
34
|
let totalTokens = 0;
|
|
35
35
|
|
|
36
36
|
function formatTime(seconds: number): string {
|
|
37
|
-
if (seconds < 60) return `${seconds}s`;
|
|
37
|
+
if (seconds < 60) return `${seconds} s`;
|
|
38
38
|
const mins = Math.floor(seconds / 60);
|
|
39
39
|
const secs = seconds % 60;
|
|
40
40
|
return `${mins}m ${secs}s`;
|
|
@@ -61,7 +61,7 @@ export default function workingMessageExtension(pi: ExtensionAPI) {
|
|
|
61
61
|
const timeStr = formatTime(elapsed);
|
|
62
62
|
const tokensStr = formatTokens(totalTokens);
|
|
63
63
|
// ✶ 和单词显示为主题色
|
|
64
|
-
const msg = `${accentColor}
|
|
64
|
+
const msg = `${accentColor} ✶ ${getNextMessage()}…${reset} (${timeStr} · ↓ ${tokensStr} tokens)`;
|
|
65
65
|
ctx.ui?.setWorkingMessage(msg);
|
|
66
66
|
};
|
|
67
67
|
|
|
@@ -74,8 +74,8 @@ export default function workingMessageExtension(pi: ExtensionAPI) {
|
|
|
74
74
|
for (const entry of ctx.sessionManager.getBranch()) {
|
|
75
75
|
if (entry.type === "message" && (entry as any).message?.role === "assistant") {
|
|
76
76
|
const msg = (entry as any).message as AssistantMessage;
|
|
77
|
-
if (msg.usage?.
|
|
78
|
-
totalTokens = msg.usage.
|
|
77
|
+
if (msg.usage?.output) {
|
|
78
|
+
totalTokens = msg.usage.output;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
package/config.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aicode-cli",
|
|
3
3
|
"banner": [
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
4
|
+
"Code is poetry, written in logic",
|
|
5
|
+
"Build with purpose, ship with pride",
|
|
6
|
+
"Ideas become reality through code",
|
|
7
|
+
"Clean code is happy code",
|
|
8
|
+
"Engineers shape the future",
|
|
9
|
+
"Every function tells a story",
|
|
10
|
+
"Architecture is frozen music",
|
|
11
|
+
"Power through simplicity",
|
|
12
|
+
"Design patterns, proven wisdom",
|
|
13
|
+
"Refactor today, thank yourself tomorrow",
|
|
14
|
+
"Debug with patience, ship with confidence",
|
|
15
|
+
"Great software, built one line at a time",
|
|
16
|
+
"Talk is cheap, show me the code",
|
|
17
|
+
"Master the craft, own the art",
|
|
18
|
+
"Open source powers the world",
|
|
19
|
+
"Learn, code, repeat",
|
|
20
|
+
"Excellence in engineering",
|
|
21
|
+
"Code without borders",
|
|
22
|
+
"Embrace the complexity, master the craft",
|
|
23
|
+
"Where creativity meets logic"
|
|
24
24
|
],
|
|
25
25
|
"themeColor": "#49bccf",
|
|
26
26
|
"configDir": ".aicode-cli"
|