@ia-ccun/code-agent-cli 0.0.8 → 0.0.10

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.
@@ -34,10 +34,10 @@ 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
- return `${mins}m ${secs}s`;
40
+ return `${mins} m ${secs} s`;
41
41
  }
42
42
 
43
43
  function formatTokens(tokens: number): string {
@@ -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}✶${getNextMessage()}…${reset} (${timeStr} · ↓ ${tokensStr}tokens)`;
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?.outputTokens) {
78
- totalTokens = msg.usage.outputTokens;
77
+ if (msg.usage?.output) {
78
+ totalTokens = msg.usage.output;
79
79
  }
80
80
  }
81
81
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ia-ccun/code-agent-cli",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "AI Coding Agent CLI - 基于OpenClaw🦞底层Agent原理实现的的编码智能体(供学习使用)。",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -36,10 +36,14 @@
36
36
  "webui": "npm run webui:build && node webui/server/dist/index.js"
37
37
  },
38
38
  "dependencies": {
39
- "@mariozechner/pi-agent-core": "0.57.1",
40
- "@mariozechner/pi-ai": "0.57.1",
41
- "@mariozechner/pi-coding-agent": "0.57.1",
42
- "@mariozechner/pi-tui": "0.57.1"
39
+ "@mariozechner/pi-agent-core": "0.58.1",
40
+ "@mariozechner/pi-ai": "0.58.1",
41
+ "@mariozechner/pi-coding-agent": "0.58.1",
42
+ "@mariozechner/pi-tui": "0.58.1"
43
+ },
44
+ "overrides": {
45
+ "glob": "^11.0.0",
46
+ "node-domexception": "^2.0.0"
43
47
  },
44
48
  "devDependencies": {
45
49
  "@types/node": "^22.10.0",