chore: bump version to 0.3.20 + metona-toast 迁移至 @metona-team 私有源
This commit is contained in:
@@ -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(() => {});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user