@ia-ccun/code-agent-cli 0.0.8 → 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.
|
@@ -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
|
}
|