feat(history): add unified MCP execution history
This commit is contained in:
39 files changed
+1261
-87
No files matched your search
@@ -402,6 +402,7 @@ const agentDriverUpdateCount = ref(0);
|
||||
const showHistory = ref(false);
|
||||
const showAiPanel = ref(safeLocalStorageGet("dbx-ai-panel-open") === "true");
|
||||
const isAiPanelMaximized = ref(false);
|
||||
const isHistoryPanelMaximized = ref(false);
|
||||
const isZenMode = ref(false);
|
||||
const showSqlLibraryPanel = ref(safeLocalStorageGet("dbx-sql-library-open") === "true");
|
||||
const showSqlFilePanel = ref(safeLocalStorageGet("dbx-sql-file-panel-open") === "true");
|
||||
@@ -1689,6 +1690,7 @@ function applyRightSidebarPanelState(next: RightSidebarPanelState) {
|
||||
}
|
||||
|
||||
function setRightSidebarPanelOpen(panelId: RightSidebarPanelId, open: boolean) {
|
||||
if ((panelId === "history" && !open) || (panelId !== "history" && open)) isHistoryPanelMaximized.value = false;
|
||||
if (panelId === "ai" && !open) {
|
||||
isAiPanelMaximized.value = false;
|
||||
} else if (open && panelId !== "ai" && isAiPanelMaximized.value) {
|
||||
@@ -4192,7 +4194,11 @@ onUnmounted(() => {
|
||||
@mousedown="rememberSidebarSearchSurface"
|
||||
/>
|
||||
|
||||
<div v-show="!isAiPanelMaximized || isZenMode" :class="isDetachedWindowContext ? 'flex-1 min-w-0 overflow-hidden bg-background' : isClassicLayout ? 'flex-1 min-w-0 overflow-hidden' : 'flex-1 min-w-0 overflow-hidden rounded-md border border-border/80 bg-background'">
|
||||
<div
|
||||
data-editor-content
|
||||
v-show="(!isAiPanelMaximized && !isHistoryPanelMaximized) || isZenMode"
|
||||
:class="isDetachedWindowContext ? 'flex-1 min-w-0 overflow-hidden bg-background' : isClassicLayout ? 'flex-1 min-w-0 overflow-hidden' : 'flex-1 min-w-0 overflow-hidden rounded-md border border-border/80 bg-background'"
|
||||
>
|
||||
<div class="h-full flex min-h-0 min-w-0 flex-col">
|
||||
<AppTabBar
|
||||
v-if="!isDetachedWindowContext"
|
||||
@@ -4464,7 +4470,7 @@ onUnmounted(() => {
|
||||
|
||||
<div
|
||||
v-if="!isDetachedWindowContext && showAiPanel"
|
||||
v-show="!isZenMode"
|
||||
v-show="!isHistoryPanelMaximized && !isZenMode"
|
||||
:class="[isClassicLayout ? 'h-full relative z-30 isolate bg-background' : 'h-full relative z-30 isolate rounded-md border border-border/80 bg-background', isAiPanelMaximized ? 'min-w-0 flex-1' : 'min-w-[240px] max-w-full']"
|
||||
:style="isAiPanelMaximized ? {} : { width: aiPanelWidth + 'px' }"
|
||||
>
|
||||
@@ -4493,20 +4499,28 @@ onUnmounted(() => {
|
||||
<div
|
||||
v-if="!isDetachedWindowContext && showHistory"
|
||||
v-show="!isAiPanelMaximized && !isZenMode"
|
||||
:class="isClassicLayout ? 'h-full shrink-0 relative z-30 isolate bg-background' : 'h-full shrink-0 relative z-30 isolate rounded-md border border-border/80 bg-background'"
|
||||
:style="{ width: historyWidth + 'px' }"
|
||||
:class="[isClassicLayout ? 'h-full relative z-30 isolate bg-background' : 'h-full relative z-30 isolate rounded-md border border-border/80 bg-background', isHistoryPanelMaximized ? 'min-w-0 flex-1' : 'shrink-0 max-w-full']"
|
||||
:style="isHistoryPanelMaximized ? {} : { width: historyWidth + 'px' }"
|
||||
>
|
||||
<div class="panel-resize-handle panel-resize-handle--left" @pointerdown="startHistoryResize" />
|
||||
<div v-if="!isHistoryPanelMaximized" class="panel-resize-handle panel-resize-handle--left" @pointerdown="startHistoryResize" />
|
||||
<div class="h-full min-h-0 overflow-hidden rounded-[inherit]" @mousedown="rememberAuxiliarySearchSurface('history')">
|
||||
<div data-history-panel class="h-full min-h-0">
|
||||
<QueryHistory :current-connection-id="activeTab?.connectionId" :current-database="activeTab?.database" @restore="restoreHistorySql" @analyze-ai="analyzeHistoryWithAi" @close="closeRightSidebarPanel('history')" />
|
||||
<QueryHistory
|
||||
:maximized="isHistoryPanelMaximized"
|
||||
@toggle-maximize="isHistoryPanelMaximized = !isHistoryPanelMaximized"
|
||||
:current-connection-id="activeTab?.connectionId"
|
||||
:current-database="activeTab?.database"
|
||||
@restore="restoreHistorySql"
|
||||
@analyze-ai="analyzeHistoryWithAi"
|
||||
@close="closeRightSidebarPanel('history')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="!isDetachedWindowContext && showSqlLibraryPanel"
|
||||
v-show="!isAiPanelMaximized && !isZenMode"
|
||||
v-show="!isAiPanelMaximized && !isHistoryPanelMaximized && !isZenMode"
|
||||
:class="isClassicLayout ? 'h-full shrink-0 relative z-30 isolate bg-background' : 'h-full shrink-0 relative z-30 isolate rounded-md border border-border/80 bg-background'"
|
||||
:style="{ width: sqlLibraryWidth + 'px' }"
|
||||
>
|
||||
@@ -4520,7 +4534,7 @@ onUnmounted(() => {
|
||||
|
||||
<div
|
||||
v-if="!isDetachedWindowContext && showSqlFilePanel"
|
||||
v-show="!isAiPanelMaximized && !isZenMode"
|
||||
v-show="!isAiPanelMaximized && !isHistoryPanelMaximized && !isZenMode"
|
||||
:class="isClassicLayout ? 'h-full shrink-0 relative z-30 isolate bg-background' : 'h-full shrink-0 relative z-30 isolate rounded-md border border-border/80 bg-background'"
|
||||
:style="{ width: sqlFilePanelWidth + 'px' }"
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user