chatccc 0.2.84 → 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 +9 -4
package/package.json
CHANGED
package/src/session.ts
CHANGED
|
@@ -1154,7 +1154,7 @@ export function ensureDisplayLoop(sessionId: string): void {
|
|
|
1154
1154
|
const oldCard = buildProgressCard(oldDisplayContent, { showStop: false, headerTitle: "生成中...(上轮)" });
|
|
1155
1155
|
await p.cardUpdate(display.cardId, oldCard, oldSeqBase + 1).catch(() => {});
|
|
1156
1156
|
const newCardId = await p.cardCreate(buildProgressCard(
|
|
1157
|
-
|
|
1157
|
+
"",
|
|
1158
1158
|
{ showStop: true, headerTitle: "生成中..." },
|
|
1159
1159
|
));
|
|
1160
1160
|
if (newCardId) {
|
|
@@ -1189,9 +1189,14 @@ export function ensureDisplayLoop(sessionId: string): void {
|
|
|
1189
1189
|
replyDelta = state.finalReply;
|
|
1190
1190
|
}
|
|
1191
1191
|
const delta = (accDelta + replyDelta).trim();
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
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: "生成中..." });
|
|
1195
1200
|
display.cardBusy = true;
|
|
1196
1201
|
const mySeq = display.sequence + 1;
|
|
1197
1202
|
try {
|