feat: 升级至 v0.3.8 — Trace Viewer 叠加修复 + LLM 配置校验改造 + toast 反馈统一
- Trace Viewer 叠加渲染修复 - sendMessage 补 traceSteps/tokenUsage 重置(止血) - TraceStep 加 runId 字段,useAgentStream 按 runId 判定同迭代(稳健改造) - LLM 配置校验中等改造(SettingsModal LLMSettings) - 取消 onChange 实时落库,改为本地 state + Save 按钮统一提交 - 字段级 inline error:Base URL http(s):// 正则、Model 空格校验、contextWindow ≥ 4096 - Provider 切换清空 Model(之前只清 apiKey) - 保存结果改用 metona-toast(不再用 Alert) - toast 反馈机制全面统一(15 处问题修复) - ContextMenu: 原生 confirm/prompt 改 MUI Dialog(新增 useDialogStore + ContextMenuDialogHost) - ContextMenu: 抽 copyWithToast helper 替代散落 7 处静默失败 - OnboardingWizard: 配置保存失败静默改 toast.error - useKeyboardShortcuts: Ctrl+N / Ctrl+Shift+C 失败补 toast - SettingsModal: inheritFiles 失败 toast.warning、handleApply 失败 toast.error - LogsSettings: resultAlert Alert 改 toast(保留 Dialog 确认) - MemoryViewer: 删除失败改 toast(加载/搜索保留 Alert) - TaskList: create/update/delete/无会话改 toast - agent-store: sendMessage/session 失败补 toast(保留 system message) - 删除当前会话同步清空 ChatPanel/DetailPanel - Sidebar confirmDelete + ContextMenu delete 均补 agent-store 重置 - 修复 useSessionStore.removeSession 不触发 agent-store 同步的遗漏
This commit is contained in:
@@ -172,15 +172,15 @@ export function MemoryViewer(): React.JSX.Element {
|
||||
const handleDelete = async (type: MemoryType, id: string) => {
|
||||
if (!window.metona?.memory?.delete) return;
|
||||
try {
|
||||
setError(null);
|
||||
const res = await window.metona.memory.delete(type, id);
|
||||
if (!res.success) {
|
||||
setError(res.error ?? '删除失败');
|
||||
// 用户主动操作失败应用 toast(与项目惯例一致),不污染加载/搜索的 Alert
|
||||
import('metona-toast').then((mod) => mod.default.error(res.error ?? '删除失败')).catch(() => {});
|
||||
return;
|
||||
}
|
||||
await loadMemories();
|
||||
} catch (err) {
|
||||
setError((err as Error).message ?? '删除失败');
|
||||
import('metona-toast').then((mod) => mod.default.error((err as Error).message ?? '删除失败')).catch(() => {});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user