mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-29 16:18:55 +00:00
feat(mcp): notify desktop UI to reload after connection add/remove
Add /reload-connections bridge route that emits mcp-reload-connections event, triggering the frontend to re-read connections from SQLite.
This commit is contained in:
@@ -37,6 +37,9 @@ export function useTauriEvents(deps: { openTableTarget: (target: NavigationTarge
|
||||
);
|
||||
},
|
||||
);
|
||||
listen("mcp-reload-connections", async () => {
|
||||
await connectionStore.initFromDisk();
|
||||
});
|
||||
listen<{ connection_id: string; database: string; sql: string }>("mcp-execute-query", async (event) => {
|
||||
const { connection_id, database, sql } = event.payload;
|
||||
if (!connectionStore.connections.length) await connectionStore.initFromDisk();
|
||||
|
||||
Reference in New Issue
Block a user