fix(sqlfile): make folder list update reactively

This commit is contained in:
ahua authored and GitHub committed 2026-07-06 18:47:45 +08:00
1 parent ff8e53d47b
commit 7ff4d9f804
17 files changed
+503 -2

No files matched your search

@@ -6,6 +6,7 @@ export function usePanelResize() {
const aiPanelWidth = ref(Number(safeLocalStorageGet("dbx-ai-panel-width")) || 360);
const historyWidth = ref(Number(safeLocalStorageGet("dbx-history-width")) || 288);
const sqlLibraryWidth = ref(Number(safeLocalStorageGet("dbx-sql-library-width")) || 288);
const sqlFilePanelWidth = ref(Number(safeLocalStorageGet("dbx-sql-file-panel-width")) || 288);
function startPanelResize(widthRef: Ref<number>, storageKey: string, direction: "left" | "right") {
return (e: MouseEvent) => {
@@ -33,15 +34,18 @@ export function usePanelResize() {
const startAiPanelResize = startPanelResize(aiPanelWidth, "dbx-ai-panel-width", "left");
const startHistoryResize = startPanelResize(historyWidth, "dbx-history-width", "left");
const startSqlLibraryResize = startPanelResize(sqlLibraryWidth, "dbx-sql-library-width", "left");
const startSqlFilePanelResize = startPanelResize(sqlFilePanelWidth, "dbx-sql-file-panel-width", "left");
return {
sidebarWidth,
aiPanelWidth,
historyWidth,
sqlLibraryWidth,
sqlFilePanelWidth,
startSidebarResize,
startAiPanelResize,
startHistoryResize,
startSqlLibraryResize,
startSqlFilePanelResize,
};
}