@agent-native/core 0.19.1 → 0.20.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/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +12 -1
- package/dist/agent/engine/builder-engine.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +5 -0
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts +17 -0
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +210 -0
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/cli/code-agent-executor.d.ts +2 -0
- package/dist/cli/code-agent-executor.d.ts.map +1 -1
- package/dist/cli/code-agent-executor.js +39 -1
- package/dist/cli/code-agent-executor.js.map +1 -1
- package/dist/cli/code-agent-runs.d.ts +3 -0
- package/dist/cli/code-agent-runs.d.ts.map +1 -1
- package/dist/cli/code-agent-runs.js +3 -0
- package/dist/cli/code-agent-runs.js.map +1 -1
- package/dist/cli/connect.d.ts +3 -2
- package/dist/cli/connect.d.ts.map +1 -1
- package/dist/cli/connect.js +12 -8
- package/dist/cli/connect.js.map +1 -1
- package/dist/cli/mcp-config-writers.d.ts +3 -3
- package/dist/cli/mcp-config-writers.d.ts.map +1 -1
- package/dist/cli/mcp-config-writers.js +19 -8
- package/dist/cli/mcp-config-writers.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +8 -3
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +58 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +122 -50
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +172 -13
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/agent-sidebar-state.d.ts +2 -0
- package/dist/client/agent-sidebar-state.d.ts.map +1 -1
- package/dist/client/agent-sidebar-state.js +32 -0
- package/dist/client/agent-sidebar-state.js.map +1 -1
- package/dist/client/code-agent-chat-adapter.d.ts +81 -0
- package/dist/client/code-agent-chat-adapter.d.ts.map +1 -0
- package/dist/client/code-agent-chat-adapter.js +297 -0
- package/dist/client/code-agent-chat-adapter.js.map +1 -0
- package/dist/client/composer/PromptComposer.d.ts +11 -0
- package/dist/client/composer/PromptComposer.d.ts.map +1 -1
- package/dist/client/composer/PromptComposer.js +7 -3
- package/dist/client/composer/PromptComposer.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +12 -1
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +16 -7
- 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/composer/prompt-attachments.d.ts +11 -0
- package/dist/client/composer/prompt-attachments.d.ts.map +1 -0
- package/dist/client/composer/prompt-attachments.js +45 -0
- package/dist/client/composer/prompt-attachments.js.map +1 -0
- package/dist/client/conversation/AgentConversation.d.ts.map +1 -1
- package/dist/client/conversation/AgentConversation.js +124 -1
- package/dist/client/conversation/AgentConversation.js.map +1 -1
- package/dist/client/conversation/code-agent-transcript.d.ts +25 -0
- package/dist/client/conversation/code-agent-transcript.d.ts.map +1 -0
- package/dist/client/conversation/code-agent-transcript.js +200 -0
- package/dist/client/conversation/code-agent-transcript.js.map +1 -0
- package/dist/client/conversation/index.d.ts +2 -1
- package/dist/client/conversation/index.d.ts.map +1 -1
- package/dist/client/conversation/index.js +1 -0
- package/dist/client/conversation/index.js.map +1 -1
- package/dist/client/conversation/types.d.ts +8 -0
- package/dist/client/conversation/types.d.ts.map +1 -1
- package/dist/client/conversation/types.js.map +1 -1
- package/dist/client/conversation/use-near-bottom-autoscroll.d.ts.map +1 -1
- package/dist/client/conversation/use-near-bottom-autoscroll.js +26 -9
- package/dist/client/conversation/use-near-bottom-autoscroll.js.map +1 -1
- package/dist/client/index.d.ts +5 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +5 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/settings/useBuilderStatus.d.ts +2 -0
- package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
- package/dist/client/settings/useBuilderStatus.js +21 -3
- package/dist/client/settings/useBuilderStatus.js.map +1 -1
- package/dist/client/settings/useBuilderStatus.spec.js +16 -2
- package/dist/client/settings/useBuilderStatus.spec.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +3 -0
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/client/use-chat-models.d.ts +6 -1
- package/dist/client/use-chat-models.d.ts.map +1 -1
- package/dist/client/use-chat-models.js +7 -3
- package/dist/client/use-chat-models.js.map +1 -1
- package/dist/client/use-chat-models.spec.d.ts +2 -0
- package/dist/client/use-chat-models.spec.d.ts.map +1 -0
- package/dist/client/use-chat-models.spec.js +39 -0
- package/dist/client/use-chat-models.spec.js.map +1 -0
- package/dist/code-agents/background-controller.d.ts.map +1 -1
- package/dist/code-agents/background-controller.js +16 -0
- package/dist/code-agents/background-controller.js.map +1 -1
- package/dist/code-agents/index.d.ts +2 -0
- package/dist/code-agents/index.d.ts.map +1 -1
- package/dist/code-agents/index.js +2 -0
- package/dist/code-agents/index.js.map +1 -1
- package/dist/code-agents/prompt-attachments.d.ts +11 -0
- package/dist/code-agents/prompt-attachments.d.ts.map +1 -0
- package/dist/code-agents/prompt-attachments.js +23 -0
- package/dist/code-agents/prompt-attachments.js.map +1 -0
- package/dist/code-agents/transcript-normalizer.js +14 -5
- package/dist/code-agents/transcript-normalizer.js.map +1 -1
- package/dist/code-agents/transcript-order.d.ts +16 -0
- package/dist/code-agents/transcript-order.d.ts.map +1 -0
- package/dist/code-agents/transcript-order.js +47 -0
- package/dist/code-agents/transcript-order.js.map +1 -0
- package/dist/extensions/routes.d.ts.map +1 -1
- package/dist/extensions/routes.js +18 -14
- package/dist/extensions/routes.js.map +1 -1
- package/dist/mcp/build-server.d.ts +33 -1
- package/dist/mcp/build-server.d.ts.map +1 -1
- package/dist/mcp/build-server.js +39 -12
- package/dist/mcp/build-server.js.map +1 -1
- package/dist/mcp/builtin-tools.d.ts +3 -1
- package/dist/mcp/builtin-tools.d.ts.map +1 -1
- package/dist/mcp/builtin-tools.js +40 -10
- package/dist/mcp/builtin-tools.js.map +1 -1
- package/dist/mcp/connect-route.d.ts.map +1 -1
- package/dist/mcp/connect-route.js +299 -97
- package/dist/mcp/connect-route.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +17 -3
- package/dist/mcp/server.js.map +1 -1
- package/dist/secrets/substitution.d.ts +18 -0
- package/dist/secrets/substitution.d.ts.map +1 -1
- package/dist/secrets/substitution.js +74 -0
- package/dist/secrets/substitution.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +33 -0
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/auth.d.ts +8 -0
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +8 -1
- package/dist/server/auth.js.map +1 -1
- package/dist/server/deep-link.d.ts +0 -18
- package/dist/server/deep-link.d.ts.map +1 -1
- package/dist/server/deep-link.js +2 -1
- package/dist/server/deep-link.js.map +1 -1
- package/dist/server/open-route.d.ts.map +1 -1
- package/dist/server/open-route.js +23 -4
- package/dist/server/open-route.js.map +1 -1
- package/dist/shared/agent-sidebar-url.d.ts +6 -0
- package/dist/shared/agent-sidebar-url.d.ts.map +1 -0
- package/dist/shared/agent-sidebar-url.js +37 -0
- package/dist/shared/agent-sidebar-url.js.map +1 -0
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/styles/agent-conversation.css +403 -0
- package/dist/styles/agent-native.css +2 -0
- 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/external-agents.md +27 -6
- package/docs/content/mcp-clients.md +2 -0
- package/docs/content/mcp-protocol.md +4 -2
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { ChatModelAdapter, ExportedMessageRepository } from "@assistant-ui/react";
|
|
2
3
|
import { type AgentDynamicSuggestionsOption } from "./dynamic-suggestions.js";
|
|
3
4
|
import type { ReasoningEffort } from "../shared/reasoning-effort.js";
|
|
4
5
|
import type { ChatThreadScope, ChatThreadSnapshot } from "./use-chat-threads.js";
|
|
@@ -38,6 +39,27 @@ export interface AssistantChatHandle {
|
|
|
38
39
|
/** Export the currently visible client-side thread for operations like fork. */
|
|
39
40
|
exportThreadSnapshot(): ChatThreadSnapshot | null;
|
|
40
41
|
}
|
|
42
|
+
export interface AssistantChatAdapterContext {
|
|
43
|
+
apiUrl: string;
|
|
44
|
+
tabId?: string;
|
|
45
|
+
threadId?: string;
|
|
46
|
+
modelRef: {
|
|
47
|
+
current: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
engineRef: {
|
|
50
|
+
current: string | undefined;
|
|
51
|
+
};
|
|
52
|
+
effortRef: {
|
|
53
|
+
current: ReasoningEffort | undefined;
|
|
54
|
+
};
|
|
55
|
+
execModeRef: {
|
|
56
|
+
current: "build" | "plan" | undefined;
|
|
57
|
+
};
|
|
58
|
+
browserTabId?: string;
|
|
59
|
+
scopeRef: {
|
|
60
|
+
current: ChatThreadScope | null | undefined;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
41
63
|
export interface AssistantChatProps {
|
|
42
64
|
/** API endpoint URL. Default: "/_agent-native/agent-chat" */
|
|
43
65
|
apiUrl?: string;
|
|
@@ -78,6 +100,12 @@ export interface AssistantChatProps {
|
|
|
78
100
|
onGenerateTitle?: (threadId: string, message: string) => void;
|
|
79
101
|
/** Optional content rendered just above the composer input */
|
|
80
102
|
composerSlot?: React.ReactNode;
|
|
103
|
+
/** Class applied to the shared composer area for host-specific sizing/skin. */
|
|
104
|
+
composerAreaClassName?: string;
|
|
105
|
+
/** Optional content rendered inside the composer toolbar after the attach button. */
|
|
106
|
+
composerToolbarSlot?: React.ReactNode;
|
|
107
|
+
/** Optional action rendered beside the voice/send controls. */
|
|
108
|
+
composerExtraActionButton?: React.ReactNode;
|
|
81
109
|
/** Disable the composer for capability-gated surfaces while still showing history. */
|
|
82
110
|
composerDisabled?: boolean;
|
|
83
111
|
/** Placeholder to show while the composer is disabled by the host surface. */
|
|
@@ -115,6 +143,36 @@ export interface AssistantChatProps {
|
|
|
115
143
|
onEffortChange?: (effort: ReasoningEffort) => void;
|
|
116
144
|
/** Callback when user clicks "Fork Chat" in the message actions menu */
|
|
117
145
|
onForkChat?: () => void | boolean | Promise<void | boolean>;
|
|
146
|
+
/** Override Builder/provider connect routing for embedded hosts. */
|
|
147
|
+
onConnectProvider?: () => void;
|
|
148
|
+
/**
|
|
149
|
+
* Controls the shared composer + menu. Sidebar keeps the full menu by default;
|
|
150
|
+
* hosts without the sidebar provider stack can use upload-only.
|
|
151
|
+
*/
|
|
152
|
+
plusMenuMode?: "full" | "upload-only" | "hidden";
|
|
153
|
+
/**
|
|
154
|
+
* Enable framework provider/env status checks. Embedded hosts that provide
|
|
155
|
+
* model/provider state through another transport can disable these probes.
|
|
156
|
+
*/
|
|
157
|
+
providerStatusChecksEnabled?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Advanced host override for non-HTTP transports. Defaults to the production
|
|
160
|
+
* sidebar SSE adapter when omitted.
|
|
161
|
+
*/
|
|
162
|
+
createAdapter?: (context: AssistantChatAdapterContext) => ChatModelAdapter;
|
|
163
|
+
/**
|
|
164
|
+
* Explicitly recreate an injected adapter when the host transport identity
|
|
165
|
+
* changes. Omit for the production sidebar so parent rerenders do not reset
|
|
166
|
+
* active chats.
|
|
167
|
+
*/
|
|
168
|
+
adapterReloadKey?: unknown;
|
|
169
|
+
/**
|
|
170
|
+
* Advanced host override for thread replay. Defaults to SQL thread fetch when
|
|
171
|
+
* `threadId` is set, or sessionStorage for legacy tab chats.
|
|
172
|
+
*/
|
|
173
|
+
loadHistoryRepository?: () => Promise<ExportedMessageRepository | null>;
|
|
174
|
+
/** Re-run `loadHistoryRepository` when the host's external transcript changes. */
|
|
175
|
+
historyReloadKey?: string | number | null;
|
|
118
176
|
}
|
|
119
177
|
export declare const CHAT_STORAGE_PREFIX = "agent-chat:";
|
|
120
178
|
/** Remove persisted chat for a given tabId (or "default"). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssistantChat.d.ts","sourceRoot":"","sources":["../../src/client/AssistantChat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AssistantChat.d.ts","sourceRoot":"","sources":["../../src/client/AssistantChat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAaf,OAAO,KAAK,EAEV,gBAAgB,EAEhB,yBAAyB,EAI1B,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAutD/B,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAKpE;AAED,KAAK,uCAAuC,GAAG;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,C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yles = `
|
|
|
289
289
|
.agent-tool-code .agent-markdown-shiki pre span { background: transparent; }
|
|
290
290
|
.agent-tool-code pre { margin: 0; min-width: max-content; padding: 0.75rem; background: transparent; color: inherit; }
|
|
291
291
|
.agent-tool-code mark { border-radius: 0.1875rem; background: rgba(245, 158, 11, 0.25); color: inherit; }
|
|
292
|
-
.agent-markdown hr { border: none; border-top: 1px solid hsl(var(--border, 0 0% 20%)); margin: 0.75em 0; }
|
|
292
|
+
.agent-markdown hr { border: none; border-top: 1px solid hsl(var(--border, 0 0% 20%)); margin: 0.75em 0 1em; }
|
|
293
293
|
.agent-markdown a { text-decoration: underline; text-underline-offset: 2px; }
|
|
294
294
|
.agent-markdown a.agent-markdown-cta { text-decoration: none; }
|
|
295
295
|
.agent-markdown blockquote { border-left: 2px solid hsl(var(--border, 0 0% 20%)); padding-left: 0.75em; margin: 0.5em 0; opacity: 0.8; }
|
|
@@ -1714,7 +1714,7 @@ function ensureMessageMetadata(repo) {
|
|
|
1714
1714
|
// Re-export for backwards compatibility
|
|
1715
1715
|
import { extractThreadMeta, normalizeThreadRepository, } from "../agent/thread-data-builder.js";
|
|
1716
1716
|
export { extractThreadMeta };
|
|
1717
|
-
const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateText, suggestions, dynamicSuggestions, emptyStateAddon, showHeader = true, onSwitchToCli, className, apiUrl, tabId, browserTabId, threadId, contextScope, onMessageCountChange, onSaveThread, onGenerateTitle, composerSlot, composerDisabled = false, composerDisabledPlaceholder, isNewThread, onSlashCommand, execMode, onExecModeChange, planModeDisabled, planModeDisabledReason, selectedModel, defaultModel, selectedEngine, selectedEffort, availableModels, onModelChange, onEffortChange, onForkChat, }, ref) {
|
|
1717
|
+
const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateText, suggestions, dynamicSuggestions, emptyStateAddon, showHeader = true, onSwitchToCli, className, apiUrl, tabId, browserTabId, threadId, contextScope, onMessageCountChange, onSaveThread, onGenerateTitle, composerSlot, composerAreaClassName, composerToolbarSlot, composerExtraActionButton, composerDisabled = false, composerDisabledPlaceholder, isNewThread, onSlashCommand, execMode, onExecModeChange, planModeDisabled, planModeDisabledReason, selectedModel, defaultModel, selectedEngine, selectedEffort, availableModels, onModelChange, onEffortChange, onForkChat, onConnectProvider, plusMenuMode = "full", providerStatusChecksEnabled = true, loadHistoryRepository, historyReloadKey, }, ref) {
|
|
1718
1718
|
const thread = useThread();
|
|
1719
1719
|
const threadRuntime = useThreadRuntime();
|
|
1720
1720
|
const composerRuntime = useComposerRuntime();
|
|
@@ -1866,7 +1866,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
1866
1866
|
}, [isRunning, tabId, threadId]);
|
|
1867
1867
|
// ─── Chat persistence ──────────────────────────────────────────────
|
|
1868
1868
|
const hasRestoredRef = useRef(false);
|
|
1869
|
-
const [isRestoring, setIsRestoring] = useState(!!threadId && !isNewThread);
|
|
1869
|
+
const [isRestoring, setIsRestoring] = useState(!!(threadId || loadHistoryRepository) && !isNewThread);
|
|
1870
1870
|
const onSaveThreadRef = useRef(onSaveThread);
|
|
1871
1871
|
onSaveThreadRef.current = onSaveThread;
|
|
1872
1872
|
const onGenerateTitleRef = useRef(onGenerateTitle);
|
|
@@ -1896,6 +1896,17 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
1896
1896
|
return repo;
|
|
1897
1897
|
}, [threadRuntime]);
|
|
1898
1898
|
const refreshThreadFromServer = useCallback(async () => {
|
|
1899
|
+
if (loadHistoryRepository) {
|
|
1900
|
+
try {
|
|
1901
|
+
const repo = await loadHistoryRepository();
|
|
1902
|
+
if (!repo)
|
|
1903
|
+
return null;
|
|
1904
|
+
return importThreadData(repo);
|
|
1905
|
+
}
|
|
1906
|
+
catch {
|
|
1907
|
+
return null;
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1899
1910
|
if (!threadId)
|
|
1900
1911
|
return null;
|
|
1901
1912
|
try {
|
|
@@ -1910,7 +1921,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
1910
1921
|
catch {
|
|
1911
1922
|
return null;
|
|
1912
1923
|
}
|
|
1913
|
-
}, [apiUrl, importThreadData, threadId]);
|
|
1924
|
+
}, [apiUrl, importThreadData, loadHistoryRepository, threadId]);
|
|
1914
1925
|
const wasRecentlyStoppedRun = useCallback((runId) => {
|
|
1915
1926
|
const stopped = userStoppedRunRef.current;
|
|
1916
1927
|
return Boolean(stopped &&
|
|
@@ -2097,7 +2108,24 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2097
2108
|
if (hasRestoredRef.current)
|
|
2098
2109
|
return;
|
|
2099
2110
|
hasRestoredRef.current = true;
|
|
2100
|
-
if (
|
|
2111
|
+
if (loadHistoryRepository) {
|
|
2112
|
+
(async () => {
|
|
2113
|
+
try {
|
|
2114
|
+
const repo = await loadHistoryRepository();
|
|
2115
|
+
if (repo) {
|
|
2116
|
+
importThreadData(repo, { markTitleGenerated: true });
|
|
2117
|
+
}
|
|
2118
|
+
titleGeneratedRef.current = true;
|
|
2119
|
+
}
|
|
2120
|
+
catch {
|
|
2121
|
+
// Start fresh
|
|
2122
|
+
}
|
|
2123
|
+
finally {
|
|
2124
|
+
setIsRestoring(false);
|
|
2125
|
+
}
|
|
2126
|
+
})();
|
|
2127
|
+
}
|
|
2128
|
+
else if (threadId) {
|
|
2101
2129
|
(async () => {
|
|
2102
2130
|
try {
|
|
2103
2131
|
const res = await fetch(`${apiUrl}/threads/${encodeURIComponent(threadId)}`);
|
|
@@ -2145,6 +2173,32 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2145
2173
|
threadRuntime,
|
|
2146
2174
|
importThreadData,
|
|
2147
2175
|
reconnectActiveRunForThread,
|
|
2176
|
+
loadHistoryRepository,
|
|
2177
|
+
]);
|
|
2178
|
+
useEffect(() => {
|
|
2179
|
+
if (!loadHistoryRepository ||
|
|
2180
|
+
!hasRestoredRef.current ||
|
|
2181
|
+
isRestoring ||
|
|
2182
|
+
isRunning) {
|
|
2183
|
+
return;
|
|
2184
|
+
}
|
|
2185
|
+
let cancelled = false;
|
|
2186
|
+
void loadHistoryRepository()
|
|
2187
|
+
.then((repo) => {
|
|
2188
|
+
if (cancelled || !repo)
|
|
2189
|
+
return;
|
|
2190
|
+
importThreadData(repo, { markTitleGenerated: true });
|
|
2191
|
+
})
|
|
2192
|
+
.catch(() => undefined);
|
|
2193
|
+
return () => {
|
|
2194
|
+
cancelled = true;
|
|
2195
|
+
};
|
|
2196
|
+
}, [
|
|
2197
|
+
historyReloadKey,
|
|
2198
|
+
importThreadData,
|
|
2199
|
+
isRestoring,
|
|
2200
|
+
isRunning,
|
|
2201
|
+
loadHistoryRepository,
|
|
2148
2202
|
]);
|
|
2149
2203
|
// If assistant-ui stops the local runtime while the background server run is
|
|
2150
2204
|
// still alive, immediately switch into the same reconnect path used after a
|
|
@@ -2311,6 +2365,10 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2311
2365
|
// Check on mount and whenever SettingsPanel dispatches
|
|
2312
2366
|
// `agent-engine:configured-changed` so the gate flips live without reload.
|
|
2313
2367
|
useEffect(() => {
|
|
2368
|
+
if (!providerStatusChecksEnabled) {
|
|
2369
|
+
setMissingApiKey(false);
|
|
2370
|
+
return;
|
|
2371
|
+
}
|
|
2314
2372
|
let cancelled = false;
|
|
2315
2373
|
const check = async () => {
|
|
2316
2374
|
const [envKeys, builderStatus, engineStatus] = await Promise.all([
|
|
@@ -2344,7 +2402,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2344
2402
|
cancelled = true;
|
|
2345
2403
|
window.removeEventListener("agent-engine:configured-changed", check);
|
|
2346
2404
|
};
|
|
2347
|
-
}, []);
|
|
2405
|
+
}, [providerStatusChecksEnabled]);
|
|
2348
2406
|
// Listen for auth error events from the adapter
|
|
2349
2407
|
const checkAuthSession = useCallback(async () => {
|
|
2350
2408
|
try {
|
|
@@ -2799,7 +2857,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2799
2857
|
.replace(/<context>[\s\S]*?<\/context>\n?/g, "")
|
|
2800
2858
|
.trim();
|
|
2801
2859
|
return (_jsx("div", { className: "flex justify-end group", children: _jsxs("div", { className: "relative max-w-[85%] rounded-lg bg-accent/50 text-foreground/60 px-3 py-2 text-sm leading-relaxed whitespace-pre-wrap break-words", children: [_jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-muted-foreground mb-1 font-medium uppercase tracking-wide", children: [_jsx(IconClock, { className: "h-3 w-3" }), "Queued"] }), displayText, msg.images && msg.images.length > 0 && (_jsx("div", { className: "flex flex-wrap gap-1.5 mt-1.5", children: msg.images.map((img, j) => (_jsx("img", { src: img, alt: "", className: "h-12 w-12 rounded object-cover border border-border/50" }, j))) })), _jsx("button", { type: "button", onClick: () => setQueuedMessages((prev) => prev.filter((m) => m.id !== msg.id)), "aria-label": "Remove from queue", className: "absolute -top-2 -right-2 flex h-5 w-5 items-center justify-center rounded-full border border-border bg-background text-muted-foreground opacity-0 group-hover:opacity-100 focus-visible:opacity-100 hover:text-foreground hover:bg-accent shadow-sm", children: _jsx(IconX, { className: "h-3 w-3" }) })] }) }, msg.id));
|
|
2802
|
-
})] })) }), showScrollToBottom && (_jsx("div", { className: "shrink-0 flex justify-center -mb-1", children: _jsx("button", { type: "button", onClick: scrollToBottom, className: "flex h-7 w-7 items-center justify-center rounded-full border border-border bg-background shadow-sm hover:bg-accent", "aria-label": "Scroll to bottom", children: _jsx(IconChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground" }) }) })), composerSlot, showPlanModeCallout && (_jsx(PlanModeCallout, { canImplementPlan: canImplementPlan, onImplementPlan: handleImplementPlan, onSwitchToAct: handleSwitchToAct })), _jsx(SelectionAttachedPill, {}), _jsxs(AgentComposerFrame, { className: cn(missingApiKey && "cursor-pointer", isComposerDisabled && "opacity-70"), onClick: missingApiKey
|
|
2860
|
+
})] })) }), showScrollToBottom && (_jsx("div", { className: "shrink-0 flex justify-center -mb-1", children: _jsx("button", { type: "button", onClick: scrollToBottom, className: "flex h-7 w-7 items-center justify-center rounded-full border border-border bg-background shadow-sm hover:bg-accent", "aria-label": "Scroll to bottom", children: _jsx(IconChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground" }) }) })), composerSlot, showPlanModeCallout && (_jsx(PlanModeCallout, { canImplementPlan: canImplementPlan, onImplementPlan: handleImplementPlan, onSwitchToAct: handleSwitchToAct })), _jsx(SelectionAttachedPill, {}), _jsxs(AgentComposerFrame, { className: cn(composerAreaClassName, missingApiKey && "cursor-pointer", isComposerDisabled && "opacity-70"), onClick: missingApiKey
|
|
2803
2861
|
? () => setMissingKeyBouncePulse((p) => p + 1)
|
|
2804
2862
|
: undefined, children: [_jsx(ComposerAttachmentPreviewStrip, {}), _jsx(TiptapComposer, { focusRef: tiptapRef, disabled: isComposerDisabled, placeholder: missingApiKey
|
|
2805
2863
|
? "Connect an AI engine above to start chatting…"
|
|
@@ -2812,37 +2870,39 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2812
2870
|
: "Send a follow-up..."
|
|
2813
2871
|
: undefined, onSubmit: isRunning
|
|
2814
2872
|
? (text, references, attachments, options) => void addToQueue(text, undefined, references.length > 0 ? references : undefined, attachments, undefined, options?.intent ?? "immediate")
|
|
2815
|
-
: undefined, onSlashCommand: onSlashCommand, execMode: execMode, onExecModeChange: onExecModeChange, planModeDisabled: planModeDisabled, planModeDisabledReason: planModeDisabledReason, selectedModel: selectedModel ?? defaultModel, selectedEffort: selectedEffort, availableModels: availableModels, onModelChange: onModelChange, onEffortChange: onEffortChange, draftScope: threadId || tabId, interceptBuildRequestsForBuilder: true, extraActionButton: showRunningInUI ? (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: () => {
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2873
|
+
: 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, plusMenuMode: plusMenuMode, providerConnectStatusEnabled: providerStatusChecksEnabled, draftScope: threadId || tabId, interceptBuildRequestsForBuilder: true, extraActionButton: composerExtraActionButton || showRunningInUI ? (_jsxs(_Fragment, { children: [composerExtraActionButton, showRunningInUI && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: () => {
|
|
2874
|
+
// Nuclear stop: flip forceStopped so isRunning is false
|
|
2875
|
+
// immediately. This unblocks submission even if the
|
|
2876
|
+
// runtime or reconnect state is stuck.
|
|
2877
|
+
setForceStopped(true);
|
|
2878
|
+
const activeRun = getActiveRun();
|
|
2879
|
+
const runIdToAbort = reconnectRunIdRef.current ?? activeRun?.runId;
|
|
2880
|
+
userStoppedRunRef.current = {
|
|
2881
|
+
at: Date.now(),
|
|
2882
|
+
...(runIdToAbort
|
|
2883
|
+
? { runId: runIdToAbort }
|
|
2884
|
+
: {}),
|
|
2885
|
+
};
|
|
2886
|
+
setRunErrorInfo(null);
|
|
2887
|
+
setDismissedRunErrorKey(null);
|
|
2888
|
+
if (runIdToAbort) {
|
|
2889
|
+
fetch(`${apiUrl}/runs/${encodeURIComponent(runIdToAbort)}/abort`, { method: "POST" }).catch(() => { });
|
|
2890
|
+
}
|
|
2891
|
+
if (isReconnecting) {
|
|
2892
|
+
reconnectAbortRef.current?.abort();
|
|
2893
|
+
reconnectAbortRef.current = null;
|
|
2894
|
+
reconnectRunIdRef.current = null;
|
|
2895
|
+
setIsReconnecting(false);
|
|
2896
|
+
setReconnectFrozen(reconnectContent.length > 0);
|
|
2897
|
+
}
|
|
2898
|
+
threadRuntime.cancelRun();
|
|
2899
|
+
window.dispatchEvent(new CustomEvent("agentNative.chatRunning", {
|
|
2900
|
+
detail: {
|
|
2901
|
+
isRunning: false,
|
|
2902
|
+
tabId: tabId || threadId,
|
|
2903
|
+
},
|
|
2904
|
+
}));
|
|
2905
|
+
}, 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 })] })] }) }) }) }));
|
|
2846
2906
|
});
|
|
2847
2907
|
export const AssistantChat = forwardRef(function AssistantChat({ apiUrl = agentNativePath("/_agent-native/agent-chat"), tabId, browserTabId, threadId, contextScope, ...props }, ref) {
|
|
2848
2908
|
const modelRef = useRef(props.selectedModel);
|
|
@@ -2855,17 +2915,29 @@ export const AssistantChat = forwardRef(function AssistantChat({ apiUrl = agentN
|
|
|
2855
2915
|
execModeRef.current = props.execMode;
|
|
2856
2916
|
const scopeRef = useRef(contextScope);
|
|
2857
2917
|
scopeRef.current = contextScope;
|
|
2858
|
-
const
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2918
|
+
const createAdapterRef = useRef(props.createAdapter);
|
|
2919
|
+
createAdapterRef.current = props.createAdapter;
|
|
2920
|
+
const adapter = useMemo(() => {
|
|
2921
|
+
const context = {
|
|
2922
|
+
apiUrl,
|
|
2923
|
+
tabId,
|
|
2924
|
+
threadId,
|
|
2925
|
+
modelRef,
|
|
2926
|
+
engineRef,
|
|
2927
|
+
effortRef,
|
|
2928
|
+
execModeRef,
|
|
2929
|
+
browserTabId,
|
|
2930
|
+
scopeRef,
|
|
2931
|
+
};
|
|
2932
|
+
const createAdapter = createAdapterRef.current;
|
|
2933
|
+
return createAdapter
|
|
2934
|
+
? createAdapter(context)
|
|
2935
|
+
: createAgentChatAdapter(context);
|
|
2936
|
+
},
|
|
2937
|
+
// Adapter factories must be memoized and use refs for changing values.
|
|
2938
|
+
// `adapterReloadKey` is an explicit opt-in for embedded hosts whose
|
|
2939
|
+
// transport identity can change without changing tab/thread ids.
|
|
2940
|
+
[apiUrl, tabId, threadId, browserTabId, props.adapterReloadKey]);
|
|
2869
2941
|
const attachmentAdapter = useMemo(() => new CompositeAttachmentAdapter([
|
|
2870
2942
|
new DownscalingImageAttachmentAdapter(),
|
|
2871
2943
|
new BinaryDocumentAttachmentAdapter(),
|
|
@@ -2874,6 +2946,6 @@ export const AssistantChat = forwardRef(function AssistantChat({ apiUrl = agentN
|
|
|
2874
2946
|
const runtime = useLocalRuntime(adapter, {
|
|
2875
2947
|
adapters: { attachments: attachmentAdapter },
|
|
2876
2948
|
});
|
|
2877
|
-
return (_jsx(AssistantRuntimeProvider, { runtime: runtime, children: _jsx(ThreadPrimitive.Root, { className: "flex flex-1 flex-col h-full min-h-0 overflow-x-hidden", children: _jsx(AssistantUiStaleIndexErrorBoundary, { resetKey: `${tabId ?? ""}:${threadId ?? ""}`, componentName: "AssistantChat", children: _jsx(AssistantChatInner, { ref: ref, ...props, browserTabId: browserTabId, contextScope: contextScope, apiUrl: apiUrl, tabId: tabId, threadId: threadId }) }) }) }));
|
|
2949
|
+
return (_jsx(AssistantRuntimeProvider, { runtime: runtime, children: _jsx(TooltipProvider, { delayDuration: 200, children: _jsx(ThreadPrimitive.Root, { className: "flex flex-1 flex-col h-full min-h-0 overflow-x-hidden", children: _jsx(AssistantUiStaleIndexErrorBoundary, { resetKey: `${tabId ?? ""}:${threadId ?? ""}`, componentName: "AssistantChat", children: _jsx(AssistantChatInner, { ref: ref, ...props, browserTabId: browserTabId, contextScope: contextScope, apiUrl: apiUrl, tabId: tabId, threadId: threadId }) }) }) }) }));
|
|
2878
2950
|
});
|
|
2879
2951
|
//# sourceMappingURL=AssistantChat.js.map
|