- Inject the site account Cookie (manual + auto-login session, session wins)
into the camofox profile before the first tab opens; password accounts
without a session run refresh-login first; API Key sites are skipped.
- Cookie expired after injection -> credential.status=expired; cookie
accounts go to waiting/login_required ("log in once, applies site-wide").
- Write back site-domain cookies from the browser on handover, session close,
every 10 min of activity, and from refresh-login when the stored cookie is
invalid (verified before saving). user_info.cookieOrigin records
source=browser; source shown as manual/login/browser in the origin view.
- New camofox plugin umt-cookies (GET/POST /umt/sessions/:userId/cookies
under the access key); profile dir 0700/files 0600 in the desktop image.
- Single entry: sources-identity/service/credentials.ts.
- Real check: HHClub cookie injected into a fresh profile -> home page
logged in (logout link present), 5 cookies read back.
Requires rebuilding umt-browser-desktop (docker compose build camofox &&
docker compose up -d camofox) to take effect.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
50 lines
2.0 KiB
TypeScript
50 lines
2.0 KiB
TypeScript
import { ArrowLeft } from "lucide-react";
|
|
import { Link, useParams } from "react-router";
|
|
import { agentMockEnabled, useAgentRun } from "~/api/agent.ts";
|
|
import { AgentRunPanel } from "~/components/agent/agent-run-panel.tsx";
|
|
import { AgentSessionList } from "~/components/agent/agent-session-list.tsx";
|
|
import { splitContextGoal } from "~/components/agent/agent-store.ts";
|
|
import { PageHeader } from "~/components/console/page-header.tsx";
|
|
import { Button } from "~/components/ui/button.tsx";
|
|
|
|
// 会话页:左栏会话列表(xl 以上)· 中间会话列(统一最大宽度,输入区固定在底部)· 右侧栏状态/步骤/预算(lg 以上;
|
|
// 更窄时换成会话列顶部的可折叠概况条)。
|
|
export default function AgentRunPage() {
|
|
const { runId = "" } = useParams();
|
|
const run = useAgentRun(runId);
|
|
const mock = agentMockEnabled();
|
|
const suffix = mock ? "?mock=1" : "";
|
|
return (
|
|
<>
|
|
<PageHeader
|
|
title="Agent 会话"
|
|
description={
|
|
run.data ? (
|
|
<span className="line-clamp-2 break-words" title={run.data.run.goal}>
|
|
{splitContextGoal(run.data.run.goal).text}
|
|
</span>
|
|
) : (
|
|
"加载中…"
|
|
)
|
|
}
|
|
actions={
|
|
<Button asChild variant="ghost" size="sm">
|
|
<Link to={`/console/agent${suffix}`}>
|
|
<ArrowLeft />
|
|
全部会话
|
|
</Link>
|
|
</Button>
|
|
}
|
|
/>
|
|
<div className="grid grid-cols-1 gap-4 xl:grid-cols-[minmax(0,16rem)_minmax(0,1fr)]">
|
|
<aside className="pg-slab hidden rounded-xl p-3 xl:block xl:h-[calc(100dvh-13rem)] xl:overflow-hidden">
|
|
<AgentSessionList activeId={runId} hrefFor={(id) => `/console/agent/${id}${suffix}`} className="h-full" />
|
|
</aside>
|
|
<div className="pg-slab flex h-[calc(100dvh-11rem)] min-h-[32rem] flex-col rounded-xl p-3 md:p-4 lg:h-[calc(100dvh-13rem)]">
|
|
<AgentRunPanel key={runId} runId={runId} className="flex-1" />
|
|
</div>
|
|
</div>
|
|
</>
|
|
);
|
|
}
|