diff --git a/ui/web/src/i18n/locales/en/memory.json b/ui/web/src/i18n/locales/en/memory.json index 2eec6732..8abafb1a 100644 --- a/ui/web/src/i18n/locales/en/memory.json +++ b/ui/web/src/i18n/locales/en/memory.json @@ -185,6 +185,7 @@ "docIndexFailed": "Failed to index document", "allIndexed": "All documents indexed", "allIndexFailed": "Failed to index all", - "searchFailed": "Search failed" + "searchFailed": "Search failed", + "docLoadFailed": "Failed to load document" } } diff --git a/ui/web/src/i18n/locales/vi/memory.json b/ui/web/src/i18n/locales/vi/memory.json index 3261cda6..5f814f11 100644 --- a/ui/web/src/i18n/locales/vi/memory.json +++ b/ui/web/src/i18n/locales/vi/memory.json @@ -185,6 +185,7 @@ "docIndexFailed": "Không thể lập chỉ mục tài liệu", "allIndexed": "Đã lập chỉ mục tất cả tài liệu", "allIndexFailed": "Không thể lập chỉ mục tất cả", - "searchFailed": "Tìm kiếm thất bại" + "searchFailed": "Tìm kiếm thất bại", + "docLoadFailed": "Không thể tải tài liệu" } } diff --git a/ui/web/src/i18n/locales/zh/memory.json b/ui/web/src/i18n/locales/zh/memory.json index 272ad45c..01ce0a6e 100644 --- a/ui/web/src/i18n/locales/zh/memory.json +++ b/ui/web/src/i18n/locales/zh/memory.json @@ -185,6 +185,7 @@ "docIndexFailed": "索引文档失败", "allIndexed": "所有文档已索引", "allIndexFailed": "索引所有文档失败", - "searchFailed": "搜索失败" + "searchFailed": "搜索失败", + "docLoadFailed": "加载文档失败" } } diff --git a/ui/web/src/pages/memory/kg-entity-detail-dialog.tsx b/ui/web/src/pages/memory/kg-entity-detail-dialog.tsx index 3a594ad9..bfee27da 100644 --- a/ui/web/src/pages/memory/kg-entity-detail-dialog.tsx +++ b/ui/web/src/pages/memory/kg-entity-detail-dialog.tsx @@ -52,7 +52,7 @@ export function KGEntityDetailDialog({ open, onOpenChange, agentId, entity, getE return ( !traversing && onOpenChange(v)}> - + {entity?.name} diff --git a/ui/web/src/pages/memory/kg-extract-dialog.tsx b/ui/web/src/pages/memory/kg-extract-dialog.tsx index cfcdefb5..2987f9e2 100644 --- a/ui/web/src/pages/memory/kg-extract-dialog.tsx +++ b/ui/web/src/pages/memory/kg-extract-dialog.tsx @@ -38,7 +38,7 @@ export function KGExtractDialog({ open, onOpenChange, onExtract }: KGExtractDial return ( !loading && onOpenChange(v)}> - + {t("kg.extractDialog.title")} diff --git a/ui/web/src/pages/memory/memory-create-dialog.tsx b/ui/web/src/pages/memory/memory-create-dialog.tsx index f008a3f5..276e625f 100644 --- a/ui/web/src/pages/memory/memory-create-dialog.tsx +++ b/ui/web/src/pages/memory/memory-create-dialog.tsx @@ -96,7 +96,7 @@ export function MemoryCreateDialog({ open, onOpenChange, agentId: parentAgentId, return ( !loading && onOpenChange(v)}> - + {t("createDialog.title")} diff --git a/ui/web/src/pages/memory/memory-document-dialog.tsx b/ui/web/src/pages/memory/memory-document-dialog.tsx index 112be519..8221b283 100644 --- a/ui/web/src/pages/memory/memory-document-dialog.tsx +++ b/ui/web/src/pages/memory/memory-document-dialog.tsx @@ -48,7 +48,7 @@ export function MemoryDocumentDialog({ open, onOpenChange, agentId, document }: setDetail(res); setContent(res.content); } catch { - toast.error(i18next.t("memory:toast.failedCreate")); + toast.error(i18next.t("memory:toast.docLoadFailed")); } finally { setLoadingDetail(false); } @@ -98,7 +98,7 @@ export function MemoryDocumentDialog({ open, onOpenChange, agentId, document }: toast.success(i18next.t("memory:documentDialog.title"), document.path); onOpenChange(false); } catch (err) { - toast.error(i18next.t("memory:toast.failedCreate"), err instanceof Error ? err.message : ""); + toast.error(i18next.t("memory:toast.docUpdateFailed"), err instanceof Error ? err.message : ""); } finally { setSaving(false); } @@ -108,7 +108,7 @@ export function MemoryDocumentDialog({ open, onOpenChange, agentId, document }: return ( !saving && onOpenChange(v)}> - + {document?.path} diff --git a/ui/web/src/pages/memory/memory-search-dialog.tsx b/ui/web/src/pages/memory/memory-search-dialog.tsx index c5bf27c6..805043e6 100644 --- a/ui/web/src/pages/memory/memory-search-dialog.tsx +++ b/ui/web/src/pages/memory/memory-search-dialog.tsx @@ -37,7 +37,7 @@ export function MemorySearchDialog({ open, onOpenChange, agentId }: MemorySearch return ( - + {t("searchDialog.title")} diff --git a/ui/web/src/pages/sessions/session-detail-page.tsx b/ui/web/src/pages/sessions/session-detail-page.tsx index d90d06f2..a142afb8 100644 --- a/ui/web/src/pages/sessions/session-detail-page.tsx +++ b/ui/web/src/pages/sessions/session-detail-page.tsx @@ -25,9 +25,13 @@ function isSystemMessage(msg: ChatMessage): boolean { function isDisplayable(msg: ChatMessage): boolean { // Hide tool role messages (shown inline with assistant) if (msg.role === "tool") return false; - // Hide messages with empty/whitespace content - if (!msg.content?.trim()) return false; - return true; + // Show if there is text content + if (msg.content?.trim()) return true; + // Assistant messages with tool calls or thinking should still be displayed + if (msg.role === "assistant") { + return !!(msg.toolDetails?.length || msg.tool_calls?.length || msg.thinking?.trim()); + } + return false; } interface SessionDetailPageProps {