@agent-native/core 0.55.0 → 0.56.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 +7 -7
- package/dist/action-ui.d.ts +17 -0
- package/dist/action-ui.d.ts.map +1 -0
- package/dist/action-ui.js +23 -0
- package/dist/action-ui.js.map +1 -0
- package/dist/action.d.ts +8 -1
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +3 -0
- package/dist/action.js.map +1 -1
- package/dist/agent/production-agent.d.ts +2 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +7 -1
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts +4 -0
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +4 -0
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/agent/types.d.ts +2 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +6 -4
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/chat/index.d.ts +5 -3
- package/dist/client/chat/index.d.ts.map +1 -1
- package/dist/client/chat/index.js +4 -3
- package/dist/client/chat/index.js.map +1 -1
- package/dist/client/chat/run-recovery.d.ts.map +1 -1
- package/dist/client/chat/run-recovery.js +9 -5
- package/dist/client/chat/run-recovery.js.map +1 -1
- package/dist/client/chat/runtime.d.ts +354 -0
- package/dist/client/chat/runtime.d.ts.map +1 -0
- package/dist/client/chat/runtime.js +2 -0
- package/dist/client/chat/runtime.js.map +1 -0
- package/dist/client/chat/tool-call-display.d.ts +4 -1
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +6 -5
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/chat/tool-render-registry.d.ts +11 -0
- package/dist/client/chat/tool-render-registry.d.ts.map +1 -1
- package/dist/client/chat/tool-render-registry.js +47 -1
- package/dist/client/chat/tool-render-registry.js.map +1 -1
- package/dist/client/chat/widgets/builtin-tool-renderers.js +73 -18
- package/dist/client/chat/widgets/builtin-tool-renderers.js.map +1 -1
- package/dist/client/chat/widgets/data-widget-types.d.ts +1 -51
- package/dist/client/chat/widgets/data-widget-types.d.ts.map +1 -1
- package/dist/client/chat/widgets/data-widget-types.js +1 -92
- package/dist/client/chat/widgets/data-widget-types.js.map +1 -1
- package/dist/client/chat-view-transition.d.ts +12 -0
- package/dist/client/chat-view-transition.d.ts.map +1 -1
- package/dist/client/chat-view-transition.js +16 -0
- package/dist/client/chat-view-transition.js.map +1 -1
- package/dist/client/index.d.ts +5 -3
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +4 -3
- package/dist/client/index.js.map +1 -1
- package/dist/client/route-state.d.ts.map +1 -1
- package/dist/client/route-state.js +2 -15
- package/dist/client/route-state.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts +3 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +2 -0
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/data-widgets/index.d.ts +326 -0
- package/dist/data-widgets/index.d.ts.map +1 -0
- package/dist/data-widgets/index.js +232 -0
- package/dist/data-widgets/index.js.map +1 -0
- package/dist/index.browser.d.ts +2 -0
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +2 -0
- package/dist/index.browser.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +160 -0
- package/dist/provider-api/corpus-jobs.d.ts.map +1 -1
- package/dist/provider-api/corpus-jobs.js +44 -0
- package/dist/provider-api/corpus-jobs.js.map +1 -1
- package/dist/provider-api/index.d.ts +39 -0
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +53 -0
- package/dist/provider-api/index.js.map +1 -1
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +5 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +5 -0
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/styles/agent-native.css +9 -2
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +1 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/actions.md +52 -0
- package/docs/content/components.md +24 -1
- package/docs/content/drop-in-agent.md +9 -2
- package/docs/content/faq.md +5 -4
- package/docs/content/getting-started.md +39 -88
- package/docs/content/key-concepts.md +22 -22
- package/docs/content/mcp-apps.md +1 -1
- package/docs/content/native-chat-ui.md +210 -0
- package/docs/content/what-is-agent-native.md +2 -2
- package/package.json +2 -1
|
@@ -75,6 +75,7 @@ function cloneContentParts(content) {
|
|
|
75
75
|
...part,
|
|
76
76
|
args: { ...part.args },
|
|
77
77
|
...(part.mcpApp ? { mcpApp: { ...part.mcpApp } } : {}),
|
|
78
|
+
...(part.chatUI ? { chatUI: { ...part.chatUI } } : {}),
|
|
78
79
|
});
|
|
79
80
|
}
|
|
80
81
|
function clearPendingSelection() {
|
|
@@ -187,6 +188,7 @@ function contentPartFollowKey(part) {
|
|
|
187
188
|
String(part.argsText ?? "").length,
|
|
188
189
|
String(part.result ?? "").length,
|
|
189
190
|
part.mcpApp ? 1 : 0,
|
|
191
|
+
part.chatUI?.renderer ?? "",
|
|
190
192
|
].join(":");
|
|
191
193
|
}
|
|
192
194
|
if (type === "image")
|
|
@@ -2016,7 +2018,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2016
2018
|
window.location.reload();
|
|
2017
2019
|
}, className: authSessionAvailable
|
|
2018
2020
|
? "text-xs text-background bg-foreground hover:opacity-90 px-3 py-1.5 rounded-md"
|
|
2019
|
-
: "text-xs text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md border border-border hover:bg-accent", children: "Refresh chat" })] })] })) :
|
|
2021
|
+
: "text-xs text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md border border-border hover:bg-accent", children: "Refresh chat" })] })] })) : isRestoring ? (_jsxs("div", { className: "flex flex-col gap-3 p-4", children: [_jsx("div", { className: "flex justify-end", children: _jsx("div", { className: "h-8 w-32 rounded-lg bg-muted animate-pulse" }) }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx("div", { className: "h-4 w-48 rounded bg-muted animate-pulse" }), _jsx("div", { className: "h-4 w-64 rounded bg-muted animate-pulse" }), _jsx("div", { className: "h-4 w-40 rounded bg-muted animate-pulse" })] })] })) : showEmptyState ? (_jsxs("div", { className: cn("agent-empty-state", emptyStateDisplay === "hidden"
|
|
2020
2022
|
? "sr-only"
|
|
2021
2023
|
: "flex h-full flex-col items-center justify-center gap-4 px-4 py-16"), children: [_jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-muted", children: _jsx(IconMessage, { className: "h-5 w-5 text-muted-foreground" }) }), _jsx("p", { className: "sr-only", children: emptyStateText ?? "How can I help you?" }), emptyStateAddon, resolvedSuggestions && resolvedSuggestions.length > 0 ? (_jsx("div", { className: "flex flex-col gap-1.5 w-full max-w-[280px]", children: resolvedSuggestions.map((suggestion) => (_jsx("button", { onClick: () => {
|
|
2022
2024
|
threadRuntime.append({
|
|
@@ -2026,7 +2028,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2026
2028
|
}, className: "w-full rounded-lg border border-border px-3 py-2 text-left text-[13px] text-muted-foreground hover:bg-accent hover:text-foreground", children: suggestion }, suggestion))) })) : null] })) : (_jsxs("div", { className: "agent-thread-content flex flex-col gap-4 px-4 py-4", children: [_jsx(AssistantMessageListErrorBoundary, { resetKey: messageListResetKey, children: _jsx(ThreadPrimitive.Messages, { components: {
|
|
2027
2029
|
UserMessage,
|
|
2028
2030
|
AssistantMessage,
|
|
2029
|
-
} }) }),
|
|
2031
|
+
} }) }), visibleLoopLimit && !showRunningInUI && (_jsx(LoopLimitContinueCard, { info: visibleLoopLimit, onContinue: () => {
|
|
2030
2032
|
setShowContinue(false);
|
|
2031
2033
|
setLoopLimitInfo(null);
|
|
2032
2034
|
addToQueue("Continue from where you left off.", undefined, undefined, undefined, undefined, "queued", "continue");
|
|
@@ -2067,7 +2069,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2067
2069
|
"Thinking" })), composerError && (_jsxs("div", { role: "alert", className: "shrink-0 mx-3 mb-1.5 flex items-start gap-2 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive", children: [_jsx(IconAlertTriangle, { className: "h-3.5 w-3.5 mt-0.5 shrink-0" }), _jsx("span", { className: "flex-1 leading-snug", children: composerError }), _jsx("button", { type: "button", "aria-label": "Dismiss error", onClick: () => setComposerError(null), className: "shrink-0 opacity-70 hover:opacity-100", children: _jsx(IconX, { className: "h-3 w-3" }) })] })), _jsxs(AgentComposerFrame, { layoutVariant: composerLayoutVariant, className: cn(composerAreaClassName, missingApiKey && "cursor-pointer", isComposerDisabled && "opacity-70"), onClick: missingApiKey
|
|
2068
2070
|
? () => setMissingKeyBouncePulse((p) => p + 1)
|
|
2069
2071
|
: undefined, children: [_jsx(ComposerAttachmentPreviewStrip, {}), _jsx(TiptapComposer, { focusRef: tiptapRef, disabled: isComposerDisabled, placeholder: missingApiKey
|
|
2070
|
-
? "Connect
|
|
2072
|
+
? "Connect AI below to start chatting..."
|
|
2071
2073
|
: composerDisabled
|
|
2072
2074
|
? (composerDisabledPlaceholder ??
|
|
2073
2075
|
"Open Desktop to use this chat.")
|
|
@@ -2079,7 +2081,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2079
2081
|
? (text, references, attachments, options) => void addToQueue(text, undefined, references.length > 0 ? references : undefined, attachments, undefined, options?.intent ?? "immediate", undefined, true)
|
|
2080
2082
|
: undefined, onSlashCommand: onSlashCommand, execMode: execMode, onExecModeChange: onExecModeChange, planModeDisabled: planModeDisabled, planModeDisabledReason: planModeDisabledReason, selectedModel: selectedModel ?? defaultModel, selectedEffort: selectedEffort, availableModels: availableModels, onModelChange: onModelChange, onEffortChange: onEffortChange, onConnectProvider: onConnectProvider, toolbarSlot: composerToolbarSlot, contextItems: composerContextItems, onRemoveContextItem: removeComposerContextItem, plusMenuMode: plusMenuMode, layoutVariant: composerLayoutVariant, providerConnectStatusEnabled: providerStatusChecksEnabled, draftScope: threadId || tabId, interceptBuildRequestsForBuilder: true, onAttachmentError: setComposerError, extraActionButton: contextXRayEnabled ||
|
|
2081
2083
|
composerExtraActionButton ||
|
|
2082
|
-
showRunningInUI ? (_jsxs(_Fragment, { children: [contextXRayEnabled && (_jsx(ContextMeter, { threadId: threadId })), composerExtraActionButton, showRunningInUI && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: stopActiveRun, className: "shrink-0 flex h-7 w-7 items-center justify-center rounded-md bg-muted text-foreground hover:bg-muted/80", children: _jsx(IconPlayerStop, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Stop generating" })] }))] })) : undefined })] })] }) }) }) }) }) }));
|
|
2084
|
+
showRunningInUI ? (_jsxs(_Fragment, { children: [contextXRayEnabled && (_jsx(ContextMeter, { threadId: threadId })), composerExtraActionButton, showRunningInUI && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: stopActiveRun, className: "shrink-0 flex h-7 w-7 items-center justify-center rounded-md bg-muted text-foreground hover:bg-muted/80", children: _jsx(IconPlayerStop, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Stop generating" })] }))] })) : undefined })] }), missingApiKey && !authError ? (_jsx(BuilderSetupCard, { onConnected: handleBuilderConnected, bouncePulse: missingKeyBouncePulse })) : null] }) }) }) }) }) }));
|
|
2083
2085
|
});
|
|
2084
2086
|
export const AssistantChat = forwardRef(function AssistantChat({ apiUrl = agentNativePath("/_agent-native/agent-chat"), tabId, browserTabId, threadId, contextScope, isActiveComposer, ...props }, ref) {
|
|
2085
2087
|
const modelRef = useRef(props.selectedModel);
|