chatccc 0.2.83 → 0.2.85

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/session.ts +12 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatccc",
3
- "version": "0.2.83",
3
+ "version": "0.2.85",
4
4
  "description": "Feishu bot bridge for Claude Code",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
package/src/session.ts CHANGED
@@ -1153,7 +1153,10 @@ export function ensureDisplayLoop(sessionId: string): void {
1153
1153
  const oldDisplayContent = truncateContent(state.accumulatedContent + state.finalReply) || "处理中...";
1154
1154
  const oldCard = buildProgressCard(oldDisplayContent, { showStop: false, headerTitle: "生成中...(上轮)" });
1155
1155
  await p.cardUpdate(display.cardId, oldCard, oldSeqBase + 1).catch(() => {});
1156
- const newCardId = await p.cardCreate(buildProgressCard("", { showStop: true, headerTitle: "生成中..." }));
1156
+ const newCardId = await p.cardCreate(buildProgressCard(
1157
+ "",
1158
+ { showStop: true, headerTitle: "生成中..." },
1159
+ ));
1157
1160
  if (newCardId) {
1158
1161
  await p.cardSend(chatId, newCardId);
1159
1162
  display.cardId = newCardId;
@@ -1186,9 +1189,14 @@ export function ensureDisplayLoop(sessionId: string): void {
1186
1189
  replyDelta = state.finalReply;
1187
1190
  }
1188
1191
  const delta = (accDelta + replyDelta).trim();
1189
- if (!delta || delta === display.lastSentContent) return;
1190
- display.lastSentContent = delta;
1191
- const deltaCard = buildProgressCard(truncateContent(delta) || "处理中...", { showStop: true, headerTitle: "生成中..." });
1192
+
1193
+ // 无论有无新内容,都追加点点点动画,避免轮转后卡片静止
1194
+ dotCount = (dotCount % 9) + 1;
1195
+ const displayContent = (delta || "") + "\n" + "。" .repeat(dotCount);
1196
+ if (displayContent === display.lastSentContent) return;
1197
+
1198
+ display.lastSentContent = displayContent;
1199
+ const deltaCard = buildProgressCard(truncateContent(displayContent) || "处理中...", { showStop: true, headerTitle: "生成中..." });
1192
1200
  display.cardBusy = true;
1193
1201
  const mySeq = display.sequence + 1;
1194
1202
  try {