@dudko.dev/agent-web-react 0.0.39 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -7
- package/dist/{chunk-RJM7JCWI.js → chunk-V4JGQQRB.js} +5 -1
- package/dist/chunk-V4JGQQRB.js.map +1 -0
- package/dist/{elicitation-DdzjMut9.d.cts → elicitation-Dp6Fi6ZA.d.cts} +17 -0
- package/dist/{elicitation-DdzjMut9.d.ts → elicitation-Dp6Fi6ZA.d.ts} +17 -0
- package/dist/index.cjs +511 -264
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +133 -10
- package/dist/index.d.ts +133 -10
- package/dist/index.js +507 -264
- package/dist/index.js.map +1 -1
- package/dist/mcp.d.cts +2 -2
- package/dist/mcp.d.ts +2 -2
- package/dist/pipeline.cjs.map +1 -1
- package/dist/pipeline.js +1 -1
- package/dist/styles.css +93 -3
- package/package.json +3 -3
- package/dist/chunk-RJM7JCWI.js.map +0 -1
package/README.md
CHANGED
|
@@ -34,14 +34,15 @@ app with a single hook and (optionally) a set of pre-styled components:
|
|
|
34
34
|
[docs/chat.md](docs/chat.md#talking-to-the-agent-while-it-works).
|
|
35
35
|
- 🧩 **Building blocks** — `<AgentComposer>`, `<MessageList>`, `<StepList>`,
|
|
36
36
|
`<ToolApprovalPrompt>`, `<ElicitationPrompt>`, `<ApprovalModeSwitch>`, `<ChatHistoryList>`, `<FilesPanel>`,
|
|
37
|
-
`<LearnedSkills>`, `<ContextMeter>`, `<PlanView>`, `<ModelLoadBar>`, `<UsageBadge>`, `<ApiKeyForm>`; hooks `useChatHistory`,
|
|
37
|
+
`<LearnedSkills>`, `<MemoryCard>`, `<ContextMeter>`, `<PlanView>`, `<ModelLoadBar>`, `<UsageBadge>`, `<ApiKeyForm>`; hooks `useChatHistory`,
|
|
38
38
|
`useVirtualFiles`, `useSpeechToText`, `useFollowScroll` (a transcript that follows the answer and leaves a reader where they are); MCP hooks `useMcp` / `useMcpServers` live in
|
|
39
39
|
[`@dudko.dev/agent-web-react/mcp`](#mcp-hooks-live-in-their-own-subpath).
|
|
40
40
|
- 🎙️ **Voice** — dictation through your own model (`speech.createRecognizer` +
|
|
41
41
|
`createRecordingRecognizer`: record, then transcribe; the words land in the box), voice
|
|
42
42
|
messages (`voiceMessage`: record and attach the audio, for a core that transcribes it) and a
|
|
43
43
|
**Listen** button on each answer (`readAloud`: the device's voices with `createBrowserSpeaker`,
|
|
44
|
-
or a provider's with `createAudioSpeaker`; Markdown read as words, code not spelled out
|
|
44
|
+
or a provider's with `createAudioSpeaker`; Markdown read as words, code not spelled out, each
|
|
45
|
+
answer in its own language - `languageOfText`). The
|
|
45
46
|
microphone is asked for on a tap and let go when the recording ends — see
|
|
46
47
|
[docs/chat.md](docs/chat.md#voice-dictation-voice-messages-read-aloud).
|
|
47
48
|
- 🔑 **`useCredentials`** — store BYOK API keys **encrypted at rest**
|
|
@@ -192,7 +193,7 @@ function Custom() {
|
|
|
192
193
|
| --- | --- |
|
|
193
194
|
| `run(goal, { images, files, attachments, label })` | Start a run (with attachments); resolves with the `RunResult`. When the conversation is running in another tab it waits for that run (`sessionBusy`), then goes with that turn in its memory |
|
|
194
195
|
| `stop()` | Abort this tab's in-flight run (going, or waiting for the session). Never another tab's: that is `stopRemote()` |
|
|
195
|
-
| `stopRemote()`, `sendRemote(text)` | Stop / write to the conversation's run in another tab (`remote?.running`). A text it
|
|
196
|
+
| `stopRemote()`, `sendRemote(text)` | Stop / write to the conversation's run in another tab (`remote?.running`). A text waits in `queued` (`sentTo: 'another-tab'`, "waiting for the other tab to pick it up") until that tab answers - with no time limit: a tab the browser froze answers when it wakes. Taken, that run's own entry takes its place; refused, or that run ended without it, it comes back as `undelivered`. `<AgentComposer>` uses them while it follows such a run |
|
|
196
197
|
| `agent` | the core `Agent` itself (or `undefined` until built): `agent.usage` / `agent.sessionUsage()` (tokens spent, counted live; core ≥ 0.0.32), `agent.listLearnedSkills()`, `agent.capabilities` |
|
|
197
198
|
| `forgetSkill(name)` | delete one of the agent's own lessons from its notebook |
|
|
198
199
|
| `sendUndelivered()` / `discardUndelivered()` | send, or drop, what a stopped run never showed the agent |
|
|
@@ -852,7 +853,7 @@ use them standalone. The full guide: [docs/chat.md](docs/chat.md).
|
|
|
852
853
|
| Component | Purpose |
|
|
853
854
|
| --- | --- |
|
|
854
855
|
| `<AgentChat>` | Full panel: transcript with per-answer activity + composer + optional history and files panels. Reads a `controller` prop or the `<AgentProvider>` context. Says when the conversation runs in another tab of the site, waits for an answer there, or waits for it (`showOtherTabs`). |
|
|
855
|
-
| `<AgentComposer>` | The input and its toolbar: attachments, commands, timer, agents, model/thinking, consent, mic, send/stop. The model menu takes `section` per option (a heading over each run of options, e.g. one per provider); both chip menus work from the keyboard (arrows, Home / End, Escape) - see [docs/chat.md](docs/chat.md#the-model-menu-sections-and-keys). `attachments` takes `{ accept, maxBytes, imageMaxDimension, imageMaxPixels, maxSourceBytes, imageMaxSourcePixels, maxImages, maxTotalBytes }`: `maxBytes` (20 MB) is checked on what is sent, so a photo over it is downscaled (1568 px / 1.15 MP) and sent with the note "downscaled from …", and a file `convertFile` turns into text is judged by its text - neither is refused for its original; that original may be up to `maxSourceBytes` (50 MB, never below `maxBytes`), and a picture's up to `imageMaxSourcePixels` (200 MP, read from the header before decoding); one message holds at most `maxImages` pictures (20) and `maxTotalBytes` (20 MB) of attachments as they go - a file past either is left out in words, the rest kept - see [docs/chat.md](docs/chat.md#attachments-images-pdfs-files-urls). |
|
|
856
|
+
| `<AgentComposer>` | The input and its toolbar: attachments, commands, timer, agents, model/thinking, consent, mic, send/stop. The model menu takes `section` per option (a heading over each run of options, e.g. one per provider); both chip menus work from the keyboard (arrows, Home / End, Escape) - see [docs/chat.md](docs/chat.md#the-model-menu-sections-and-keys). `attachments` takes `{ accept, maxBytes, imageMaxDimension, imageMaxPixels, maxSourceBytes, imageMaxSourcePixels, maxImages, maxTotalBytes }`: `maxBytes` (20 MB) is checked on what is sent, so a photo over it is downscaled (1568 px / 1.15 MP) and sent with the note "downscaled from …", and a file `convertFile` turns into text is judged by its text - neither is refused for its original; that original may be up to `maxSourceBytes` (50 MB, never below `maxBytes`), and a picture's up to `imageMaxSourcePixels` (200 MP, read from the header before decoding); one message holds at most `maxImages` pictures (20) and `maxTotalBytes` (20 MB) of attachments as they go - a file past either is left out in words, the rest kept. `convertFile` may return a chip `note` and `images` (`ConvertedImage`: `{ name, blob }`, e.g. a scanned PDF's pages) that go as pictures under the same bounds - see [docs/chat.md](docs/chat.md#attachments-images-pdfs-files-urls). |
|
|
856
857
|
| `<MessageList>` | The transcript; each answer with its steps, tool calls, thoughts, usage. |
|
|
857
858
|
| `<StepList>` / `<ToolCallRow>` | Execution steps / one tool call with its cost and images. With model tiers: the tier / model badge, the escalation line, the earlier attempt's calls (`showTiers`); a replanner failure as a warning (`showReplanFailed`); the decision model's note (`showDecisions`); the subagent tree under its step (`showSubagents`); a `web_search` call's results as plain text and safe links (`showSearchResults`). |
|
|
858
859
|
| `<SubagentTree>` / `<SubagentRow>` | The run's subagents - static ones and the helpers the model started - as an indented tree: status, model, tokens, time and a Stop button per node (`onStop`, `showUsage`, `showTools`, `renderSubagent`). |
|
|
@@ -869,6 +870,7 @@ use them standalone. The full guide: [docs/chat.md](docs/chat.md).
|
|
|
869
870
|
| `<ChatHistoryList>` | Saved chats (from `useChatHistory`; the list follows what other tabs of the site save). |
|
|
870
871
|
| `<FilesPanel>` | A `VirtualFileSystem`, live: preview, download, delete, upload. |
|
|
871
872
|
| `<LearnedSkills>` | The agent's notebook (`learning`): its lessons, where each came from, forget. |
|
|
873
|
+
| `<MemoryCard>` | A fact your app remembered, changed or forgot about the user, as a card in the answer: what happened, the fact as text, Undo (`kind`, `text`, `onUndo`, `undone`, `problem`). Placed by `<AgentChat renderToolCard>` (a tool call drawn in the answer, outside the folded activity). See [docs/chat.md](docs/chat.md#tool-cards-a-call-drawn-in-the-answer). |
|
|
872
874
|
| `<ContextMeter>` | Tokens by kind, budget bar, last compaction, Compact. |
|
|
873
875
|
| `<PlanView>` | A plan's reasoning + step list. |
|
|
874
876
|
| `<ModelLoadBar>` | WebLLM download/init progress. |
|
|
@@ -984,14 +986,19 @@ the hooks keep them in step, with nothing to configure beyond a shared `memory`
|
|
|
984
986
|
|
|
985
987
|
- **The conversation's run in another tab shows here live** (`useAgent`'s `remote`): its steps and
|
|
986
988
|
answer stream in, `isRunning` is true, the composer's text goes to that run (`sendRemote`, shown
|
|
987
|
-
there "from another tab"
|
|
989
|
+
there "from another tab"; here "waiting for the other tab to pick it up", `queuedForOtherTab`, until
|
|
990
|
+
that tab answers - a tab in the background may answer minutes later, and only a refusal, or the
|
|
991
|
+
end of its run without the text, offers it again, so one message never gets two runs) and Stop
|
|
992
|
+
stops it (`stopRemote`); `stop()` / `send()` stay this tab's.
|
|
988
993
|
Its consent requests are shown as waiting there and are answered only there. When it ends, the
|
|
989
994
|
chat is read again from what that tab saved. `watch: false` switches this off.
|
|
990
995
|
- **One run per conversation.** A run started here while the conversation runs elsewhere waits
|
|
991
996
|
for it (`sessionBusy`, "Waiting for the other tab to finish this conversation…", the goal shown
|
|
992
997
|
queued - "waiting for the other tab to finish", `queuedForSession`, its `queued` entry marked
|
|
993
998
|
`session`, while the wait lasts) and then goes, with that turn in the agent's memory; a saved chat
|
|
994
|
-
keeps both turns, in order (`saveChat`: one transaction, merged by message identity)
|
|
999
|
+
keeps both turns, in order (`saveChat`: one transaction, merged by message identity) - also when
|
|
1000
|
+
a tab the browser froze saves its turn after the other tab saved the next one (each turn placed
|
|
1001
|
+
by when it began, `ChatMessage.startedAt`).
|
|
995
1002
|
- **Another tab deletes or upgrades the database** ("delete everything", a newer copy of the site):
|
|
996
1003
|
`ChatHistoryStore` closes its connection on `versionchange`, like the core's stores, so that tab is
|
|
997
1004
|
not held up; the next use opens a new, empty database (after an upgrade by a newer copy, an error
|
|
@@ -1001,7 +1008,7 @@ the hooks keep them in step, with nothing to configure beyond a shared `memory`
|
|
|
1001
1008
|
the agent's notebook (`learned`, through `agent.reloadLearnedSkills()`).
|
|
1002
1009
|
|
|
1003
1010
|
`<AgentChat>` shows the notes above the composer (`showOtherTabs`; labels `remoteRunning`,
|
|
1004
|
-
`remoteWaitingConsent`, `remoteGone`, `sessionBusy`, `queuedForSession`, `fromAnotherTab`). Details: [docs/chat.md](docs/chat.md#several-tabs).
|
|
1011
|
+
`remoteWaitingConsent`, `remoteGone`, `sessionBusy`, `queuedForSession`, `queuedForOtherTab`, `fromAnotherTab`). Details: [docs/chat.md](docs/chat.md#several-tabs).
|
|
1005
1012
|
|
|
1006
1013
|
## How it fits together
|
|
1007
1014
|
|
|
@@ -109,6 +109,7 @@ var followOtherTabs = (core, dbName, accept, settle, ms = 100) => {
|
|
|
109
109
|
later.cancel();
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
|
+
var remoteAnswerOf = (ok, stillWatching) => ok ? "taken" : stillWatching ? "refused" : "unknown";
|
|
112
113
|
|
|
113
114
|
// src/components/icons.tsx
|
|
114
115
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -189,6 +190,7 @@ var BookIcon = ({ size, className }) => /* @__PURE__ */ jsxs("svg", { ...base(si
|
|
|
189
190
|
/* @__PURE__ */ jsx("path", { d: "M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2Z" }),
|
|
190
191
|
/* @__PURE__ */ jsx("path", { d: "M4 19V5M9 7h6" })
|
|
191
192
|
] });
|
|
193
|
+
var BookmarkIcon = ({ size, className }) => /* @__PURE__ */ jsx("svg", { ...base(size), className, children: /* @__PURE__ */ jsx("path", { d: "M6 3h12v18l-6-4-6 4Z" }) });
|
|
192
194
|
var GlobeIcon = ({ size, className }) => /* @__PURE__ */ jsxs("svg", { ...base(size), className, children: [
|
|
193
195
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
194
196
|
/* @__PURE__ */ jsx("path", { d: "M3 12h18M12 3c3 3.2 3 14.8 0 18M12 3c-3 3.2-3 14.8 0 18" })
|
|
@@ -249,6 +251,7 @@ var MessageIcon = ({ size, className }) => /* @__PURE__ */ jsx("svg", { ...base(
|
|
|
249
251
|
export {
|
|
250
252
|
errMessage,
|
|
251
253
|
followOtherTabs,
|
|
254
|
+
remoteAnswerOf,
|
|
252
255
|
SendIcon,
|
|
253
256
|
StopIcon,
|
|
254
257
|
SpinnerIcon,
|
|
@@ -274,6 +277,7 @@ export {
|
|
|
274
277
|
FileIcon,
|
|
275
278
|
HistoryIcon,
|
|
276
279
|
BookIcon,
|
|
280
|
+
BookmarkIcon,
|
|
277
281
|
GlobeIcon,
|
|
278
282
|
DownloadIcon,
|
|
279
283
|
QuestionIcon,
|
|
@@ -300,4 +304,4 @@ export {
|
|
|
300
304
|
webSearchOf,
|
|
301
305
|
formatProbability
|
|
302
306
|
};
|
|
303
|
-
//# sourceMappingURL=chunk-
|
|
307
|
+
//# sourceMappingURL=chunk-V4JGQQRB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/format.ts","../src/util.ts","../src/components/icons.tsx"],"sourcesContent":["/** Compact one-line preview of a tool input/output value, truncated. */\nexport const previewValue = (value: unknown, max = 140): string => {\n if (value === undefined) return ''\n let text: string\n if (typeof value === 'string') text = value\n else {\n try {\n text = JSON.stringify(value)\n } catch {\n text = String(value)\n }\n }\n text = text.replace(/\\s+/g, ' ').trim()\n return text.length > max ? `${text.slice(0, max - 1)}…` : text\n}\n\n/** 1234 → \"1.2k\", 12345 → \"12k\". */\nexport const formatTokens = (n: number): string =>\n n >= 1000 ? `${(n / 1000).toFixed(n >= 10_000 ? 0 : 1)}k` : String(n)\n\n/** 340 → \"340 ms\", 4200 → \"4.2 s\", 125_000 → \"2m 5s\". */\nexport const formatDuration = (ms: number): string => {\n if (ms < 1000) return `${Math.round(ms)} ms`\n if (ms < 60_000) return `${(ms / 1000).toFixed(ms < 10_000 ? 1 : 0)} s`\n const s = Math.round(ms / 1000)\n return `${Math.floor(s / 60)}m ${s % 60}s`\n}\n\nconst isDataImage = (v: unknown): v is string =>\n typeof v === 'string' && /^data:image\\/[\\w.+-]+;base64,/.test(v)\n\n/**\n * Images inside a tool result, as data URLs: MCP image parts\n * (`{ type: 'image', data, mimeType }`), data-URL strings, and objects that\n * carry one (`{ dataUrl }` / `{ url: 'data:…' }`). Looks two levels deep.\n */\nexport const imagesInOutput = (output: unknown, depth = 0): string[] => {\n if (depth > 2 || output == null) return []\n if (isDataImage(output)) return [output]\n if (Array.isArray(output)) return output.flatMap((v) => imagesInOutput(v, depth + 1))\n if (typeof output === 'object') {\n const o = output as Record<string, unknown>\n if (o.type === 'image' && typeof o.data === 'string') {\n const mime = typeof o.mimeType === 'string' ? o.mimeType : 'image/png'\n return [o.data.startsWith('data:') ? o.data : `data:${mime};base64,${o.data}`]\n }\n for (const key of ['dataUrl', 'url', 'image'])\n if (isDataImage(o[key])) return [o[key] as string]\n if (depth < 2) return Object.values(o).flatMap((v) => imagesInOutput(v, depth + 1))\n }\n return []\n}\n\n/** One result of the core's `web_search` tool, as far as a UI shows it. */\nexport interface WebSearchResultView {\n title: string\n /** An http(s) address - anything else is left out. */\n url: string\n /** The host of `url`, for the line under the title. */\n host: string\n snippet: string\n date?: string\n}\n\nexport interface WebSearchView {\n query: string\n results: WebSearchResultView[]\n /** Results the egress policy left out. */\n filtered: number\n truncated: boolean\n}\n\nconst text = (v: unknown, max: number): string =>\n typeof v === 'string' ? v.replace(/\\s+/g, ' ').trim().slice(0, max) : ''\n\n/**\n * The result of the core's `web_search` tool (`{ query, results: [{ title, url, snippet, date? }],\n * filtered?, truncated?, untrusted: true }`), or undefined when `output` is not one. Titles and\n * snippets are third-party text: they come back as plain strings, to be rendered as text. A\n * result whose `url` is not http(s) is dropped, so a link can never be a `javascript:` one.\n */\nexport const webSearchOf = (output: unknown): WebSearchView | undefined => {\n let value = output\n if (typeof value === 'string') {\n try {\n value = JSON.parse(value)\n } catch {\n return undefined\n }\n }\n if (!value || typeof value !== 'object' || Array.isArray(value)) return undefined\n const o = value as Record<string, unknown>\n if (typeof o.query !== 'string' || !Array.isArray(o.results)) return undefined\n const results: WebSearchResultView[] = []\n for (const r of o.results.slice(0, 10)) {\n if (!r || typeof r !== 'object') continue\n const item = r as Record<string, unknown>\n if (typeof item.url !== 'string') continue\n let url: URL\n try {\n url = new URL(item.url)\n } catch {\n continue\n }\n if (url.protocol !== 'https:' && url.protocol !== 'http:') continue\n const date = text(item.date, 40)\n results.push({\n title: text(item.title, 200) || url.host,\n url: url.href,\n host: url.host,\n snippet: text(item.snippet, 400),\n ...(date ? { date } : {}),\n })\n }\n return {\n query: text(o.query, 300),\n results,\n filtered: typeof o.filtered === 'number' && o.filtered > 0 ? o.filtered : 0,\n truncated: o.truncated === true,\n }\n}\n\n/** 0.934 → \"0.93\", 0.8 → \"0.8\", 1 → \"1\". */\nexport const formatProbability = (p: number): string => String(Math.round(p * 100) / 100)\n","/** Normalize any thrown value into a message string. */\nexport const errMessage = (err: unknown): string =>\n err instanceof Error ? err.message : String(err)\n\n/**\n * Calls `fn` once, `ms` after the LAST of a burst of calls (trailing): another tab writing a file\n * per tool call, or a chat per settled run, refreshes a view once, not once per notice. `cancel`\n * drops a pending call (on unmount).\n */\nexport const coalesce = (fn: () => void, ms = 100): { call: () => void; cancel: () => void } => {\n let timer: ReturnType<typeof setTimeout> | undefined\n return {\n call: () => {\n if (timer !== undefined) clearTimeout(timer)\n timer = setTimeout(() => {\n timer = undefined\n fn()\n }, ms)\n },\n cancel: () => {\n if (timer !== undefined) clearTimeout(timer)\n timer = undefined\n },\n }\n}\n\n/**\n * The core's `onStorageChange`, or a no-op where the core predates it (the hooks then work as\n * before: this tab's own changes only). One place for the guard every hook needs.\n */\nexport const listenToOtherTabs = (\n core: { onStorageChange?: unknown },\n dbName: string | undefined,\n listener: (change: { kind: string; op: string; key?: string; namespace?: string }) => void,\n): (() => void) =>\n typeof core.onStorageChange === 'function' && dbName\n ? (core.onStorageChange as (db: string, l: typeof listener) => () => void)(dbName, listener)\n : () => undefined\n\n/**\n * Follow another tab's writes to one database: `accept` sees every notice (and says whether it\n * matters here), `settle` runs once, ~`ms` after the last accepted one of a burst. What every hook\n * that follows other tabs uses. The returned function unsubscribes and drops a pending settle.\n */\nexport const followOtherTabs = (\n core: { onStorageChange?: unknown },\n dbName: string | undefined,\n accept: (change: { kind: string; op: string; key?: string; namespace?: string }) => boolean,\n settle: () => void,\n ms = 100,\n): (() => void) => {\n const later = coalesce(settle, ms)\n const off = listenToOtherTabs(core, dbName, (change) => {\n if (accept(change)) later.call()\n })\n return () => {\n off()\n later.cancel()\n }\n}\n\n/**\n * What `sendRemote` makes of `watchSession().send`'s answer: `true` - that tab took it; `false`\n * while this view still watches that conversation - refused, or that run ended without it (the text\n * is offered again); `false` after the watch was closed (another conversation, the view gone) -\n * unknown: that tab may still take it, so nothing is offered.\n */\nexport const remoteAnswerOf = (\n ok: boolean,\n stillWatching: boolean,\n): 'taken' | 'refused' | 'unknown' => (ok ? 'taken' : stillWatching ? 'refused' : 'unknown')\n","// Tiny inline SVG icons — no icon-font or image dependency. Each inherits the\n// current text color (`stroke=\"currentColor\"`) and takes an optional size.\n\nexport interface IconProps {\n size?: number\n className?: string\n}\n\nconst base = (size = 16) => ({\n width: size,\n height: size,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 2,\n strokeLinecap: 'round' as const,\n strokeLinejoin: 'round' as const,\n 'aria-hidden': true,\n})\n\nexport const SendIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M22 2 11 13\" />\n <path d=\"M22 2 15 22l-4-9-9-4Z\" />\n </svg>\n)\n\nexport const StopIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <rect x=\"6\" y=\"6\" width=\"12\" height=\"12\" rx=\"2\" />\n </svg>\n)\n\nexport const SpinnerIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={['awr-spin', className].filter(Boolean).join(' ')}>\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </svg>\n)\n\nexport const CheckIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n)\n\nexport const AlertIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z\" />\n <path d=\"M12 9v4\" />\n <path d=\"M12 17h.01\" />\n </svg>\n)\n\nexport const ArrowUpIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M12 19V5\" />\n <path d=\"m5 12 7-7 7 7\" />\n </svg>\n)\n\nexport const ToolIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76Z\" />\n </svg>\n)\n\nexport const ChevronIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n)\n\nexport const ShieldIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z\" />\n </svg>\n)\n\nexport const BrainIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M9 3a3 3 0 0 0-3 3 3 3 0 0 0-2 5 3 3 0 0 0 2 5 3 3 0 0 0 6 1V4a3 3 0 0 0-3-1Z\" />\n <path d=\"M15 3a3 3 0 0 1 3 3 3 3 0 0 1 2 5 3 3 0 0 1-2 5 3 3 0 0 1-6 1\" />\n </svg>\n)\n\nexport const BotIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <rect x=\"4\" y=\"8\" width=\"16\" height=\"12\" rx=\"3\" />\n <path d=\"M12 8V4\" />\n <path d=\"M9 14h.01M15 14h.01\" />\n </svg>\n)\n\nexport const PlusIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M12 5v14M5 12h14\" />\n </svg>\n)\n\nexport const SlashIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"3\" />\n <path d=\"m15 7-6 10\" />\n </svg>\n)\n\nexport const ClockIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v5l3 2\" />\n </svg>\n)\n\nexport const MicIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <rect x=\"9\" y=\"3\" width=\"6\" height=\"11\" rx=\"3\" />\n <path d=\"M5 11a7 7 0 0 0 14 0M12 18v3\" />\n </svg>\n)\n\n/** A voice message: a waveform. */\nexport const WaveIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M4 10v4M8 6v12M12 3v18M16 7v10M20 10v4\" />\n </svg>\n)\n\n/** Read aloud: a speaker. */\nexport const SpeakerIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M4 9h4l5-4v14l-5-4H4Z\" />\n <path d=\"M16.5 8.5a5 5 0 0 1 0 7M19 6a8.5 8.5 0 0 1 0 12\" />\n </svg>\n)\n\nexport const PauseIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M9 5v14M15 5v14\" />\n </svg>\n)\n\nexport const PlayIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M7 4.5v15l12-7.5Z\" />\n </svg>\n)\n\nexport const BoltIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M13 2 4 14h7l-1 8 9-12h-7Z\" />\n </svg>\n)\n\nexport const EyeIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n)\n\nexport const XIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n)\n\nexport const FileIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z\" />\n <path d=\"M14 3v6h6\" />\n </svg>\n)\n\nexport const HistoryIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M3 12a9 9 0 1 0 3-6.7L3 8\" />\n <path d=\"M3 3v5h5M12 7v5l3 2\" />\n </svg>\n)\n\nexport const BookIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2Z\" />\n <path d=\"M4 19V5M9 7h6\" />\n </svg>\n)\n\n/** A bookmark: something kept for later (a fact the app remembers). */\nexport const BookmarkIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M6 3h12v18l-6-4-6 4Z\" />\n </svg>\n)\n\nexport const GlobeIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M3 12h18M12 3c3 3.2 3 14.8 0 18M12 3c-3 3.2-3 14.8 0 18\" />\n </svg>\n)\n\nexport const DownloadIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M12 3v12m-5-5 5 5 5-5M5 21h14\" />\n </svg>\n)\n\nexport const QuestionIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M21 15a2 2 0 0 1-2 2H8l-5 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2Z\" />\n <path d=\"M9.6 8a2.5 2.5 0 0 1 4.8.8c0 1.7-2.4 2-2.4 3.4\" />\n <path d=\"M12 14.6h.01\" />\n </svg>\n)\n\nexport const ExternalIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M15 3h6v6\" />\n <path d=\"M10 14 21 3\" />\n <path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" />\n </svg>\n)\n\nexport const CodeIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"m8 7-5 5 5 5M16 7l5 5-5 5\" />\n </svg>\n)\n\nexport const FileTextIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9Z\" />\n <path d=\"M14 3v6h6M8 13h8M8 17h6\" />\n </svg>\n)\n\nexport const TableIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M3 10h18M3 15h18M9 4v16M15 4v16\" />\n </svg>\n)\n\nexport const ImageIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\" />\n <circle cx=\"9\" cy=\"10\" r=\"1.6\" />\n <path d=\"m4 18 5.5-5 4 3.5 2.5-2 4 3.5\" />\n </svg>\n)\n\nexport const ChevronUpIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"m6 15 6-6 6 6\" />\n </svg>\n)\n\nexport const LockIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <rect x=\"5\" y=\"11\" width=\"14\" height=\"9\" rx=\"2\" />\n <path d=\"M8 11V8a4 4 0 0 1 8 0v3\" />\n </svg>\n)\n\nexport const NoNetworkIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18M4 4l16 16\" />\n </svg>\n)\n\nexport const ExpandIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M8 3H4v4M16 3h4v4M8 21H4v-4M16 21h4v-4\" />\n </svg>\n)\n\n/** Four corners inward: leave full screen. */\nexport const ShrinkIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M4 8h4V4M20 8h-4V4M4 16h4v4M20 16h-4v4\" />\n </svg>\n)\n\n// ── MCP Apps ─────────────────────────────────────────────────────────────────\n\n/** A window: an app a server shipped. */\nexport const AppIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"3\" />\n <path d=\"M3 9h18M8 6h.01\" />\n </svg>\n)\n\nexport const MoreIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <circle cx=\"5\" cy=\"12\" r=\"1\" />\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n <circle cx=\"19\" cy=\"12\" r=\"1\" />\n </svg>\n)\n\nexport const ReloadIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M3 12a9 9 0 0 1 15.5-6.2L21 8M21 3v5h-5M21 12a9 9 0 0 1-15.5 6.2L3 16M3 21v-5h5\" />\n </svg>\n)\n\n/** A side panel. */\nexport const PanelIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\" />\n <path d=\"M14 4v16\" />\n </svg>\n)\n\nexport const EyeOffIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M10.6 5.1A9.8 9.8 0 0 1 12 5c6.4 0 10 7 10 7a17 17 0 0 1-3 3.8M6.5 6.6A16.6 16.6 0 0 0 2 12s3.6 7 10 7a9.7 9.7 0 0 0 5.3-1.6M3 3l18 18\" />\n </svg>\n)\n\nexport const MessageIcon = ({ size, className }: IconProps) => (\n <svg {...base(size)} className={className}>\n <path d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z\" />\n </svg>\n)\n"],"mappings":";AACO,IAAM,eAAe,CAAC,OAAgB,MAAM,QAAgB;AACjE,MAAI,UAAU,OAAW,QAAO;AAChC,MAAIA;AACJ,MAAI,OAAO,UAAU,SAAU,CAAAA,QAAO;AAAA,OACjC;AACH,QAAI;AACF,MAAAA,QAAO,KAAK,UAAU,KAAK;AAAA,IAC7B,QAAQ;AACN,MAAAA,QAAO,OAAO,KAAK;AAAA,IACrB;AAAA,EACF;AACA,EAAAA,QAAOA,MAAK,QAAQ,QAAQ,GAAG,EAAE,KAAK;AACtC,SAAOA,MAAK,SAAS,MAAM,GAAGA,MAAK,MAAM,GAAG,MAAM,CAAC,CAAC,WAAMA;AAC5D;AAGO,IAAM,eAAe,CAAC,MAC3B,KAAK,MAAO,IAAI,IAAI,KAAM,QAAQ,KAAK,MAAS,IAAI,CAAC,CAAC,MAAM,OAAO,CAAC;AAG/D,IAAM,iBAAiB,CAAC,OAAuB;AACpD,MAAI,KAAK,IAAM,QAAO,GAAG,KAAK,MAAM,EAAE,CAAC;AACvC,MAAI,KAAK,IAAQ,QAAO,IAAI,KAAK,KAAM,QAAQ,KAAK,MAAS,IAAI,CAAC,CAAC;AACnE,QAAM,IAAI,KAAK,MAAM,KAAK,GAAI;AAC9B,SAAO,GAAG,KAAK,MAAM,IAAI,EAAE,CAAC,KAAK,IAAI,EAAE;AACzC;AAEA,IAAM,cAAc,CAAC,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tab's own copy, never this one.
|
|
882
882
|
*/
|
|
883
883
|
remote?: true;
|
|
884
|
+
/**
|
|
885
|
+
* When the run of its turn began (ms epoch: the hook's `at` on `run.start`); the user message and
|
|
886
|
+
* the answer of a turn carry the same. Absent without the hook's timestamps and on chats saved
|
|
887
|
+
* before it existed. It keeps a turn in its place when two tabs save one chat: one run of a
|
|
888
|
+
* conversation goes at a time (the session lock), so the turn that began first is the earlier
|
|
889
|
+
* one, whichever tab saved first (`mergeChatRecord`).
|
|
890
|
+
*/
|
|
891
|
+
startedAt?: number;
|
|
884
892
|
/** User turn: what was attached (images, files). */
|
|
885
893
|
attachments?: ChatAttachment[];
|
|
886
894
|
/** Assistant turn: the run's steps — tool calls, thoughts, subagents — as they happened. */
|
|
@@ -1234,6 +1242,15 @@ interface QueuedMessageView {
|
|
|
1234
1242
|
* `queuedForSession` for it, not `queuedWaiting`.
|
|
1235
1243
|
*/
|
|
1236
1244
|
session?: SessionHolder;
|
|
1245
|
+
/**
|
|
1246
|
+
* What THIS tab said to the conversation's run in another tab (`sendRemote`), while that tab has
|
|
1247
|
+
* not answered: the chat shows `queuedForOtherTab` for it. That tab answers when it takes the
|
|
1248
|
+
* message - then its own entry (`message.queued`, marked `origin: 'another-tab'`) takes this
|
|
1249
|
+
* one's place - or refuses it, or its run ends without it: then the text comes back in
|
|
1250
|
+
* `undelivered`. A tab the browser froze in the background answers when it wakes; until then the
|
|
1251
|
+
* entry stays.
|
|
1252
|
+
*/
|
|
1253
|
+
sentTo?: 'another-tab';
|
|
1237
1254
|
}
|
|
1238
1255
|
/**
|
|
1239
1256
|
* A message the user sent while the run was going, after it reached the agent.
|
|
@@ -881,6 +881,14 @@ interface ChatMessage {
|
|
|
881
881
|
* `useChatHistory` saves a chat from here with that tab's own copy, never this one.
|
|
882
882
|
*/
|
|
883
883
|
remote?: true;
|
|
884
|
+
/**
|
|
885
|
+
* When the run of its turn began (ms epoch: the hook's `at` on `run.start`); the user message and
|
|
886
|
+
* the answer of a turn carry the same. Absent without the hook's timestamps and on chats saved
|
|
887
|
+
* before it existed. It keeps a turn in its place when two tabs save one chat: one run of a
|
|
888
|
+
* conversation goes at a time (the session lock), so the turn that began first is the earlier
|
|
889
|
+
* one, whichever tab saved first (`mergeChatRecord`).
|
|
890
|
+
*/
|
|
891
|
+
startedAt?: number;
|
|
884
892
|
/** User turn: what was attached (images, files). */
|
|
885
893
|
attachments?: ChatAttachment[];
|
|
886
894
|
/** Assistant turn: the run's steps — tool calls, thoughts, subagents — as they happened. */
|
|
@@ -1234,6 +1242,15 @@ interface QueuedMessageView {
|
|
|
1234
1242
|
* `queuedForSession` for it, not `queuedWaiting`.
|
|
1235
1243
|
*/
|
|
1236
1244
|
session?: SessionHolder;
|
|
1245
|
+
/**
|
|
1246
|
+
* What THIS tab said to the conversation's run in another tab (`sendRemote`), while that tab has
|
|
1247
|
+
* not answered: the chat shows `queuedForOtherTab` for it. That tab answers when it takes the
|
|
1248
|
+
* message - then its own entry (`message.queued`, marked `origin: 'another-tab'`) takes this
|
|
1249
|
+
* one's place - or refuses it, or its run ends without it: then the text comes back in
|
|
1250
|
+
* `undelivered`. A tab the browser froze in the background answers when it wakes; until then the
|
|
1251
|
+
* entry stays.
|
|
1252
|
+
*/
|
|
1253
|
+
sentTo?: 'another-tab';
|
|
1237
1254
|
}
|
|
1238
1255
|
/**
|
|
1239
1256
|
* A message the user sent while the run was going, after it reached the agent.
|