fix(agent): 抽屉与整页之间的切换
- 在智能体页面按 Ctrl+J / 点智能体入口聚焦页面输入框,不再在抽屉里叠一份同一会话 - 会话页统计行右侧加「在侧边打开」:回到进智能体页面之前的页面,会话在抽屉里接着看 - 窄屏顶栏按钮与快捷键、悬浮按钮共用同一套切换 - 抽屉关闭钮放进标题栏按钮行(原来绝对定位,比其它按钮低 5px) - 关闭抽屉后焦点回到打开前的元素(快捷键打开没有触发元素,原来落到 body) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
1 parent
93a5341688
commit
a87c2c19c4
6 files changed
+150
-25
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { useQueryClient } from "@tanstack/react-query";
|
||||
import { type AgentRunStatus, EventType } from "@umt/contracts";
|
||||
import { ChevronDown, FlaskConical, ListChecks, RefreshCw, WifiOff } from "lucide-react";
|
||||
import { useId, useRef, useState } from "react";
|
||||
import { type ReactNode, useId, useRef, useState } from "react";
|
||||
import { useNavigate } from "react-router";
|
||||
import { toast } from "sonner";
|
||||
import {
|
||||
@@ -289,10 +289,13 @@ export function AgentRunPanel({
|
||||
compact = false,
|
||||
className,
|
||||
onCreated,
|
||||
actions,
|
||||
}: {
|
||||
runId: string;
|
||||
compact?: boolean;
|
||||
className?: string;
|
||||
/** 统计行右侧的操作(会话页的「在侧边打开」) */
|
||||
actions?: ReactNode;
|
||||
/** /重跑 之后:缺省跳到新会话页;抽屉里改成在抽屉内打开 */
|
||||
onCreated?: (runId: string) => void;
|
||||
}) {
|
||||
@@ -392,7 +395,14 @@ export function AgentRunPanel({
|
||||
</StatusBadge>
|
||||
</div>
|
||||
) : null}
|
||||
<RunStatsLine snapshot={run.data} live={live} className={column} />
|
||||
{actions ? (
|
||||
<div className={cn(column, "-my-1 flex min-w-0 items-center gap-2")}>
|
||||
<RunStatsLine snapshot={run.data} live={live} className="min-w-0 flex-1" />
|
||||
<div className="flex shrink-0 items-center gap-1">{actions}</div>
|
||||
</div>
|
||||
) : (
|
||||
<RunStatsLine snapshot={run.data} live={live} className={column} />
|
||||
)}
|
||||
<RunOverviewBar
|
||||
snapshot={run.data}
|
||||
status={shownStatus}
|
||||
|
||||
Reference in new issue
Block a user