feat: canonical workspace tab IDs with URL routing and draft agent tabs

Rewrite workspace tab management to use stable tab IDs (agent_, terminal_, draft_, file_) with
dedicated /tab/[tabId] routes, replace separate file-tabs store with unified workspace-tabs store,
support multiple concurrent draft agent tabs, and detect text files by content instead of extension allowlist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Mohamed Boudra
2026-03-03 20:11:55 +07:00
co-authored by Claude Opus 4.6
parent 97f0f4b266
commit 73eabd2eea
17 changed files with 1732 additions and 768 deletions
+5 -2
View File
@@ -251,8 +251,11 @@ async function runAttachmentGc(): Promise<void> {
import("@/stores/session-store"),
]);
const pendingCreate = useCreateFlowStore.getState().pending;
if (pendingCreate?.lifecycle === "active" && pendingCreate.images) {
const pendingByDraftId = useCreateFlowStore.getState().pendingByDraftId;
for (const pendingCreate of Object.values(pendingByDraftId)) {
if (pendingCreate.lifecycle !== "active" || !pendingCreate.images) {
continue;
}
for (const image of pendingCreate.images) {
referencedIds.add(image.id);
}