@ia-ccun/code-agent-cli 0.0.51-beta.1 → 0.0.51-beta.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.
|
@@ -24,9 +24,6 @@ export default function (pi: ExtensionAPI) {
|
|
|
24
24
|
|
|
25
25
|
pi.on("agent_end", async (event, ctx) => {
|
|
26
26
|
try {
|
|
27
|
-
// 检查 ctx 是否仍然有效
|
|
28
|
-
ctx.runtime.assertActive();
|
|
29
|
-
|
|
30
27
|
// 计算耗时
|
|
31
28
|
const elapsed = Date.now() - agentStartTime;
|
|
32
29
|
let timeStr: string;
|
|
@@ -47,7 +44,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
47
44
|
// agent_end 表示一轮对话结束,显示完成提示
|
|
48
45
|
ctx.ui.notify(`${timeStr2} | ✨ 消息处理完成 (${timeStr})`, "info");
|
|
49
46
|
} catch (e) {
|
|
50
|
-
// ctx
|
|
47
|
+
// 忽略错误(ctx 可能已过期)
|
|
51
48
|
}
|
|
52
49
|
});
|
|
53
50
|
|
package/package.json
CHANGED