diff --git a/src/lib/components/events/event-trace-tree.svelte b/src/lib/components/events/event-trace-tree.svelte index bd8eef8..5dfc2c4 100644 --- a/src/lib/components/events/event-trace-tree.svelte +++ b/src/lib/components/events/event-trace-tree.svelte @@ -53,27 +53,30 @@ } -
-
+
+
{failedCount} {t('失败')} · {succeededCount} {t('成功')} -
diff --git a/src/lib/components/run-log-viewer.svelte b/src/lib/components/run-log-viewer.svelte index a49fb32..5be5355 100644 --- a/src/lib/components/run-log-viewer.svelte +++ b/src/lib/components/run-log-viewer.svelte @@ -15,7 +15,6 @@ loadingEarlier = false, downloading = false, preserveLine = 0, - horizontalScroll = true, onQuery, onDownload, onLoadEarlier, @@ -32,8 +31,6 @@ * Callers must not count rows inserted below that anchor. */ preserveLine?: number; - /** Keep long lines scrollable in the full-page viewer; embedded event logs fit their pane. */ - horizontalScroll?: boolean; onQuery: (value: string) => void; onDownload: () => void; onLoadEarlier?: () => void; @@ -177,17 +174,10 @@ data-scroll-surface data-log-viewport onscroll={trackScroll} - class="min-h-0 min-w-0 flex-1 overflow-y-auto rounded-lg border border-border bg-muted font-mono text-xs leading-5 text-foreground" - style:overflow-x={horizontalScroll ? 'auto' : 'hidden'} + class="min-h-0 min-w-0 flex-1 overflow-auto rounded-lg border border-border bg-muted font-mono text-xs leading-5 text-foreground" > {#if lines.length} -
+
{#each visibleLines as line, offset (startIndex + offset)} {@const index = startIndex + offset} @@ -198,11 +188,7 @@ ? 'active' : 'true' : undefined} - class:min-w-full={!horizontalScroll} - class:w-max={horizontalScroll} - class:max-w-full={!horizontalScroll} - class:overflow-hidden={!horizontalScroll} - class="h-5 px-4 whitespace-pre data-[log-match=true]:bg-amber-300/25 data-[log-match=active]:bg-orange-500/40" + class="h-5 w-max min-w-full px-4 whitespace-pre data-[log-match=true]:bg-amber-300/25 data-[log-match=active]:bg-orange-500/40" style:height="{LINE_HEIGHT}px" style:line-height="{LINE_HEIGHT}px" > diff --git a/src/lib/components/sandbox-log-runs.svelte b/src/lib/components/sandbox-log-runs.svelte index 8a210c6..59142c7 100644 --- a/src/lib/components/sandbox-log-runs.svelte +++ b/src/lib/components/sandbox-log-runs.svelte @@ -22,7 +22,6 @@ events, activeStream, legacyCells = [], - horizontalScroll = true, onError, }: { sandboxId: string; @@ -30,7 +29,6 @@ events: RunEvent[]; activeStream?: AgentStreamState; legacyCells?: SandboxHistoryCell[]; - horizontalScroll?: boolean; onError?: (message: string) => void; } = $props(); @@ -293,7 +291,6 @@ {loadingEarlier} {downloading} {preserveLine} - {horizontalScroll} onViewportLine={(line) => (anchorBeforeLine = line)} onQuery={(value) => (query = value)} onDownload={() => void download()} diff --git a/src/lib/components/sandbox-workbench.svelte b/src/lib/components/sandbox-workbench.svelte index ae1b82a..60945f5 100644 --- a/src/lib/components/sandbox-workbench.svelte +++ b/src/lib/components/sandbox-workbench.svelte @@ -556,7 +556,6 @@ {runs} {events} {activeStream} - horizontalScroll={!embedded} legacyCells={historyCells.filter((cell) => !cell.runId && !cell.id.endsWith('-legacy-log'))} onError={(message) => (error = message)} /> @@ -564,7 +563,6 @@ query={contextLogQuery} lines={fallbackLogLines} loadedLineCount={fallbackLogLines.length} - horizontalScroll={!embedded} onQuery={(value) => (contextLogQuery = value)} onDownload={downloadContextLog} />{/if} diff --git a/src/routes/EventDetail.svelte b/src/routes/EventDetail.svelte index 06ea02a..c9c0488 100644 --- a/src/routes/EventDetail.svelte +++ b/src/routes/EventDetail.svelte @@ -34,8 +34,9 @@ /** 左侧事件栏收起后,右侧的日志占满宽度。 */ let traceCollapsed = $state(false); // 左栏宽度占整行的百分比,拖动分隔线调整,记在浏览器里。 - const TRACE_WIDTH_KEY = 'agent-compose:event-trace-width'; - const TRACE_WIDTH_DEFAULT = 42; + // 改默认宽度时换一个 key,让旧的记忆值失效。 + const TRACE_WIDTH_KEY = 'agent-compose:event-trace-width:v3'; + const TRACE_WIDTH_DEFAULT = 28; const TRACE_WIDTH_MIN = 20; const TRACE_WIDTH_MAX = 70; let traceWidth = $state(clampTraceWidth(Number(localStorage.getItem(TRACE_WIDTH_KEY)) || TRACE_WIDTH_DEFAULT)); @@ -248,7 +249,9 @@ >
{/if} -
+