File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { useStore } from "@/lib/state/store";
1414import { run } from "@/lib/db/client" ;
1515import { ulid } from "@/lib/util/id" ;
1616import { appendHistoryEntry } from "@/lib/actions/historyActions" ;
17+ import { getActiveTabId } from "@/lib/actions/workspaceActions" ;
1718
1819/**
1920 * Heuristic — any query that touches one of these keywords is assumed
@@ -28,7 +29,8 @@ export const LORADB_MUTATION_EVENT = "loradb:mutation";
2829
2930export async function runActiveTab ( ) : Promise < string | null > {
3031 const state = useStore . getState ( ) ;
31- const tabId = state . activeTabId ;
32+ // Derived from the workspace tree — see resolveActiveTabId in tree.ts.
33+ const tabId = getActiveTabId ( ) ;
3234 if ( tabId === null ) return null ;
3335 const tab = state . tabs . find ( ( t ) => t . id === tabId ) ;
3436 if ( ! tab ) return null ;
You can’t perform that action at this time.
0 commit comments