修复右侧边栏“提交”区域在没有提交记录时显示错误

This commit is contained in:
xintaofei
2026-03-12 22:51:53 +08:00
parent 7a6ddb87ba
commit 080a969c1e
4 changed files with 14 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ import {
useRef,
type ReactNode,
} from "react"
import { toErrorMessage } from "@/lib/app-error"
import { getFolder, listFolderConversations } from "@/lib/tauri"
import type {
AgentType,
@@ -174,7 +175,7 @@ export function FolderProvider({
} catch (e) {
if (!mountedRef.current) return
if (!cached) {
setError(e instanceof Error ? e.message : String(e))
setError(toErrorMessage(e))
}
} finally {
if (mountedRef.current) {