chore: bump version to 0.3.20 + metona-toast 迁移至 @metona-team 私有源

This commit is contained in:
2026-07-23 21:42:14 +08:00
parent 56bd3a46d7
commit 983c52b0e4
16 changed files with 141 additions and 78 deletions
+3 -3
View File
@@ -56,7 +56,7 @@ export function Sidebar(): React.JSX.Element {
// M-9 修复: 显示错误提示而非静默吞错后创建本地假会话
// 之前的行为:catch 后继续创建本地 s_${Date.now()} 会话,但该会话在主进程不存在,下次刷新消失
console.error('[Sidebar] Failed to create session:', err);
import('metona-toast').then((mod) => {
import('@metona-team/metona-toast').then((mod) => {
mod.default.error('创建会话失败,请检查数据库状态');
}).catch(() => {});
return; // 不创建本地假会话
@@ -119,7 +119,7 @@ function SessionItem({ session, isActive, isAgentActive, onClick }: { session: S
await window.metona.sessions.delete(session.id);
} catch (err) {
console.error('[Sidebar] Failed to delete session:', err);
import('metona-toast').then((mod) => {
import('@metona-team/metona-toast').then((mod) => {
mod.default.error('删除会话失败,请重试');
}).catch(() => {});
// 不调用 removeSession,保留会话在 UI 中(与数据库状态一致)
@@ -191,7 +191,7 @@ function ToolManagerPanel() {
}).catch((err) => {
console.error('[Sidebar]', err);
if (!cancelled) {
import('metona-toast').then((mod) => mod.default.error('加载工具列表失败')).catch(() => {});
import('@metona-team/metona-toast').then((mod) => mod.default.error('加载工具列表失败')).catch(() => {});
}
});
}