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

@@ -9,13 +9,9 @@ interface ContextCompactionNoticeProps {
export function ContextCompactionNotice({ compaction }: ContextCompactionNoticeProps) {
const { t } = useTranslation();
const title = compaction.phase === "started"
? t("thread.compaction.started", { defaultValue: "Compressing context" })
: compaction.phase === "failed"
? t("thread.compaction.failed", { defaultValue: "Context compaction failed" })
: compaction.phase === "cancelled"
? t("thread.compaction.cancelled", { defaultValue: "Context compaction cancelled" })
: t("thread.compaction.succeeded", { defaultValue: "Context compacted" });
const title = t(compaction.reason
? `thread.compaction.reasons.${compaction.reason}.${compaction.phase}`
: `thread.compaction.${compaction.phase}`);
return (
<div