feat(webui): distinguish context compaction reasons (NAN-324) (#6389)

* feat(webui): distinguish context compaction reasons (NAN-324)

* fix(webui): describe idle compaction cancellation as interruption

* docs: omit compaction notice details from configuration guide

* fix(i18n): make compaction notices read naturally

* fix(i18n): keep CJK compaction notices concise

* fix(i18n): describe idle compaction as unfinished
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-22 16:13:25 +08:00
1 parent 084b6bb394
commit bc5c58d239
38 files changed
+540 -23

No files matched your search

+5 -1
View File
@@ -349,7 +349,7 @@ describe("useNanobotStream", () => {
act(() => fake.emit("sources", { event: "stream_end", chat_id: "sources", response_sources: [] }));
expect(result.current.messages[1].responseSources).toEqual([]);
});
it.each(["succeeded", "cancelled"] as const)("updates one stable compaction row to %s", (phase) => {
it.each(["succeeded", "failed", "cancelled"] as const)("updates one stable compaction row to %s", (phase) => {
const fake = fakeClient();
const { result } = renderHook(
() => useNanobotStream("chat-compaction", EMPTY_MESSAGES),
@@ -362,6 +362,7 @@ describe("useNanobotStream", () => {
chat_id: "chat-compaction",
compaction_id: "compact-1",
phase: "started",
reason: "idle",
});
});
@@ -373,6 +374,7 @@ describe("useNanobotStream", () => {
compaction: {
id: "compact-1",
phase: "started",
reason: "idle",
announce: true,
},
});
@@ -383,6 +385,7 @@ describe("useNanobotStream", () => {
chat_id: "chat-compaction",
compaction_id: "compact-1",
phase,
reason: "idle",
});
});
@@ -392,6 +395,7 @@ describe("useNanobotStream", () => {
createdAt,
compaction: {
phase,
reason: "idle",
announce: true,
},
});