@athenaintel/react 0.42.2 → 0.43.0
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 +10 -0
- package/dist/agent-runtime/src/conversation-list-groups.d.ts +74 -0
- package/dist/agent-runtime/src/index.d.ts +1 -0
- package/dist/agent-runtime/src/tool-metadata.cjs +0 -8
- package/dist/agent-runtime/src/tool-metadata.cjs.map +1 -1
- package/dist/agent-runtime/src/tool-metadata.js +0 -8
- package/dist/agent-runtime/src/tool-metadata.js.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-voice.cjs +30 -15
- package/dist/agent-runtime/src/use-deep-agent-voice.cjs.map +1 -1
- package/dist/agent-runtime/src/use-deep-agent-voice.d.ts +8 -0
- package/dist/agent-runtime/src/use-deep-agent-voice.js +30 -15
- package/dist/agent-runtime/src/use-deep-agent-voice.js.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.cjs +8 -2
- package/dist/chat/super-grouping/SuperGroupingCard.cjs.map +1 -1
- package/dist/chat/super-grouping/SuperGroupingCard.d.ts +6 -1
- package/dist/chat/super-grouping/SuperGroupingCard.js +8 -2
- package/dist/chat/super-grouping/SuperGroupingCard.js.map +1 -1
- package/dist/chat/super-grouping/ToolTimeline.cjs +27 -0
- package/dist/chat/super-grouping/ToolTimeline.cjs.map +1 -1
- package/dist/chat/super-grouping/ToolTimeline.d.ts +5 -1
- package/dist/chat/super-grouping/ToolTimeline.js +27 -0
- package/dist/chat/super-grouping/ToolTimeline.js.map +1 -1
- package/dist/chat/super-grouping/index.d.ts +1 -0
- package/dist/chat/super-grouping/timeline-step.cjs +61 -2
- package/dist/chat/super-grouping/timeline-step.cjs.map +1 -1
- package/dist/chat/super-grouping/timeline-step.d.ts +13 -1
- package/dist/chat/super-grouping/timeline-step.js +61 -2
- package/dist/chat/super-grouping/timeline-step.js.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.cjs +144 -35
- package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
- package/dist/chat-ui/mentions/mention-chip.d.ts +17 -1
- package/dist/chat-ui/mentions/mention-chip.js +146 -37
- package/dist/chat-ui/mentions/mention-chip.js.map +1 -1
- package/dist/chat-ui/mentions/use-mention-asset.cjs +140 -0
- package/dist/chat-ui/mentions/use-mention-asset.cjs.map +1 -0
- package/dist/chat-ui/mentions/use-mention-asset.d.ts +16 -0
- package/dist/chat-ui/mentions/use-mention-asset.js +140 -0
- package/dist/chat-ui/mentions/use-mention-asset.js.map +1 -0
- package/dist/chat-ui/rich-text/chat-link.cjs +5 -4
- package/dist/chat-ui/rich-text/chat-link.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-link.d.ts +2 -3
- package/dist/chat-ui/rich-text/chat-link.js +6 -5
- package/dist/chat-ui/rich-text/chat-link.js.map +1 -1
- package/dist/chat-ui/rich-text/chat-node-views.cjs +1 -0
- package/dist/chat-ui/rich-text/chat-node-views.cjs.map +1 -1
- package/dist/chat-ui/rich-text/chat-node-views.js +1 -0
- package/dist/chat-ui/rich-text/chat-node-views.js.map +1 -1
- package/dist/react/package.json.cjs +1 -1
- package/dist/react/package.json.js +1 -1
- package/dist/references/src/tool-option-schemas.d.ts +0 -34
- package/dist/styles.css +1 -1
- package/dist/threads/statewire-thread-list.cjs +6 -2
- package/dist/threads/statewire-thread-list.cjs.map +1 -1
- package/dist/threads/statewire-thread-list.js +6 -2
- package/dist/threads/statewire-thread-list.js.map +1 -1
- package/dist/tools/tool-summary.cjs +0 -2
- package/dist/tools/tool-summary.cjs.map +1 -1
- package/dist/tools/tool-summary.js +0 -2
- package/dist/tools/tool-summary.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Globe2Icon } from "lucide-react";
|
|
3
3
|
import { useState } from "react";
|
|
4
|
-
import { MentionLink } from "../mentions/mention-chip.js";
|
|
4
|
+
import { MentionLink, CHIP_PILL_CLASS, CHIP_LINK_CLASS, CHIP_ICON_CLASS } from "../mentions/mention-chip.js";
|
|
5
5
|
import { isWebHref, buildScrollToTextUrl, sourceFaviconUrl } from "./citation-anchors.js";
|
|
6
|
+
import { cn } from "cnfast";
|
|
6
7
|
function ChatLink({
|
|
7
8
|
href,
|
|
8
9
|
excerpt,
|
|
@@ -27,10 +28,10 @@ function SourceChip({
|
|
|
27
28
|
title: excerpt,
|
|
28
29
|
"data-chat-source": "",
|
|
29
30
|
"data-excerpt": excerpt,
|
|
30
|
-
className: "
|
|
31
|
+
className: cn(CHIP_PILL_CLASS, "max-w-[240px]", CHIP_LINK_CLASS),
|
|
31
32
|
children: [
|
|
32
33
|
/* @__PURE__ */ jsx(SourceFavicon, { href }),
|
|
33
|
-
/* @__PURE__ */ jsx("span", { className: "max-w-[200px] overflow-hidden text-ellipsis", children })
|
|
34
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 max-w-[200px] overflow-hidden text-ellipsis", children })
|
|
34
35
|
]
|
|
35
36
|
}
|
|
36
37
|
);
|
|
@@ -42,7 +43,7 @@ function SourceFavicon({ href }) {
|
|
|
42
43
|
return /* @__PURE__ */ jsx(
|
|
43
44
|
Globe2Icon,
|
|
44
45
|
{
|
|
45
|
-
className: "
|
|
46
|
+
className: cn(CHIP_ICON_CLASS, "text-muted-foreground"),
|
|
46
47
|
"aria-hidden": "true"
|
|
47
48
|
}
|
|
48
49
|
);
|
|
@@ -54,7 +55,7 @@ function SourceFavicon({ href }) {
|
|
|
54
55
|
alt: "",
|
|
55
56
|
width: 14,
|
|
56
57
|
height: 14,
|
|
57
|
-
className: "
|
|
58
|
+
className: cn(CHIP_ICON_CLASS, "rounded-[3px]"),
|
|
58
59
|
loading: "lazy",
|
|
59
60
|
referrerPolicy: "no-referrer",
|
|
60
61
|
draggable: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-link.js","sources":["../../../src/chat-ui/rich-text/chat-link.tsx"],"sourcesContent":["import { Globe2Icon } from \"lucide-react\";\nimport { type ReactNode, useState } from \"react\";\nimport { MentionLink } from \"../mentions/mention-chip\";\nimport {\n buildScrollToTextUrl,\n isWebHref,\n sourceFaviconUrl,\n} from \"./citation-anchors\";\n\n/**\n * A link mark of the static message body. A web source the model cited with\n * an excerpt renders as a source chip; everything else goes through\n * `MentionLink`, which draws mention and Spaces hrefs as asset chips,\n * screen points as coordinate chips, and the rest as a plain link.\n */\nexport function ChatLink({\n href,\n excerpt,\n children,\n}: {\n href: string | null | undefined;\n excerpt?: string | null;\n children: ReactNode;\n}) {\n if (href && excerpt && isWebHref(href)) {\n return (\n <SourceChip href={href} excerpt={excerpt}>\n {children}\n </SourceChip>\n );\n }\n return <MentionLink href={href ?? undefined}>{children}</MentionLink>;\n}\n\n/**\n * A cited web page: the site's favicon, the model's label, the excerpt as\n * the tooltip, opening the page at the excerpt (scroll-to-text) in a new tab.\n *
|
|
1
|
+
{"version":3,"file":"chat-link.js","sources":["../../../src/chat-ui/rich-text/chat-link.tsx"],"sourcesContent":["import { Globe2Icon } from \"lucide-react\";\nimport { type ReactNode, useState } from \"react\";\nimport { CHIP_ICON_CLASS, CHIP_LINK_CLASS, CHIP_PILL_CLASS, MentionLink } from \"../mentions/mention-chip\";\nimport { cn } from \"../../lib/utils\";\nimport {\n buildScrollToTextUrl,\n isWebHref,\n sourceFaviconUrl,\n} from \"./citation-anchors\";\n\n/**\n * A link mark of the static message body. A web source the model cited with\n * an excerpt renders as a source chip; everything else goes through\n * `MentionLink`, which draws mention and Spaces hrefs as asset chips,\n * screen points as coordinate chips, and the rest as a plain link.\n */\nexport function ChatLink({\n href,\n excerpt,\n children,\n}: {\n href: string | null | undefined;\n excerpt?: string | null;\n children: ReactNode;\n}) {\n if (href && excerpt && isWebHref(href)) {\n return (\n <SourceChip href={href} excerpt={excerpt}>\n {children}\n </SourceChip>\n );\n }\n return <MentionLink href={href ?? undefined}>{children}</MentionLink>;\n}\n\n/**\n * A cited web page: the site's favicon, the model's label, the excerpt as\n * the tooltip, opening the page at the excerpt (scroll-to-text) in a new tab.\n * The asset mention chip's pill (`CHIP_PILL_CLASS`), so a sentence that cites\n * a PDF and a web page reads as one row of sources.\n */\nexport function SourceChip({\n href,\n excerpt,\n children,\n}: {\n href: string;\n excerpt: string;\n children: ReactNode;\n}) {\n return (\n <a\n href={buildScrollToTextUrl(href, excerpt)}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n title={excerpt}\n data-chat-source=\"\"\n data-excerpt={excerpt}\n className={cn(CHIP_PILL_CLASS, \"max-w-[240px]\", CHIP_LINK_CLASS)}\n >\n <SourceFavicon href={href} />\n <span className=\"min-w-0 max-w-[200px] overflow-hidden text-ellipsis\">\n {children}\n </span>\n </a>\n );\n}\n\n/** The site's favicon; a globe once the favicon service has no icon for the host. */\nfunction SourceFavicon({ href }: { href: string }) {\n const [failed, setFailed] = useState(false);\n const src = failed ? null : sourceFaviconUrl(href);\n if (!src) {\n return (\n <Globe2Icon\n className={cn(CHIP_ICON_CLASS, \"text-muted-foreground\")}\n aria-hidden=\"true\"\n />\n );\n }\n return (\n <img\n src={src}\n alt=\"\"\n width={14}\n height={14}\n className={cn(CHIP_ICON_CLASS, \"rounded-[3px]\")}\n loading=\"lazy\"\n referrerPolicy=\"no-referrer\"\n draggable={false}\n onError={() => setFailed(true)}\n />\n );\n}\n"],"names":[],"mappings":";;;;;;AAgBO,SAAS,SAAS;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,MAAI,QAAQ,WAAW,UAAU,IAAI,GAAG;AACtC,WACE,oBAAC,YAAA,EAAW,MAAY,SACrB,SAAA,CACH;AAAA,EAEJ;AACA,SAAO,oBAAC,aAAA,EAAY,MAAM,QAAQ,QAAY,UAAS;AACzD;AAQO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAM,qBAAqB,MAAM,OAAO;AAAA,MACxC,QAAO;AAAA,MACP,KAAI;AAAA,MACJ,OAAO;AAAA,MACP,oBAAiB;AAAA,MACjB,gBAAc;AAAA,MACd,WAAW,GAAG,iBAAiB,iBAAiB,eAAe;AAAA,MAE/D,UAAA;AAAA,QAAA,oBAAC,iBAAc,MAAY;AAAA,QAC3B,oBAAC,QAAA,EAAK,WAAU,uDACb,SAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AAGA,SAAS,cAAc,EAAE,QAA0B;AACjD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,MAAM,SAAS,OAAO,iBAAiB,IAAI;AACjD,MAAI,CAAC,KAAK;AACR,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW,GAAG,iBAAiB,uBAAuB;AAAA,QACtD,eAAY;AAAA,MAAA;AAAA,IAAA;AAAA,EAGlB;AACA,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,KAAI;AAAA,MACJ,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,WAAW,GAAG,iBAAiB,eAAe;AAAA,MAC9C,SAAQ;AAAA,MACR,gBAAe;AAAA,MACf,WAAW;AAAA,MACX,SAAS,MAAM,UAAU,IAAI;AAAA,IAAA;AAAA,EAAA;AAGnC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-node-views.cjs","sources":["../../../src/chat-ui/rich-text/chat-node-views.tsx"],"sourcesContent":["import type { Node as ProseMirrorNode } from \"@tiptap/pm/model\";\nimport {\n NodeViewContent,\n NodeViewWrapper,\n type NodeViewProps,\n} from \"@tiptap/react\";\nimport { CheckIcon, CopyIcon, XIcon } from \"lucide-react\";\nimport { type ReactNode, useCallback, useEffect, useRef, useState } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { MentionLink } from \"../mentions/mention-chip\";\nimport {\n makeMentionUrl,\n type MentionNodeAttrs,\n} from \"../mentions/mention-extension\";\n\nexport function ChatMention({\n node,\n interactive = true,\n}: {\n node: ProseMirrorNode;\n interactive?: boolean;\n}) {\n return (\n <span\n className=\"mention-chip\"\n data-mention=\"\"\n data-type={node.attrs.type}\n data-name={node.attrs.name}\n data-id={node.attrs.id}\n data-asset-type={node.attrs.assetType}\n data-display-as-preview={String(node.attrs.displayAsPreview === true)}\n >\n <MentionLink\n href={makeMentionUrl(node.attrs as MentionNodeAttrs)}\n interactive={interactive}\n >\n {node.attrs.name}\n </MentionLink>\n </span>\n );\n}\n\nexport function ChatMentionNodeView({ node, editor }: NodeViewProps) {\n return (\n <NodeViewWrapper as=\"span\">\n <ChatMention node={node} interactive={!editor.isEditable} />\n </NodeViewWrapper>\n );\n}\n\nconst COPIED_RESET_MS = 1500;\n\n/**\n * Copies the block's source. Reads `node.textContent` at click time so a\n * still-streaming block copies what is on screen, not a stale snapshot.\n */\nfunction CodeBlockCopyButton({ node }: { node: ProseMirrorNode }) {\n const [status, setStatus] = useState<\"idle\" | \"copied\" | \"failed\">(\"idle\");\n const resetTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n useEffect(\n () => () => {\n if (resetTimer.current) clearTimeout(resetTimer.current);\n },\n [],\n );\n const flash = useCallback((next: \"copied\" | \"failed\") => {\n setStatus(next);\n if (resetTimer.current) clearTimeout(resetTimer.current);\n resetTimer.current = setTimeout(() => setStatus(\"idle\"), COPIED_RESET_MS);\n }, []);\n const onCopy = useCallback(() => {\n // writeText rejects when clipboard-write is denied (permissions, an\n // embedding iframe without the allow attribute); surface that instead of\n // leaving an unhandled rejection and a button that looks like it worked.\n if (typeof navigator === \"undefined\" || !navigator.clipboard) {\n flash(\"failed\");\n return;\n }\n navigator.clipboard.writeText(node.textContent).then(\n () => flash(\"copied\"),\n () => flash(\"failed\"),\n );\n }, [node, flash]);\n const label =\n status === \"copied\" ? \"Copied\" : status === \"failed\" ? \"Copy failed\" : \"Copy code\";\n return (\n <button\n type=\"button\"\n title={label}\n aria-label={label}\n onClick={onCopy}\n className={cn(\n \"inline-flex size-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground\",\n \"opacity-0 transition-opacity group-hover/code-block:opacity-100 focus-visible:opacity-100\",\n status !== \"idle\" && \"opacity-100\",\n status === \"failed\" && \"text-destructive\",\n )}\n >\n {status === \"copied\" ? (\n <CheckIcon className=\"size-3.5\" />\n ) : status === \"failed\" ? (\n <XIcon className=\"size-3.5\" />\n ) : (\n <CopyIcon className=\"size-3.5\" />\n )}\n </button>\n );\n}\n\n/** The frame both code renderings share: language label, an optional corner action, the `<pre>`. */\nfunction CodeBlockFrame({\n language,\n action,\n children,\n ...attributes\n}: {\n language: string | null | undefined;\n action?: ReactNode;\n children: ReactNode;\n \"data-chat-open-fence\"?: string;\n}) {\n return (\n <div\n className=\"not-prose group/code-block relative my-2 overflow-hidden rounded-lg border border-border bg-muted/30\"\n {...attributes}\n >\n {language && (\n <div className=\"border-b border-border bg-muted/50 px-3 py-1 text-[10px] font-medium text-muted-foreground\">\n {language}\n </div>\n )}\n {action && (\n <div className=\"absolute top-1 right-1\" contentEditable={false}>\n {action}\n </div>\n )}\n <pre className=\"overflow-x-auto p-3 pr-9 font-mono text-xs leading-relaxed text-foreground\">\n {children}\n </pre>\n </div>\n );\n}\n\nexport function ChatCodeBlock({\n node,\n children,\n}: {\n node: ProseMirrorNode;\n children: ReactNode;\n}) {\n return (\n <CodeBlockFrame\n language={node.attrs.language}\n action={<CodeBlockCopyButton node={node} />}\n >\n {children}\n </CodeBlockFrame>\n );\n}\n\n/**\n * A fenced block whose closing fence has not arrived: the same frame with the\n * code as plain text and no copy action (there is no settled source to copy\n * yet). Anything that decorates code — highlighting, a language pick — belongs\n * after the fence closes, when the block parses into a `codeBlock` node.\n */\nexport function StreamingCodeBlock({\n language,\n code,\n caret,\n}: {\n language: string;\n code: string;\n caret?: ReactNode;\n}) {\n return (\n <CodeBlockFrame language={language || null} data-chat-open-fence=\"\">\n <code>\n {code}\n {caret}\n </code>\n </CodeBlockFrame>\n );\n}\n\nexport function ChatCodeBlockNodeView({ node }: NodeViewProps) {\n return (\n <NodeViewWrapper>\n <ChatCodeBlock node={node}>\n <NodeViewContent<\"code\"> as=\"code\" />\n </ChatCodeBlock>\n </NodeViewWrapper>\n );\n}\n"],"names":["jsx","MentionLink","makeMentionUrl","NodeViewWrapper","useState","useRef","useEffect","useCallback","cn","CheckIcon","XIcon","CopyIcon","jsxs","NodeViewContent"],"mappings":";;;;;;;;;AAeO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA,cAAc;AAChB,GAGG;AACD,SACEA,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,
|
|
1
|
+
{"version":3,"file":"chat-node-views.cjs","sources":["../../../src/chat-ui/rich-text/chat-node-views.tsx"],"sourcesContent":["import type { Node as ProseMirrorNode } from \"@tiptap/pm/model\";\nimport {\n NodeViewContent,\n NodeViewWrapper,\n type NodeViewProps,\n} from \"@tiptap/react\";\nimport { CheckIcon, CopyIcon, XIcon } from \"lucide-react\";\nimport { type ReactNode, useCallback, useEffect, useRef, useState } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { MentionLink } from \"../mentions/mention-chip\";\nimport {\n makeMentionUrl,\n type MentionNodeAttrs,\n} from \"../mentions/mention-extension\";\n\nexport function ChatMention({\n node,\n interactive = true,\n}: {\n node: ProseMirrorNode;\n interactive?: boolean;\n}) {\n return (\n <span\n className=\"mention-chip\"\n // The chip inside draws the pill; the host draws no box of its own (styles.css).\n data-chip-host=\"\"\n data-mention=\"\"\n data-type={node.attrs.type}\n data-name={node.attrs.name}\n data-id={node.attrs.id}\n data-asset-type={node.attrs.assetType}\n data-display-as-preview={String(node.attrs.displayAsPreview === true)}\n >\n <MentionLink\n href={makeMentionUrl(node.attrs as MentionNodeAttrs)}\n interactive={interactive}\n >\n {node.attrs.name}\n </MentionLink>\n </span>\n );\n}\n\nexport function ChatMentionNodeView({ node, editor }: NodeViewProps) {\n return (\n <NodeViewWrapper as=\"span\">\n <ChatMention node={node} interactive={!editor.isEditable} />\n </NodeViewWrapper>\n );\n}\n\nconst COPIED_RESET_MS = 1500;\n\n/**\n * Copies the block's source. Reads `node.textContent` at click time so a\n * still-streaming block copies what is on screen, not a stale snapshot.\n */\nfunction CodeBlockCopyButton({ node }: { node: ProseMirrorNode }) {\n const [status, setStatus] = useState<\"idle\" | \"copied\" | \"failed\">(\"idle\");\n const resetTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n useEffect(\n () => () => {\n if (resetTimer.current) clearTimeout(resetTimer.current);\n },\n [],\n );\n const flash = useCallback((next: \"copied\" | \"failed\") => {\n setStatus(next);\n if (resetTimer.current) clearTimeout(resetTimer.current);\n resetTimer.current = setTimeout(() => setStatus(\"idle\"), COPIED_RESET_MS);\n }, []);\n const onCopy = useCallback(() => {\n // writeText rejects when clipboard-write is denied (permissions, an\n // embedding iframe without the allow attribute); surface that instead of\n // leaving an unhandled rejection and a button that looks like it worked.\n if (typeof navigator === \"undefined\" || !navigator.clipboard) {\n flash(\"failed\");\n return;\n }\n navigator.clipboard.writeText(node.textContent).then(\n () => flash(\"copied\"),\n () => flash(\"failed\"),\n );\n }, [node, flash]);\n const label =\n status === \"copied\" ? \"Copied\" : status === \"failed\" ? \"Copy failed\" : \"Copy code\";\n return (\n <button\n type=\"button\"\n title={label}\n aria-label={label}\n onClick={onCopy}\n className={cn(\n \"inline-flex size-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground\",\n \"opacity-0 transition-opacity group-hover/code-block:opacity-100 focus-visible:opacity-100\",\n status !== \"idle\" && \"opacity-100\",\n status === \"failed\" && \"text-destructive\",\n )}\n >\n {status === \"copied\" ? (\n <CheckIcon className=\"size-3.5\" />\n ) : status === \"failed\" ? (\n <XIcon className=\"size-3.5\" />\n ) : (\n <CopyIcon className=\"size-3.5\" />\n )}\n </button>\n );\n}\n\n/** The frame both code renderings share: language label, an optional corner action, the `<pre>`. */\nfunction CodeBlockFrame({\n language,\n action,\n children,\n ...attributes\n}: {\n language: string | null | undefined;\n action?: ReactNode;\n children: ReactNode;\n \"data-chat-open-fence\"?: string;\n}) {\n return (\n <div\n className=\"not-prose group/code-block relative my-2 overflow-hidden rounded-lg border border-border bg-muted/30\"\n {...attributes}\n >\n {language && (\n <div className=\"border-b border-border bg-muted/50 px-3 py-1 text-[10px] font-medium text-muted-foreground\">\n {language}\n </div>\n )}\n {action && (\n <div className=\"absolute top-1 right-1\" contentEditable={false}>\n {action}\n </div>\n )}\n <pre className=\"overflow-x-auto p-3 pr-9 font-mono text-xs leading-relaxed text-foreground\">\n {children}\n </pre>\n </div>\n );\n}\n\nexport function ChatCodeBlock({\n node,\n children,\n}: {\n node: ProseMirrorNode;\n children: ReactNode;\n}) {\n return (\n <CodeBlockFrame\n language={node.attrs.language}\n action={<CodeBlockCopyButton node={node} />}\n >\n {children}\n </CodeBlockFrame>\n );\n}\n\n/**\n * A fenced block whose closing fence has not arrived: the same frame with the\n * code as plain text and no copy action (there is no settled source to copy\n * yet). Anything that decorates code — highlighting, a language pick — belongs\n * after the fence closes, when the block parses into a `codeBlock` node.\n */\nexport function StreamingCodeBlock({\n language,\n code,\n caret,\n}: {\n language: string;\n code: string;\n caret?: ReactNode;\n}) {\n return (\n <CodeBlockFrame language={language || null} data-chat-open-fence=\"\">\n <code>\n {code}\n {caret}\n </code>\n </CodeBlockFrame>\n );\n}\n\nexport function ChatCodeBlockNodeView({ node }: NodeViewProps) {\n return (\n <NodeViewWrapper>\n <ChatCodeBlock node={node}>\n <NodeViewContent<\"code\"> as=\"code\" />\n </ChatCodeBlock>\n </NodeViewWrapper>\n );\n}\n"],"names":["jsx","MentionLink","makeMentionUrl","NodeViewWrapper","useState","useRef","useEffect","useCallback","cn","CheckIcon","XIcon","CopyIcon","jsxs","NodeViewContent"],"mappings":";;;;;;;;;AAeO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA,cAAc;AAChB,GAGG;AACD,SACEA,2B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A,2BAAAA,IAAC,qBAAA,EAAoB,KAAA,CAAY;AAAA,MAExC;AAAA,IAAA;AAAA,EAAA;AAGP;AAQO,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,SACEA,2BAAAA,IAAC,kBAAe,UAAU,YAAY,MAAM,wBAAqB,IAC/D,0CAAC,QAAA,EACE,UAAA;AAAA,IAAA;AAAA,IACA;AAAA,EAAA,EAAA,CACH,EAAA,CACF;AAEJ;AAEO,SAAS,sBAAsB,EAAE,QAAuB;AAC7D,SACEA,2BAAAA,IAACG,MAAAA,iBAAA,EACC,UAAAH,2BAAAA,IAAC,eAAA,EAAc,MACb,yCAACa,MAAAA,iBAAA,EAAwB,IAAG,OAAA,CAAO,EAAA,CACrC,GACF;AAEJ;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-node-views.js","sources":["../../../src/chat-ui/rich-text/chat-node-views.tsx"],"sourcesContent":["import type { Node as ProseMirrorNode } from \"@tiptap/pm/model\";\nimport {\n NodeViewContent,\n NodeViewWrapper,\n type NodeViewProps,\n} from \"@tiptap/react\";\nimport { CheckIcon, CopyIcon, XIcon } from \"lucide-react\";\nimport { type ReactNode, useCallback, useEffect, useRef, useState } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { MentionLink } from \"../mentions/mention-chip\";\nimport {\n makeMentionUrl,\n type MentionNodeAttrs,\n} from \"../mentions/mention-extension\";\n\nexport function ChatMention({\n node,\n interactive = true,\n}: {\n node: ProseMirrorNode;\n interactive?: boolean;\n}) {\n return (\n <span\n className=\"mention-chip\"\n data-mention=\"\"\n data-type={node.attrs.type}\n data-name={node.attrs.name}\n data-id={node.attrs.id}\n data-asset-type={node.attrs.assetType}\n data-display-as-preview={String(node.attrs.displayAsPreview === true)}\n >\n <MentionLink\n href={makeMentionUrl(node.attrs as MentionNodeAttrs)}\n interactive={interactive}\n >\n {node.attrs.name}\n </MentionLink>\n </span>\n );\n}\n\nexport function ChatMentionNodeView({ node, editor }: NodeViewProps) {\n return (\n <NodeViewWrapper as=\"span\">\n <ChatMention node={node} interactive={!editor.isEditable} />\n </NodeViewWrapper>\n );\n}\n\nconst COPIED_RESET_MS = 1500;\n\n/**\n * Copies the block's source. Reads `node.textContent` at click time so a\n * still-streaming block copies what is on screen, not a stale snapshot.\n */\nfunction CodeBlockCopyButton({ node }: { node: ProseMirrorNode }) {\n const [status, setStatus] = useState<\"idle\" | \"copied\" | \"failed\">(\"idle\");\n const resetTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n useEffect(\n () => () => {\n if (resetTimer.current) clearTimeout(resetTimer.current);\n },\n [],\n );\n const flash = useCallback((next: \"copied\" | \"failed\") => {\n setStatus(next);\n if (resetTimer.current) clearTimeout(resetTimer.current);\n resetTimer.current = setTimeout(() => setStatus(\"idle\"), COPIED_RESET_MS);\n }, []);\n const onCopy = useCallback(() => {\n // writeText rejects when clipboard-write is denied (permissions, an\n // embedding iframe without the allow attribute); surface that instead of\n // leaving an unhandled rejection and a button that looks like it worked.\n if (typeof navigator === \"undefined\" || !navigator.clipboard) {\n flash(\"failed\");\n return;\n }\n navigator.clipboard.writeText(node.textContent).then(\n () => flash(\"copied\"),\n () => flash(\"failed\"),\n );\n }, [node, flash]);\n const label =\n status === \"copied\" ? \"Copied\" : status === \"failed\" ? \"Copy failed\" : \"Copy code\";\n return (\n <button\n type=\"button\"\n title={label}\n aria-label={label}\n onClick={onCopy}\n className={cn(\n \"inline-flex size-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground\",\n \"opacity-0 transition-opacity group-hover/code-block:opacity-100 focus-visible:opacity-100\",\n status !== \"idle\" && \"opacity-100\",\n status === \"failed\" && \"text-destructive\",\n )}\n >\n {status === \"copied\" ? (\n <CheckIcon className=\"size-3.5\" />\n ) : status === \"failed\" ? (\n <XIcon className=\"size-3.5\" />\n ) : (\n <CopyIcon className=\"size-3.5\" />\n )}\n </button>\n );\n}\n\n/** The frame both code renderings share: language label, an optional corner action, the `<pre>`. */\nfunction CodeBlockFrame({\n language,\n action,\n children,\n ...attributes\n}: {\n language: string | null | undefined;\n action?: ReactNode;\n children: ReactNode;\n \"data-chat-open-fence\"?: string;\n}) {\n return (\n <div\n className=\"not-prose group/code-block relative my-2 overflow-hidden rounded-lg border border-border bg-muted/30\"\n {...attributes}\n >\n {language && (\n <div className=\"border-b border-border bg-muted/50 px-3 py-1 text-[10px] font-medium text-muted-foreground\">\n {language}\n </div>\n )}\n {action && (\n <div className=\"absolute top-1 right-1\" contentEditable={false}>\n {action}\n </div>\n )}\n <pre className=\"overflow-x-auto p-3 pr-9 font-mono text-xs leading-relaxed text-foreground\">\n {children}\n </pre>\n </div>\n );\n}\n\nexport function ChatCodeBlock({\n node,\n children,\n}: {\n node: ProseMirrorNode;\n children: ReactNode;\n}) {\n return (\n <CodeBlockFrame\n language={node.attrs.language}\n action={<CodeBlockCopyButton node={node} />}\n >\n {children}\n </CodeBlockFrame>\n );\n}\n\n/**\n * A fenced block whose closing fence has not arrived: the same frame with the\n * code as plain text and no copy action (there is no settled source to copy\n * yet). Anything that decorates code — highlighting, a language pick — belongs\n * after the fence closes, when the block parses into a `codeBlock` node.\n */\nexport function StreamingCodeBlock({\n language,\n code,\n caret,\n}: {\n language: string;\n code: string;\n caret?: ReactNode;\n}) {\n return (\n <CodeBlockFrame language={language || null} data-chat-open-fence=\"\">\n <code>\n {code}\n {caret}\n </code>\n </CodeBlockFrame>\n );\n}\n\nexport function ChatCodeBlockNodeView({ node }: NodeViewProps) {\n return (\n <NodeViewWrapper>\n <ChatCodeBlock node={node}>\n <NodeViewContent<\"code\"> as=\"code\" />\n </ChatCodeBlock>\n </NodeViewWrapper>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAeO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA,cAAc;AAChB,GAGG;AACD,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,
|
|
1
|
+
{"version":3,"file":"chat-node-views.js","sources":["../../../src/chat-ui/rich-text/chat-node-views.tsx"],"sourcesContent":["import type { Node as ProseMirrorNode } from \"@tiptap/pm/model\";\nimport {\n NodeViewContent,\n NodeViewWrapper,\n type NodeViewProps,\n} from \"@tiptap/react\";\nimport { CheckIcon, CopyIcon, XIcon } from \"lucide-react\";\nimport { type ReactNode, useCallback, useEffect, useRef, useState } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { MentionLink } from \"../mentions/mention-chip\";\nimport {\n makeMentionUrl,\n type MentionNodeAttrs,\n} from \"../mentions/mention-extension\";\n\nexport function ChatMention({\n node,\n interactive = true,\n}: {\n node: ProseMirrorNode;\n interactive?: boolean;\n}) {\n return (\n <span\n className=\"mention-chip\"\n // The chip inside draws the pill; the host draws no box of its own (styles.css).\n data-chip-host=\"\"\n data-mention=\"\"\n data-type={node.attrs.type}\n data-name={node.attrs.name}\n data-id={node.attrs.id}\n data-asset-type={node.attrs.assetType}\n data-display-as-preview={String(node.attrs.displayAsPreview === true)}\n >\n <MentionLink\n href={makeMentionUrl(node.attrs as MentionNodeAttrs)}\n interactive={interactive}\n >\n {node.attrs.name}\n </MentionLink>\n </span>\n );\n}\n\nexport function ChatMentionNodeView({ node, editor }: NodeViewProps) {\n return (\n <NodeViewWrapper as=\"span\">\n <ChatMention node={node} interactive={!editor.isEditable} />\n </NodeViewWrapper>\n );\n}\n\nconst COPIED_RESET_MS = 1500;\n\n/**\n * Copies the block's source. Reads `node.textContent` at click time so a\n * still-streaming block copies what is on screen, not a stale snapshot.\n */\nfunction CodeBlockCopyButton({ node }: { node: ProseMirrorNode }) {\n const [status, setStatus] = useState<\"idle\" | \"copied\" | \"failed\">(\"idle\");\n const resetTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n useEffect(\n () => () => {\n if (resetTimer.current) clearTimeout(resetTimer.current);\n },\n [],\n );\n const flash = useCallback((next: \"copied\" | \"failed\") => {\n setStatus(next);\n if (resetTimer.current) clearTimeout(resetTimer.current);\n resetTimer.current = setTimeout(() => setStatus(\"idle\"), COPIED_RESET_MS);\n }, []);\n const onCopy = useCallback(() => {\n // writeText rejects when clipboard-write is denied (permissions, an\n // embedding iframe without the allow attribute); surface that instead of\n // leaving an unhandled rejection and a button that looks like it worked.\n if (typeof navigator === \"undefined\" || !navigator.clipboard) {\n flash(\"failed\");\n return;\n }\n navigator.clipboard.writeText(node.textContent).then(\n () => flash(\"copied\"),\n () => flash(\"failed\"),\n );\n }, [node, flash]);\n const label =\n status === \"copied\" ? \"Copied\" : status === \"failed\" ? \"Copy failed\" : \"Copy code\";\n return (\n <button\n type=\"button\"\n title={label}\n aria-label={label}\n onClick={onCopy}\n className={cn(\n \"inline-flex size-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground\",\n \"opacity-0 transition-opacity group-hover/code-block:opacity-100 focus-visible:opacity-100\",\n status !== \"idle\" && \"opacity-100\",\n status === \"failed\" && \"text-destructive\",\n )}\n >\n {status === \"copied\" ? (\n <CheckIcon className=\"size-3.5\" />\n ) : status === \"failed\" ? (\n <XIcon className=\"size-3.5\" />\n ) : (\n <CopyIcon className=\"size-3.5\" />\n )}\n </button>\n );\n}\n\n/** The frame both code renderings share: language label, an optional corner action, the `<pre>`. */\nfunction CodeBlockFrame({\n language,\n action,\n children,\n ...attributes\n}: {\n language: string | null | undefined;\n action?: ReactNode;\n children: ReactNode;\n \"data-chat-open-fence\"?: string;\n}) {\n return (\n <div\n className=\"not-prose group/code-block relative my-2 overflow-hidden rounded-lg border border-border bg-muted/30\"\n {...attributes}\n >\n {language && (\n <div className=\"border-b border-border bg-muted/50 px-3 py-1 text-[10px] font-medium text-muted-foreground\">\n {language}\n </div>\n )}\n {action && (\n <div className=\"absolute top-1 right-1\" contentEditable={false}>\n {action}\n </div>\n )}\n <pre className=\"overflow-x-auto p-3 pr-9 font-mono text-xs leading-relaxed text-foreground\">\n {children}\n </pre>\n </div>\n );\n}\n\nexport function ChatCodeBlock({\n node,\n children,\n}: {\n node: ProseMirrorNode;\n children: ReactNode;\n}) {\n return (\n <CodeBlockFrame\n language={node.attrs.language}\n action={<CodeBlockCopyButton node={node} />}\n >\n {children}\n </CodeBlockFrame>\n );\n}\n\n/**\n * A fenced block whose closing fence has not arrived: the same frame with the\n * code as plain text and no copy action (there is no settled source to copy\n * yet). Anything that decorates code — highlighting, a language pick — belongs\n * after the fence closes, when the block parses into a `codeBlock` node.\n */\nexport function StreamingCodeBlock({\n language,\n code,\n caret,\n}: {\n language: string;\n code: string;\n caret?: ReactNode;\n}) {\n return (\n <CodeBlockFrame language={language || null} data-chat-open-fence=\"\">\n <code>\n {code}\n {caret}\n </code>\n </CodeBlockFrame>\n );\n}\n\nexport function ChatCodeBlockNodeView({ node }: NodeViewProps) {\n return (\n <NodeViewWrapper>\n <ChatCodeBlock node={node}>\n <NodeViewContent<\"code\"> as=\"code\" />\n </ChatCodeBlock>\n </NodeViewWrapper>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAeO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA,cAAc;AAChB,GAGG;AACD,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAEV,kBAAe;AAAA,MACf,gBAAa;AAAA,MACb,aAAW,KAAK,MAAM;AAAA,MACtB,aAAW,KAAK,MAAM;AAAA,MACtB,WAAS,KAAK,MAAM;AAAA,MACpB,mBAAiB,KAAK,MAAM;AAAA,MAC5B,2BAAyB,OAAO,KAAK,MAAM,qBAAqB,IAAI;AAAA,MAEpE,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAM,eAAe,KAAK,KAAyB;AAAA,UACnD;AAAA,UAEC,eAAK,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IACd;AAAA,EAAA;AAGN;AAEO,SAAS,oBAAoB,EAAE,MAAM,UAAyB;AACnE,SACE,oBAAC,iBAAA,EAAgB,IAAG,QAClB,UAAA,oBAAC,aAAA,EAAY,MAAY,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A;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAKG;AACD,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACT,GAAG;AAAA,MAEH,UAAA;AAAA,QAAA,YACC,oBAAC,OAAA,EAAI,WAAU,8FACZ,UAAA,UACH;AAAA,QAED,UACC,oBAAC,OAAA,EAAI,WAAU,0BAAyB,iBAAiB,OACtD,UAAA,QACH;AAAA,QAEF,oBAAC,OAAA,EAAI,WAAU,8EACZ,SAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AAEO,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AACF,GAGG;AACD,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,UAAU,KAAK,MAAM;AAAA,MACrB,QAAQ,oBAAC,qBAAA,EAAoB,KAAA,CAAY;AAAA,MAExC;AAAA,IAAA;AAAA,EAAA;AAGP;AAQO,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,SACE,oBAAC,kBAAe,UAAU,YAAY,MAAM,wBAAqB,IAC/D,+BAAC,QAAA,EACE,UAAA;AAAA,IAAA;AAAA,IACA;AAAA,EAAA,EAAA,CACH,EAAA,CACF;AAEJ;AAEO,SAAS,sBAAsB,EAAE,QAAuB;AAC7D,SACE,oBAAC,iBAAA,EACC,UAAA,oBAAC,eAAA,EAAc,MACb,8BAAC,iBAAA,EAAwB,IAAG,OAAA,CAAO,EAAA,CACrC,GACF;AAEJ;"}
|
|
@@ -97,23 +97,6 @@ export declare const GitHubToolkitOptionsSchema: z.ZodObject<{
|
|
|
97
97
|
env_vars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
98
98
|
}, z.core.$strict>;
|
|
99
99
|
export type GitHubToolkitOptions = z.infer<typeof GitHubToolkitOptionsSchema>;
|
|
100
|
-
export declare const PerplexitySearchOptionsSchema: z.ZodObject<{
|
|
101
|
-
model: z.ZodOptional<z.ZodEnum<{
|
|
102
|
-
sonar: "sonar";
|
|
103
|
-
"sonar-pro": "sonar-pro";
|
|
104
|
-
"sonar-reasoning": "sonar-reasoning";
|
|
105
|
-
}>>;
|
|
106
|
-
search_recency_filter: z.ZodOptional<z.ZodEnum<{
|
|
107
|
-
day: "day";
|
|
108
|
-
hour: "hour";
|
|
109
|
-
month: "month";
|
|
110
|
-
week: "week";
|
|
111
|
-
year: "year";
|
|
112
|
-
}>>;
|
|
113
|
-
search_domain_filter: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
114
|
-
max_results: z.ZodOptional<z.ZodNumber>;
|
|
115
|
-
}, z.core.$strict>;
|
|
116
|
-
export type PerplexitySearchOptions = z.infer<typeof PerplexitySearchOptionsSchema>;
|
|
117
100
|
export declare const SendSlackMessageOptionsSchema: z.ZodObject<{
|
|
118
101
|
channel_id: z.ZodOptional<z.ZodString>;
|
|
119
102
|
channel_name: z.ZodOptional<z.ZodString>;
|
|
@@ -352,22 +335,6 @@ export declare const TOOL_OPTION_SCHEMAS: {
|
|
|
352
335
|
secret_asset_id: z.ZodOptional<z.ZodString>;
|
|
353
336
|
env_vars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
354
337
|
}, z.core.$strict>;
|
|
355
|
-
readonly perplexity_search: z.ZodObject<{
|
|
356
|
-
model: z.ZodOptional<z.ZodEnum<{
|
|
357
|
-
sonar: "sonar";
|
|
358
|
-
"sonar-pro": "sonar-pro";
|
|
359
|
-
"sonar-reasoning": "sonar-reasoning";
|
|
360
|
-
}>>;
|
|
361
|
-
search_recency_filter: z.ZodOptional<z.ZodEnum<{
|
|
362
|
-
day: "day";
|
|
363
|
-
hour: "hour";
|
|
364
|
-
month: "month";
|
|
365
|
-
week: "week";
|
|
366
|
-
year: "year";
|
|
367
|
-
}>>;
|
|
368
|
-
search_domain_filter: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
369
|
-
max_results: z.ZodOptional<z.ZodNumber>;
|
|
370
|
-
}, z.core.$strict>;
|
|
371
338
|
readonly send_slack_message: z.ZodObject<{
|
|
372
339
|
channel_id: z.ZodOptional<z.ZodString>;
|
|
373
340
|
channel_name: z.ZodOptional<z.ZodString>;
|
|
@@ -517,7 +484,6 @@ export type ToolOptionsMap = {
|
|
|
517
484
|
python_toolkit: PythonToolkitOptions;
|
|
518
485
|
toolkit_python: PythonToolkitOptions;
|
|
519
486
|
github_toolkit: GitHubToolkitOptions;
|
|
520
|
-
perplexity_search: PerplexitySearchOptions;
|
|
521
487
|
send_slack_message: SendSlackMessageOptions;
|
|
522
488
|
read_slack_channel: ReadSlackChannelOptions;
|
|
523
489
|
track_website_changes: TrackWebChangesOptions;
|