chatccc 0.2.147 → 0.2.149
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/agent-prompts/claude_specific.md +4 -0
- package/package.json +1 -1
- package/src/session.ts +10 -4
|
@@ -28,6 +28,10 @@ Content-Type: application/json
|
|
|
28
28
|
|
|
29
29
|
调用后停止所有工具调用,直接输出最终回复即可。
|
|
30
30
|
|
|
31
|
+
## 禁止 PushNotification
|
|
32
|
+
|
|
33
|
+
**不要调用 PushNotification 工具。** 如果你认为当前会话已经完成任务需要结束,直接调用上述 stop-stuck-loop 接口,不要使用 PushNotification。
|
|
34
|
+
|
|
31
35
|
## 计划/问答模式权限规则
|
|
32
36
|
|
|
33
37
|
如果用户消息以 `/plan` 或 `/ask` 开头,说明当前处于只读模式。**遇到任何需要用户同意的权限请求时,不要向用户申请权限,立即调用 stop-stuck-loop 接口提前结束本轮会话。**
|
package/package.json
CHANGED
package/src/session.ts
CHANGED
|
@@ -1487,8 +1487,11 @@ export function startUnifiedDisplayLoop(): void {
|
|
|
1487
1487
|
await p.cardUpdate(display.cardId, deltaCard, mySeq);
|
|
1488
1488
|
display.sequence = mySeq;
|
|
1489
1489
|
} catch (err) {
|
|
1490
|
-
|
|
1491
|
-
|
|
1490
|
+
const errMsg = (err as Error).message;
|
|
1491
|
+
console.error(`[${ts()}] CardKit update error: chatId=${chatId} ${errMsg}`);
|
|
1492
|
+
if (errMsg.includes("300317")) {
|
|
1493
|
+
display.sequence = mySeq;
|
|
1494
|
+
} else if (!display.streamErrorNotified) {
|
|
1492
1495
|
display.streamErrorNotified = true;
|
|
1493
1496
|
p.sendText(chatId, "卡片更新失败,结果将以文本形式发送。").catch(() => {});
|
|
1494
1497
|
}
|
|
@@ -1513,8 +1516,11 @@ export function startUnifiedDisplayLoop(): void {
|
|
|
1513
1516
|
await p.cardUpdate(display.cardId, card, mySeq);
|
|
1514
1517
|
display.sequence = mySeq;
|
|
1515
1518
|
} catch (err) {
|
|
1516
|
-
|
|
1517
|
-
|
|
1519
|
+
const errMsg = (err as Error).message;
|
|
1520
|
+
console.error(`[${ts()}] CardKit update error: chatId=${chatId} ${errMsg}`);
|
|
1521
|
+
if (errMsg.includes("300317")) {
|
|
1522
|
+
display.sequence = mySeq;
|
|
1523
|
+
} else if (!display.streamErrorNotified) {
|
|
1518
1524
|
display.streamErrorNotified = true;
|
|
1519
1525
|
p.sendText(chatId, "卡片更新失败,结果将以文本形式发送。").catch(() => {});
|
|
1520
1526
|
}
|