Files
UHD_Media_Tool/apps/web/app/routes/console/agent.$runId.tsx
T
rootandClaude Opus 5.5 c9b4ceb301 fix(web): 控制台界面细节与 uhd_web 控件规范对齐
- 顶栏搜索移进右侧玻璃胶囊;输入框改淡玻璃(边线 0.46 → 0.16,悬停加深,聚焦 / 出错保留光晕)
- 新增 SegmentedControl(滑动 seg-thumb),替换站点、下载、订阅、文件、智能体列表及对话框里的实心选中块;Tabs 改为同一枚滑块
- 开关型按钮统一 outline + aria-pressed 选中外观;页头 / 工具栏次操作描边、图标钮描边圆;文件排序改 Select;下载总速度加标签
- 分页一页放得下时只留总数、空列表不渲染、按容器宽度收起按钮
- 运行状态存储区重排;智能体列表页与会话页共用外壳路由,标题与左栏不再重挂载
- 站点卡片「⋯」不再单独换行;设置导航、状态计数、多选条件改玻璃选中态

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
2026-10-08 12:02:48 +08:00

48 lines
1.9 KiB
TypeScript

import { ArrowLeft, PanelRightOpen } from "lucide-react";
import { Link, useNavigate, useOutletContext, useParams } from "react-router";
import { agentMockEnabled } from "~/api/agent.ts";
import { agentListHref } from "~/components/agent/agent-nav.ts";
import { AgentRunPanel } from "~/components/agent/agent-run-panel.tsx";
import { agentReturnPath, showAgentRunInDrawer } from "~/components/agent/agent-store.ts";
import { Button } from "~/components/ui/button.tsx";
import type { AgentOutletContext } from "./agent.tsx";
// 会话页的右栏(AGUI-3):会话列占满(顶部概况条、底部输入区);标题与左栏会话列表在外壳 agent.tsx,切换会话不重挂载。
// 步骤、子会话、预算与模型在概况条里。
export default function AgentRunPage() {
const { runId = "" } = useParams();
const navigate = useNavigate();
const mock = agentMockEnabled();
const { group } = useOutletContext<AgentOutletContext>();
return (
<div className="pg-slab flex h-[calc(100dvh-10.25rem)] min-h-[28rem] flex-col gap-2 rounded-2xl p-3 md:p-4 lg:h-[calc(100dvh-11.25rem)]">
<Button asChild variant="ghost" size="sm" className="-mt-1 -ml-2 self-start text-muted-foreground lg:hidden">
<Link to={agentListHref(group, mock)}>
<ArrowLeft />
全部会话
</Link>
</Button>
<AgentRunPanel
key={runId}
runId={runId}
className="min-h-0 flex-1"
actions={
// 整页 → 抽屉:回到进智能体页面之前的页面,会话在抽屉里接着看
<Button
variant="outline"
size="icon-sm"
aria-label="在侧边打开"
title="在侧边打开,回到之前的页面"
onClick={() => {
showAgentRunInDrawer(runId);
navigate(agentReturnPath() ?? "/console");
}}
>
<PanelRightOpen />
</Button>
}
/>
</div>
);
}