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.
- package/package.json +1 -1
- package/src/session.ts +12 -4
package/package.json
CHANGED
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(
|
|
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
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
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 {
|