feat: release v0.80.0 with gateway tunnel system and agent improvements

Major Features:
- Gateway tunnel system with Discord/Feishu/Telegram support
- Agent request tool policy management
- Aster session recovery mechanism
- Channel log viewer UI with filtering

Improvements:
- Refactor MCP database migration and config hot-reload
- Optimize request tool policy service
- Add comprehensive tests for new features

Fixes:
- Fix test compilation errors (Config gateway field, type inference)
- Fix doctest import paths
- Fix flaky antigravity token validation test
- Fix CI build issues

Dependencies:
- Update pnpm-lock.yaml and Cargo.lock

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
coso
2026-03-05 16:50:44 +08:00
co-authored by Claude Opus 4.6
parent b9156c9e92
commit 7516671610
56 changed files with 16520 additions and 1638 deletions
+37
View File
@@ -8,6 +8,10 @@
import { create } from "zustand";
import { invoke } from "@tauri-apps/api/core";
import { listen, type UnlistenFn } from "@tauri-apps/api/event";
import {
isAsterSessionNotFoundError,
resolveRestorableSessionId,
} from "@/lib/asterSessionRecovery";
// ============ 类型定义 ============
@@ -398,6 +402,39 @@ export const useAgentStore = create<AgentState>((set, get) => ({
});
} catch (error) {
console.error("[AgentStore] 切换会话失败:", error);
if (isAsterSessionNotFoundError(error)) {
try {
const sessions = await invoke<
Array<{
id: string;
created_at: number;
updated_at: number;
}>
>("aster_session_list");
const recoveredSessionId = resolveRestorableSessionId({
candidateSessionId: null,
sessions: sessions.map((item) => ({
id: item.id,
createdAt: item.created_at,
updatedAt: item.updated_at,
})),
});
if (recoveredSessionId && recoveredSessionId !== sessionId) {
await get().switchSession(recoveredSessionId);
return;
}
await get().createSession();
set({
messages: [],
pendingActions: [],
});
return;
} catch (recoveryError) {
console.error("[AgentStore] 恢复会话失败:", recoveryError);
}
}
throw error;
}
},