@agent-native/core 0.7.71 → 0.7.72
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/dist/a2a/artifact-response.d.ts.map +1 -1
- package/dist/a2a/artifact-response.js +140 -9
- package/dist/a2a/artifact-response.js.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.d.ts.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.js +18 -56
- package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
- package/dist/client/composer/ComposerPlusMenu.d.ts +9 -1
- package/dist/client/composer/ComposerPlusMenu.d.ts.map +1 -1
- package/dist/client/composer/ComposerPlusMenu.js +10 -1
- package/dist/client/composer/ComposerPlusMenu.js.map +1 -1
- package/dist/client/composer/PromptComposer.d.ts +40 -0
- package/dist/client/composer/PromptComposer.d.ts.map +1 -0
- package/dist/client/composer/PromptComposer.js +124 -0
- package/dist/client/composer/PromptComposer.js.map +1 -0
- package/dist/client/composer/TiptapComposer.d.ts +14 -3
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +8 -4
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/index.d.ts +1 -0
- package/dist/client/composer/index.d.ts.map +1 -1
- package/dist/client/composer/index.js +1 -0
- package/dist/client/composer/index.js.map +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/settings/AutomationsSection.d.ts.map +1 -1
- package/dist/client/settings/AutomationsSection.js +7 -14
- package/dist/client/settings/AutomationsSection.js.map +1 -1
- package/dist/client/tools/EmbeddedTool.d.ts.map +1 -1
- package/dist/client/tools/EmbeddedTool.js +50 -5
- package/dist/client/tools/EmbeddedTool.js.map +1 -1
- package/dist/client/tools/ToolViewer.d.ts.map +1 -1
- package/dist/client/tools/ToolViewer.js +58 -17
- package/dist/client/tools/ToolViewer.js.map +1 -1
- package/dist/client/tools/ToolsListPage.d.ts.map +1 -1
- package/dist/client/tools/ToolsListPage.js +17 -39
- package/dist/client/tools/ToolsListPage.js.map +1 -1
- package/dist/client/tools/ToolsSidebarSection.d.ts.map +1 -1
- package/dist/client/tools/ToolsSidebarSection.js +6 -14
- package/dist/client/tools/ToolsSidebarSection.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef } from "react";
|
|
3
|
+
import { AssistantRuntimeProvider, ComposerPrimitive, ThreadPrimitive, useAui, useComposer, useLocalRuntime, } from "@assistant-ui/react";
|
|
4
|
+
import { CompositeAttachmentAdapter, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, } from "@assistant-ui/react";
|
|
5
|
+
import { IconX } from "@tabler/icons-react";
|
|
6
|
+
import { cn } from "../utils.js";
|
|
7
|
+
import { TiptapComposer } from "./TiptapComposer.js";
|
|
8
|
+
import { useChatModels } from "../use-chat-models.js";
|
|
9
|
+
// Minimal pass-through adapter. PromptComposer always submits through
|
|
10
|
+
// onSubmitOverride, so the runtime never actually calls this — but
|
|
11
|
+
// `useLocalRuntime` needs *something* shaped like a ChatModelAdapter.
|
|
12
|
+
const NOOP_ADAPTER = {
|
|
13
|
+
async *run() {
|
|
14
|
+
return;
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Local clone of AssistantChat's BinaryDocumentAttachmentAdapter so PDFs and
|
|
19
|
+
* PPTX files can be attached without dragging the whole assistant chat module
|
|
20
|
+
* into bundles that just want a prompt popover.
|
|
21
|
+
*/
|
|
22
|
+
class BinaryDocumentAttachmentAdapter {
|
|
23
|
+
accept = "application/pdf,application/vnd.openxmlformats-officedocument.presentationml.presentation,.pdf,.pptx";
|
|
24
|
+
async add(state) {
|
|
25
|
+
return {
|
|
26
|
+
id: state.file.name,
|
|
27
|
+
type: "document",
|
|
28
|
+
name: state.file.name,
|
|
29
|
+
contentType: state.file.type || "application/octet-stream",
|
|
30
|
+
file: state.file,
|
|
31
|
+
status: { type: "requires-action", reason: "composer-send" },
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
async send(attachment) {
|
|
35
|
+
return {
|
|
36
|
+
...attachment,
|
|
37
|
+
status: { type: "complete" },
|
|
38
|
+
content: [],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
async remove() {
|
|
42
|
+
/* noop */
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function getImageSrc(attachment) {
|
|
46
|
+
if (attachment.type !== "image")
|
|
47
|
+
return null;
|
|
48
|
+
if ("file" in attachment && attachment.file) {
|
|
49
|
+
return URL.createObjectURL(attachment.file);
|
|
50
|
+
}
|
|
51
|
+
const imagePart = attachment.content?.find((part) => part.type === "image");
|
|
52
|
+
return imagePart && "image" in imagePart ? imagePart.image : null;
|
|
53
|
+
}
|
|
54
|
+
function AttachmentChip({ attachment, onRemove, }) {
|
|
55
|
+
const src = useMemo(() => getImageSrc(attachment), [attachment]);
|
|
56
|
+
useEffect(() => () => {
|
|
57
|
+
if (src?.startsWith("blob:"))
|
|
58
|
+
URL.revokeObjectURL(src);
|
|
59
|
+
}, [src]);
|
|
60
|
+
if (src) {
|
|
61
|
+
return (_jsxs("div", { className: "group relative h-16 w-16 overflow-hidden rounded-lg border border-border/70 bg-muted/50", children: [_jsx("img", { src: src, alt: attachment.name, className: "h-full w-full object-cover" }), _jsx("button", { type: "button", onClick: () => onRemove(attachment.id), "aria-label": `Remove ${attachment.name}`, className: "absolute right-1 top-1 flex h-5 w-5 cursor-pointer items-center justify-center rounded-full border border-border/60 bg-background/90 text-muted-foreground hover:text-foreground", children: _jsx(IconX, { className: "h-3 w-3" }) })] }));
|
|
62
|
+
}
|
|
63
|
+
return (_jsxs("div", { className: "group relative inline-flex max-w-[200px] items-center gap-2 rounded-md border border-border/70 bg-muted/50 px-2 py-1.5 text-xs", children: [_jsx("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center rounded bg-background text-[9px] font-semibold uppercase text-muted-foreground", children: attachment.name.split(".").pop() || "file" }), _jsx("span", { className: "min-w-0 truncate font-medium", children: attachment.name }), _jsx("button", { type: "button", onClick: () => onRemove(attachment.id), "aria-label": `Remove ${attachment.name}`, className: "flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded text-muted-foreground hover:text-foreground", children: _jsx(IconX, { className: "h-3 w-3" }) })] }));
|
|
64
|
+
}
|
|
65
|
+
function PromptAttachmentStrip() {
|
|
66
|
+
const attachments = useComposer((state) => state.attachments);
|
|
67
|
+
const aui = useAui();
|
|
68
|
+
const handleRemove = useCallback((id) => {
|
|
69
|
+
void aui.composer().attachment({ id }).remove();
|
|
70
|
+
}, [aui]);
|
|
71
|
+
if (attachments.length === 0)
|
|
72
|
+
return null;
|
|
73
|
+
return (_jsx("div", { className: "flex flex-wrap gap-2 px-2 pt-2", children: attachments.map((attachment) => (_jsx(AttachmentChip, { attachment: attachment, onRemove: handleRemove }, attachment.id))) }));
|
|
74
|
+
}
|
|
75
|
+
function PromptComposerInner({ onSubmit, placeholder, disabled, autoFocus, className, draftScope, showModelSelector, voiceEnabled = true, attachmentsEnabled = false, composerRef, }) {
|
|
76
|
+
const localRef = useRef(null);
|
|
77
|
+
const handleRef = composerRef ?? localRef;
|
|
78
|
+
const models = useChatModels();
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (!autoFocus)
|
|
81
|
+
return;
|
|
82
|
+
const id = window.setTimeout(() => {
|
|
83
|
+
const target = typeof handleRef === "object" && handleRef && "current" in handleRef
|
|
84
|
+
? handleRef.current
|
|
85
|
+
: null;
|
|
86
|
+
target?.focus();
|
|
87
|
+
}, 50);
|
|
88
|
+
return () => window.clearTimeout(id);
|
|
89
|
+
}, [autoFocus, handleRef]);
|
|
90
|
+
const handleSubmit = useCallback((text, references, attachments) => {
|
|
91
|
+
const files = [];
|
|
92
|
+
for (const att of attachments ?? []) {
|
|
93
|
+
const a = att;
|
|
94
|
+
if ("file" in a && a.file instanceof File) {
|
|
95
|
+
files.push(a.file);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
onSubmit(text, files, references);
|
|
99
|
+
}, [onSubmit]);
|
|
100
|
+
return (_jsx("div", { className: cn("agent-composer-area flex flex-col rounded-lg border border-input bg-background focus-within:ring-1 focus-within:ring-ring", className), children: _jsxs(ComposerPrimitive.Root, { className: "flex flex-col", children: [_jsx(PromptAttachmentStrip, {}), _jsx(TiptapComposer, { focusRef: handleRef, disabled: disabled, placeholder: placeholder, onSubmit: handleSubmit, plusMenuMode: attachmentsEnabled ? "upload-only" : "hidden", voiceEnabled: voiceEnabled, draftScope: draftScope, selectedModel: showModelSelector ? models.selectedModel : undefined, selectedEffort: showModelSelector ? models.selectedEffort : undefined, availableModels: showModelSelector ? models.availableModels : undefined, onModelChange: showModelSelector ? models.onModelChange : undefined, onEffortChange: showModelSelector ? models.onEffortChange : undefined })] }) }));
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Standalone composer that mirrors the agent sidebar's input experience —
|
|
104
|
+
* voice dictation, file upload, model selector, submit-on-Enter — for use in
|
|
105
|
+
* popovers and inline prompt forms (create tool, create deck, create dashboard,
|
|
106
|
+
* the Dispatch new-app flow, etc.).
|
|
107
|
+
*
|
|
108
|
+
* The host owns submission: when the user presses Enter or clicks submit,
|
|
109
|
+
* `onSubmit(text, files, references)` is called. PromptComposer runs its own
|
|
110
|
+
* minimal assistant-ui runtime so it can be dropped into any subtree without
|
|
111
|
+
* needing the outer chat to be mounted.
|
|
112
|
+
*/
|
|
113
|
+
export function PromptComposer(props) {
|
|
114
|
+
const attachmentAdapter = useMemo(() => new CompositeAttachmentAdapter([
|
|
115
|
+
new SimpleImageAttachmentAdapter(),
|
|
116
|
+
new BinaryDocumentAttachmentAdapter(),
|
|
117
|
+
new SimpleTextAttachmentAdapter(),
|
|
118
|
+
]), []);
|
|
119
|
+
const runtime = useLocalRuntime(NOOP_ADAPTER, {
|
|
120
|
+
adapters: { attachments: attachmentAdapter },
|
|
121
|
+
});
|
|
122
|
+
return (_jsx(AssistantRuntimeProvider, { runtime: runtime, children: _jsx(ThreadPrimitive.Root, { className: "contents", children: _jsx(PromptComposerInner, { ...props }) }) }));
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=PromptComposer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PromptComposer.js","sourceRoot":"","sources":["../../../src/client/composer/PromptComposer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAY,MAAM,OAAO,CAAC;AAC1E,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,eAAe,EACf,MAAM,EACN,WAAW,EACX,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAQ7B,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAA6B,MAAM,qBAAqB,CAAC;AAEhF,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAgCtD,sEAAsE;AACtE,mEAAmE;AACnE,sEAAsE;AACtE,MAAM,YAAY,GAAqB;IACrC,KAAK,CAAC,CAAC,GAAG;QACR,OAAO;IACT,CAAC;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,+BAA+B;IAC5B,MAAM,GACX,sGAAsG,CAAC;IAElG,KAAK,CAAC,GAAG,CAAC,KAAqB;QACpC,OAAO;YACL,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI;YACnB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,KAAK,CAAC,IAAI,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CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,GACrE,IACqB,GACrB,CACP,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,MAAM,iBAAiB,GAAG,OAAO,CAC/B,GAAG,EAAE,CACH,IAAI,0BAA0B,CAAC;QAC7B,IAAI,4BAA4B,EAAE;QAClC,IAAI,+BAA+B,EAAE;QACrC,IAAI,2BAA2B,EAAE;KAClC,CAAC,EACJ,EAAE,CACH,CAAC;IACF,MAAM,OAAO,GAAG,eAAe,CAAC,YAAY,EAAE;QAC5C,QAAQ,EAAE,EAAE,WAAW,EAAE,iBAAiB,EAAE;KAC7C,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,wBAAwB,IAAC,OAAO,EAAE,OAAO,YACxC,KAAC,eAAe,CAAC,IAAI,IAAC,SAAS,EAAC,UAAU,YACxC,KAAC,mBAAmB,OAAK,KAAK,GAAI,GACb,GACE,CAC5B,CAAC;AACJ,CAAC","sourcesContent":["import { useCallback, useEffect, useMemo, useRef, type Ref } from \"react\";\nimport {\n AssistantRuntimeProvider,\n ComposerPrimitive,\n ThreadPrimitive,\n useAui,\n useComposer,\n useLocalRuntime,\n} from \"@assistant-ui/react\";\nimport type {\n Attachment,\n AttachmentAdapter,\n ChatModelAdapter,\n CompleteAttachment,\n PendingAttachment,\n} from \"@assistant-ui/react\";\nimport {\n CompositeAttachmentAdapter,\n SimpleImageAttachmentAdapter,\n SimpleTextAttachmentAdapter,\n} from \"@assistant-ui/react\";\nimport { IconX } from \"@tabler/icons-react\";\nimport { cn } from \"../utils.js\";\nimport { TiptapComposer, type TiptapComposerHandle } from \"./TiptapComposer.js\";\nimport type { Reference } from \"./types.js\";\nimport { useChatModels } from \"../use-chat-models.js\";\n\n/**\n * Files the user attached via the \"+\" button in PromptComposer. The host owns\n * what to do with them — typically POST to a per-app upload endpoint and pass\n * the resulting URLs/paths into the prompt that gets sent to the agent.\n */\nexport type PromptComposerFile = File;\n\nexport interface PromptComposerProps {\n /** Called when the user submits the composer. */\n onSubmit: (\n text: string,\n files: PromptComposerFile[],\n references: Reference[],\n ) => void;\n placeholder?: string;\n disabled?: boolean;\n autoFocus?: boolean;\n className?: string;\n /** Forwarded to TiptapComposer for draft persistence. */\n draftScope?: string;\n /** Show the model selector (default: false). */\n showModelSelector?: boolean;\n /** Show the voice dictation button (default: true). */\n voiceEnabled?: boolean;\n /** Show file upload controls and pass submitted files to onSubmit. */\n attachmentsEnabled?: boolean;\n /** Imperative handle for focusing the composer. */\n composerRef?: Ref<TiptapComposerHandle>;\n}\n\n// Minimal pass-through adapter. PromptComposer always submits through\n// onSubmitOverride, so the runtime never actually calls this — but\n// `useLocalRuntime` needs *something* shaped like a ChatModelAdapter.\nconst NOOP_ADAPTER: ChatModelAdapter = {\n async *run() {\n return;\n },\n};\n\n/**\n * Local clone of AssistantChat's BinaryDocumentAttachmentAdapter so PDFs and\n * PPTX files can be attached without dragging the whole assistant chat module\n * into bundles that just want a prompt popover.\n */\nclass BinaryDocumentAttachmentAdapter implements AttachmentAdapter {\n public accept =\n \"application/pdf,application/vnd.openxmlformats-officedocument.presentationml.presentation,.pdf,.pptx\";\n\n public async add(state: { file: File }): Promise<PendingAttachment> {\n return {\n id: state.file.name,\n type: \"document\",\n name: state.file.name,\n contentType: state.file.type || \"application/octet-stream\",\n file: state.file,\n status: { type: \"requires-action\", reason: \"composer-send\" },\n };\n }\n\n public async send(\n attachment: PendingAttachment,\n ): Promise<CompleteAttachment> {\n return {\n ...attachment,\n status: { type: \"complete\" },\n content: [],\n };\n }\n\n public async remove() {\n /* noop */\n }\n}\n\nfunction getImageSrc(attachment: Attachment): string | null {\n if (attachment.type !== \"image\") return null;\n if (\"file\" in attachment && attachment.file) {\n return URL.createObjectURL(attachment.file);\n }\n const imagePart = attachment.content?.find((part) => part.type === \"image\");\n return imagePart && \"image\" in imagePart ? imagePart.image : null;\n}\n\nfunction AttachmentChip({\n attachment,\n onRemove,\n}: {\n attachment: Attachment;\n onRemove: (id: string) => void;\n}) {\n const src = useMemo(() => getImageSrc(attachment), [attachment]);\n useEffect(\n () => () => {\n if (src?.startsWith(\"blob:\")) URL.revokeObjectURL(src);\n },\n [src],\n );\n\n if (src) {\n return (\n <div className=\"group relative h-16 w-16 overflow-hidden rounded-lg border border-border/70 bg-muted/50\">\n <img\n src={src}\n alt={attachment.name}\n className=\"h-full w-full object-cover\"\n />\n <button\n type=\"button\"\n onClick={() => onRemove(attachment.id)}\n aria-label={`Remove ${attachment.name}`}\n className=\"absolute right-1 top-1 flex h-5 w-5 cursor-pointer items-center justify-center rounded-full border border-border/60 bg-background/90 text-muted-foreground hover:text-foreground\"\n >\n <IconX className=\"h-3 w-3\" />\n </button>\n </div>\n );\n }\n\n return (\n <div className=\"group relative inline-flex max-w-[200px] items-center gap-2 rounded-md border border-border/70 bg-muted/50 px-2 py-1.5 text-xs\">\n <div className=\"flex h-6 w-6 shrink-0 items-center justify-center rounded bg-background text-[9px] font-semibold uppercase text-muted-foreground\">\n {attachment.name.split(\".\").pop() || \"file\"}\n </div>\n <span className=\"min-w-0 truncate font-medium\">{attachment.name}</span>\n <button\n type=\"button\"\n onClick={() => onRemove(attachment.id)}\n aria-label={`Remove ${attachment.name}`}\n className=\"flex h-5 w-5 shrink-0 cursor-pointer items-center justify-center rounded text-muted-foreground hover:text-foreground\"\n >\n <IconX className=\"h-3 w-3\" />\n </button>\n </div>\n );\n}\n\nfunction PromptAttachmentStrip() {\n const attachments = useComposer((state) => state.attachments);\n const aui = useAui();\n\n const handleRemove = useCallback(\n (id: string) => {\n void aui.composer().attachment({ id }).remove();\n },\n [aui],\n );\n\n if (attachments.length === 0) return null;\n return (\n <div className=\"flex flex-wrap gap-2 px-2 pt-2\">\n {attachments.map((attachment) => (\n <AttachmentChip\n key={attachment.id}\n attachment={attachment}\n onRemove={handleRemove}\n />\n ))}\n </div>\n );\n}\n\nfunction PromptComposerInner({\n onSubmit,\n placeholder,\n disabled,\n autoFocus,\n className,\n draftScope,\n showModelSelector,\n voiceEnabled = true,\n attachmentsEnabled = false,\n composerRef,\n}: PromptComposerProps) {\n const localRef = useRef<TiptapComposerHandle>(null);\n const handleRef = composerRef ?? localRef;\n const models = useChatModels();\n\n useEffect(() => {\n if (!autoFocus) return;\n const id = window.setTimeout(() => {\n const target =\n typeof handleRef === \"object\" && handleRef && \"current\" in handleRef\n ? handleRef.current\n : null;\n target?.focus();\n }, 50);\n return () => window.clearTimeout(id);\n }, [autoFocus, handleRef]);\n\n const handleSubmit = useCallback(\n (\n text: string,\n references: Reference[],\n attachments?: ReadonlyArray<unknown>,\n ) => {\n const files: File[] = [];\n for (const att of attachments ?? []) {\n const a = att as Attachment;\n if (\"file\" in a && a.file instanceof File) {\n files.push(a.file);\n }\n }\n onSubmit(text, files, references);\n },\n [onSubmit],\n );\n\n return (\n <div\n className={cn(\n \"agent-composer-area flex flex-col rounded-lg border border-input bg-background focus-within:ring-1 focus-within:ring-ring\",\n className,\n )}\n >\n <ComposerPrimitive.Root className=\"flex flex-col\">\n <PromptAttachmentStrip />\n <TiptapComposer\n focusRef={handleRef}\n disabled={disabled}\n placeholder={placeholder}\n onSubmit={handleSubmit}\n plusMenuMode={attachmentsEnabled ? \"upload-only\" : \"hidden\"}\n voiceEnabled={voiceEnabled}\n draftScope={draftScope}\n selectedModel={showModelSelector ? models.selectedModel : undefined}\n selectedEffort={showModelSelector ? models.selectedEffort : undefined}\n availableModels={\n showModelSelector ? models.availableModels : undefined\n }\n onModelChange={showModelSelector ? models.onModelChange : undefined}\n onEffortChange={showModelSelector ? models.onEffortChange : undefined}\n />\n </ComposerPrimitive.Root>\n </div>\n );\n}\n\n/**\n * Standalone composer that mirrors the agent sidebar's input experience —\n * voice dictation, file upload, model selector, submit-on-Enter — for use in\n * popovers and inline prompt forms (create tool, create deck, create dashboard,\n * the Dispatch new-app flow, etc.).\n *\n * The host owns submission: when the user presses Enter or clicks submit,\n * `onSubmit(text, files, references)` is called. PromptComposer runs its own\n * minimal assistant-ui runtime so it can be dropped into any subtree without\n * needing the outer chat to be mounted.\n */\nexport function PromptComposer(props: PromptComposerProps) {\n const attachmentAdapter = useMemo(\n () =>\n new CompositeAttachmentAdapter([\n new SimpleImageAttachmentAdapter(),\n new BinaryDocumentAttachmentAdapter(),\n new SimpleTextAttachmentAdapter(),\n ]),\n [],\n );\n const runtime = useLocalRuntime(NOOP_ADAPTER, {\n adapters: { attachments: attachmentAdapter },\n });\n\n return (\n <AssistantRuntimeProvider runtime={runtime}>\n <ThreadPrimitive.Root className=\"contents\">\n <PromptComposerInner {...props} />\n </ThreadPrimitive.Root>\n </AssistantRuntimeProvider>\n );\n}\n"]}
|
|
@@ -9,8 +9,12 @@ interface TiptapComposerProps {
|
|
|
9
9
|
placeholder?: string;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
focusRef?: React.Ref<TiptapComposerHandle>;
|
|
12
|
-
/**
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* When provided, called instead of composerRuntime.send(). Used for queue
|
|
14
|
+
* mode and standalone prompt popovers. Receives the live composer
|
|
15
|
+
* attachments so callers (e.g. PromptComposer) can surface uploaded files.
|
|
16
|
+
*/
|
|
17
|
+
onSubmit?: (text: string, references: Reference[], attachments?: ReadonlyArray<unknown>) => void;
|
|
14
18
|
/** Custom action button (e.g. stop button) to render instead of the default send button. */
|
|
15
19
|
actionButton?: React.ReactNode;
|
|
16
20
|
/** Extra button to render alongside the default send button (e.g. stop while running). */
|
|
@@ -42,7 +46,14 @@ interface TiptapComposerProps {
|
|
|
42
46
|
onEffortChange?: (effort: ReasoningEffort) => void;
|
|
43
47
|
/** Stable scope for persisted drafts, usually the active thread or tab id. */
|
|
44
48
|
draftScope?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Controls the "+" menu next to the composer. `"full"` (default) shows the
|
|
51
|
+
* normal Upload / Skill / Job / Automation / Tool / MCP picker. `"upload-only"`
|
|
52
|
+
* collapses it to a single button that opens the file picker directly.
|
|
53
|
+
* `"hidden"` hides attachment controls for text-only prompt surfaces.
|
|
54
|
+
*/
|
|
55
|
+
plusMenuMode?: "full" | "upload-only" | "hidden";
|
|
45
56
|
}
|
|
46
|
-
export declare function TiptapComposer({ placeholder, disabled, focusRef, onSubmit, actionButton, extraActionButton, attachButton, onSlashCommand, execMode, onExecModeChange, voiceEnabled, selectedModel, selectedEffort, availableModels, onModelChange, onEffortChange, draftScope, }: TiptapComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export declare function TiptapComposer({ placeholder, disabled, focusRef, onSubmit, actionButton, extraActionButton, attachButton, onSlashCommand, execMode, onExecModeChange, voiceEnabled, selectedModel, selectedEffort, availableModels, onModelChange, onEffortChange, draftScope, plusMenuMode, }: TiptapComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
47
58
|
export {};
|
|
48
59
|
//# sourceMappingURL=TiptapComposer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TiptapComposer.d.ts","sourceRoot":"","sources":["../../../src/client/composer/TiptapComposer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAgCf,OAAO,KAAK,EAGV,SAAS,EAGV,MAAM,YAAY,CAAC;AAMpB,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,oBAAoB;IACnC,KAAK,IAAI,IAAI,CAAC;CACf;AAwHD,KAAK,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjC,UAAU,mBAAmB;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAC3C
|
|
1
|
+
{"version":3,"file":"TiptapComposer.d.ts","sourceRoot":"","sources":["../../../src/client/composer/TiptapComposer.tsx"],"names":[],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MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC,CAAC;IACH,uCAAuC;IACvC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,kDAAkD;IAClD,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IACnD,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa,GAAG,QAAQ,CAAC;CAClD;AA8YD,wBAAgB,cAAc,CAAC,EAC7B,WAAgC,EAChC,QAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,gBAAgB,EAChB,YAAmB,EACnB,aAAa,EACb,cAAc,EACd,eAAe,EACf,aAAa,EACb,cAAc,EACd,UAAU,EACV,YAAqB,GACtB,EAAE,mBAAmB,2CAk3BrB"}
|
|
@@ -261,7 +261,7 @@ function ModelSelector({ model, effort = "auto", engines, onChange, onEffortChan
|
|
|
261
261
|
: "opacity-40 cursor-default"}`, children: [_jsx("span", { className: "flex-1 min-w-0 text-[13px] text-foreground truncate", children: friendlyModelName(m) }), m === model && group.configured && (_jsx(IconCheck, { className: "h-3.5 w-3.5 shrink-0 text-blue-500" }))] }, m)))] }, groupKey));
|
|
262
262
|
}), effortOptions.length > 0 && (_jsxs(_Fragment, { children: [_jsx("div", { className: "my-1 border-t border-border" }), _jsx("div", { className: "px-3 py-1.5 text-[11px] font-medium text-muted-foreground uppercase tracking-wide", children: "Effort" }), effortOptions.map((option) => (_jsxs("button", { type: "button", onClick: () => onEffortChange?.(option), className: "flex w-full items-center gap-3 px-3 py-1.5 text-left hover:bg-accent/50", children: [_jsx("span", { className: "flex-1 min-w-0 text-[13px] text-foreground truncate", children: reasoningEffortLabel(option) }), option === effort && (_jsx(IconCheck, { className: "h-3.5 w-3.5 shrink-0 text-blue-500" }))] }, option)))] }))] }) })] }));
|
|
263
263
|
}
|
|
264
|
-
export function TiptapComposer({ placeholder = "Message agent...", disabled = false, focusRef, onSubmit, actionButton, extraActionButton, attachButton, onSlashCommand, execMode, onExecModeChange, voiceEnabled = true, selectedModel, selectedEffort, availableModels, onModelChange, onEffortChange, draftScope, }) {
|
|
264
|
+
export function TiptapComposer({ placeholder = "Message agent...", disabled = false, focusRef, onSubmit, actionButton, extraActionButton, attachButton, onSlashCommand, execMode, onExecModeChange, voiceEnabled = true, selectedModel, selectedEffort, availableModels, onModelChange, onEffortChange, draftScope, plusMenuMode = "full", }) {
|
|
265
265
|
const [popover, setPopover] = useState(null);
|
|
266
266
|
const popoverRef = useRef(null);
|
|
267
267
|
const composerRuntime = useComposerRuntime();
|
|
@@ -734,7 +734,8 @@ export function TiptapComposer({ placeholder = "Message agent...", disabled = fa
|
|
|
734
734
|
if (!ed)
|
|
735
735
|
return;
|
|
736
736
|
const { text, references } = syncComposerState();
|
|
737
|
-
|
|
737
|
+
const attachments = composerRuntime.getState().attachments;
|
|
738
|
+
if (!text.trim() && references.length === 0 && attachments.length === 0)
|
|
738
739
|
return;
|
|
739
740
|
// Intercept slash commands typed directly (e.g. "/clear" + Enter)
|
|
740
741
|
const trimmed = text.trim();
|
|
@@ -773,7 +774,9 @@ export function TiptapComposer({ placeholder = "Message agent...", disabled = fa
|
|
|
773
774
|
return;
|
|
774
775
|
}
|
|
775
776
|
if (onSubmit) {
|
|
776
|
-
onSubmit(text, references);
|
|
777
|
+
onSubmit(text, references, attachments);
|
|
778
|
+
// Clear any pending attachments now that the host has them.
|
|
779
|
+
void composerRuntime.clearAttachments().catch(() => { });
|
|
777
780
|
}
|
|
778
781
|
else {
|
|
779
782
|
composerRuntime.send();
|
|
@@ -971,6 +974,7 @@ export function TiptapComposer({ placeholder = "Message agent...", disabled = fa
|
|
|
971
974
|
setComposerMode(null);
|
|
972
975
|
composerModeRef.current = null;
|
|
973
976
|
editor?.commands.focus("end");
|
|
974
|
-
} }) })), _jsx("div", { className: composerMode ? "px-2 pt-1 pb-1" : "px-2 pt-2 pb-1", children: _jsx(EditorContent, { editor: editor, className: "aui-composer flex-1 min-w-0 [&_.ProseMirror]:outline-none [&_.ProseMirror_p]:m-0 px-0.5" }) }), voiceEnabled && _jsx(VoiceRecordingOverlay, { voice: voice }), _jsxs("div", { className: "flex items-center gap-1 px-2 py-1.5", children: [attachButton ??
|
|
977
|
+
} }) })), _jsx("div", { className: composerMode ? "px-2 pt-1 pb-1" : "px-2 pt-2 pb-1", children: _jsx(EditorContent, { editor: editor, className: "aui-composer flex-1 min-w-0 [&_.ProseMirror]:outline-none [&_.ProseMirror_p]:m-0 px-0.5" }) }), voiceEnabled && _jsx(VoiceRecordingOverlay, { voice: voice }), _jsxs("div", { className: "flex items-center gap-1 px-2 py-1.5", children: [attachButton ??
|
|
978
|
+
(plusMenuMode === "hidden" ? null : (_jsx(ComposerPlusMenu, { onSelectMode: handleSelectMode, mode: plusMenuMode }))), _jsx("div", { className: "flex-1" }), actionButton ?? (_jsxs(_Fragment, { children: [selectedModel && availableModels && onModelChange && (_jsx(ModelSelector, { model: selectedModel, effort: selectedEffort, engines: availableModels, onChange: onModelChange, onEffortChange: onEffortChange })), execMode && onExecModeChange && (_jsx(ModeSelector, { mode: execMode, onChange: onExecModeChange })), voiceEnabled && (_jsx(VoiceButton, { voice: voice, isMac: isMac, disabled: disabled })), extraActionButton, _jsx("button", { type: "button", onClick: submitComposer, disabled: !canSend, className: "shrink-0 flex h-7 w-7 items-center justify-center rounded-md bg-primary text-primary-foreground hover:opacity-90 disabled:opacity-30 disabled:cursor-not-allowed", title: "Send message", children: _jsx(IconArrowUp, { className: "h-3.5 w-3.5" }) })] }))] }), _jsx(MentionPopover, { ref: popoverRef, type: popover?.type ?? "@", position: popover?.position ?? null, mentionItems: mentionItems, skills: filteredSkills, commands: filteredCommands, hint: hint, isLoading: popover?.type === "@" ? mentionsLoading : skillsLoading, query: popover?.query ?? "", onSelectMention: handleSelectMention, onSelectSkill: handleSelectSkill, onSelectCommand: handleSelectCommand, onClose: closePopover })] }));
|
|
975
979
|
}
|
|
976
980
|
//# sourceMappingURL=TiptapComposer.js.map
|