@agent-native/core 0.22.45 → 0.24.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/a2a/artifact-response.js +1 -1
- package/dist/a2a/artifact-response.js.map +1 -1
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +5 -6
- 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 +12 -4
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts +9 -2
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +9 -2
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/cli/app-skill.d.ts +139 -0
- package/dist/cli/app-skill.d.ts.map +1 -0
- package/dist/cli/app-skill.js +960 -0
- package/dist/cli/app-skill.js.map +1 -0
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +13 -4
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/index.js +24 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills.d.ts +39 -0
- package/dist/cli/skills.d.ts.map +1 -0
- package/dist/cli/skills.js +363 -0
- package/dist/cli/skills.js.map +1 -0
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +9 -6
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/cli/workspace-dev.d.ts.map +1 -1
- package/dist/cli/workspace-dev.js +103 -9
- package/dist/cli/workspace-dev.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +2 -0
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +2 -2
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +13 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +66 -22
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +17 -1
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +70 -10
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionViewer.js +157 -2
- package/dist/client/extensions/ExtensionViewer.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts +6 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +9 -2
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/client/use-chat-threads.d.ts +8 -1
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +37 -7
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/client/use-chat-threads.spec.js +59 -0
- package/dist/client/use-chat-threads.spec.js.map +1 -1
- package/dist/deploy/workspace-deploy.js +6 -0
- package/dist/deploy/workspace-deploy.js.map +1 -1
- package/dist/extensions/actions.d.ts.map +1 -1
- package/dist/extensions/actions.js +112 -2
- package/dist/extensions/actions.js.map +1 -1
- package/dist/extensions/routes.d.ts.map +1 -1
- package/dist/extensions/routes.js +37 -2
- package/dist/extensions/routes.js.map +1 -1
- package/dist/extensions/schema.d.ts +275 -0
- package/dist/extensions/schema.d.ts.map +1 -1
- package/dist/extensions/schema.js +53 -1
- package/dist/extensions/schema.js.map +1 -1
- package/dist/extensions/store.d.ts +40 -0
- package/dist/extensions/store.d.ts.map +1 -1
- package/dist/extensions/store.js +367 -3
- package/dist/extensions/store.js.map +1 -1
- package/dist/mcp-client/index.d.ts +1 -1
- package/dist/mcp-client/index.d.ts.map +1 -1
- package/dist/mcp-client/index.js +1 -1
- package/dist/mcp-client/index.js.map +1 -1
- package/dist/mcp-client/routes.d.ts +1 -0
- package/dist/mcp-client/routes.d.ts.map +1 -1
- package/dist/mcp-client/routes.js +52 -0
- package/dist/mcp-client/routes.js.map +1 -1
- package/dist/mcp-client/workspace-servers.d.ts +15 -0
- package/dist/mcp-client/workspace-servers.d.ts.map +1 -0
- package/dist/mcp-client/workspace-servers.js +297 -0
- package/dist/mcp-client/workspace-servers.js.map +1 -0
- package/dist/resources/handlers.d.ts.map +1 -1
- package/dist/resources/handlers.js +38 -25
- package/dist/resources/handlers.js.map +1 -1
- package/dist/resources/store.d.ts +11 -3
- package/dist/resources/store.d.ts.map +1 -1
- package/dist/resources/store.js +220 -9
- package/dist/resources/store.js.map +1 -1
- package/dist/scripts/call-agent.js +1 -1
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +25 -6
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-discovery.d.ts.map +1 -1
- package/dist/server/agent-discovery.js +34 -9
- package/dist/server/agent-discovery.js.map +1 -1
- package/dist/server/auth-marketing.d.ts.map +1 -1
- package/dist/server/auth-marketing.js +8 -5
- package/dist/server/auth-marketing.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +6 -2
- package/dist/server/auth.js.map +1 -1
- package/dist/templates/default/AGENTS.md +12 -4
- package/dist/templates/default/DEVELOPING.md +7 -5
- package/dist/templates/workspace-core/AGENTS.md +7 -0
- package/dist/templates/workspace-root/AGENTS.md +6 -0
- package/docs/content/creating-templates.md +14 -9
- package/docs/content/database.md +44 -17
- package/docs/content/deployment.md +15 -7
- package/docs/content/dispatch.md +7 -1
- package/docs/content/embedding-sdk.md +79 -0
- package/docs/content/extensions.md +5 -0
- package/docs/content/key-concepts.md +15 -17
- package/docs/content/mcp-clients.md +30 -0
- package/docs/content/multi-app-workspace.md +3 -2
- package/docs/content/multi-tenancy.md +4 -4
- package/docs/content/server.md +10 -7
- package/docs/content/skills-guide.md +75 -0
- package/docs/content/template-analytics.md +1 -1
- package/docs/content/template-assets.md +130 -0
- package/docs/content/template-dispatch.md +3 -2
- package/docs/content/template-slides.md +2 -2
- package/docs/content/workspace-management.md +2 -2
- package/docs/content/workspace.md +11 -9
- package/package.json +1 -1
- package/src/templates/default/AGENTS.md +12 -4
- package/src/templates/default/DEVELOPING.md +7 -5
- package/src/templates/workspace-core/AGENTS.md +7 -0
- package/src/templates/workspace-root/AGENTS.md +6 -0
- package/docs/content/template-images.md +0 -55
|
@@ -4,6 +4,8 @@ import { type AgentChatSurfaceKind } from "./agent-chat-adapter.js";
|
|
|
4
4
|
import { type AgentDynamicSuggestionsOption } from "./dynamic-suggestions.js";
|
|
5
5
|
import type { ReasoningEffort } from "../shared/reasoning-effort.js";
|
|
6
6
|
import type { ChatThreadScope, ChatThreadSnapshot } from "./use-chat-threads.js";
|
|
7
|
+
import type { AgentComposerLayoutVariant } from "./composer/types.js";
|
|
8
|
+
export type AgentRecoveryAction = "continue" | "retry";
|
|
7
9
|
export declare function displayableUserMessageText(text: string): string;
|
|
8
10
|
export declare function isAssistantUiStaleIndexError(error: unknown): boolean;
|
|
9
11
|
type AssistantUiStaleIndexErrorBoundaryProps = {
|
|
@@ -28,9 +30,12 @@ export declare function AssistantMessageListErrorBoundary({ resetKey, children,
|
|
|
28
30
|
resetKey: string;
|
|
29
31
|
children: React.ReactNode;
|
|
30
32
|
}): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare function latestNonRecoveryUserMessageText(messages: readonly unknown[]): string;
|
|
31
34
|
export interface AssistantChatHandle {
|
|
32
35
|
/** Programmatically send a message into this chat */
|
|
33
36
|
sendMessage(text: string, images?: string[]): void;
|
|
37
|
+
/** Programmatically send a recovery prompt without replacing the original request. */
|
|
38
|
+
sendRecoveryMessage(text: string, recoveryAction: AgentRecoveryAction, images?: string[]): void;
|
|
34
39
|
/** Queue a message to send after the current run finishes */
|
|
35
40
|
queueMessage(text: string, images?: string[]): void;
|
|
36
41
|
/** Whether the chat is currently running */
|
|
@@ -109,6 +114,14 @@ export interface AssistantChatProps {
|
|
|
109
114
|
composerSlot?: React.ReactNode;
|
|
110
115
|
/** Class applied to the shared composer area for host-specific sizing/skin. */
|
|
111
116
|
composerAreaClassName?: string;
|
|
117
|
+
/** Placeholder for the shared composer in its normal idle state. */
|
|
118
|
+
composerPlaceholder?: string;
|
|
119
|
+
/** Visual density for the shared composer shell. */
|
|
120
|
+
composerLayoutVariant?: AgentComposerLayoutVariant;
|
|
121
|
+
/** Center the composer on a fresh empty chat instead of pinning it low. */
|
|
122
|
+
centerComposerWhenEmpty?: boolean;
|
|
123
|
+
/** Hide the default empty-state icon/text/suggestions for custom start screens. */
|
|
124
|
+
emptyStateDisplay?: "default" | "hidden";
|
|
112
125
|
/** Optional content rendered inside the composer toolbar after the attach button. */
|
|
113
126
|
composerToolbarSlot?: React.ReactNode;
|
|
114
127
|
/** Optional action rendered beside the voice/send controls. */
|
|
@@ -1 +1 @@
|
|
|
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;AAK7B,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EACnB,MAAM,uBAAuB,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,gBAA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 function createAgentImageAttachments(images) {
|
|
|
179
179
|
};
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
-
function createUserMessageRunConfig(references, requestMode) {
|
|
182
|
+
function createUserMessageRunConfig(references, requestMode, recoveryAction) {
|
|
183
183
|
const custom = {};
|
|
184
184
|
if (references && references.length > 0) {
|
|
185
185
|
custom.references = references;
|
|
@@ -187,7 +187,16 @@ function createUserMessageRunConfig(references, requestMode) {
|
|
|
187
187
|
if (requestMode) {
|
|
188
188
|
custom.requestMode = requestMode;
|
|
189
189
|
}
|
|
190
|
-
|
|
190
|
+
const options = {};
|
|
191
|
+
if (Object.keys(custom).length > 0) {
|
|
192
|
+
options.runConfig = { custom };
|
|
193
|
+
}
|
|
194
|
+
if (recoveryAction) {
|
|
195
|
+
options.metadata = {
|
|
196
|
+
custom: { agentNativeRecoveryAction: recoveryAction },
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
return options;
|
|
191
200
|
}
|
|
192
201
|
function escapeQueuedAttachmentAttribute(value) {
|
|
193
202
|
return value.replace(/&/g, "&").replace(/"/g, """);
|
|
@@ -1570,6 +1579,35 @@ function getMessageText(message) {
|
|
|
1570
1579
|
}
|
|
1571
1580
|
return typeof content === "string" ? content.trim() : "";
|
|
1572
1581
|
}
|
|
1582
|
+
const RECOVERY_USER_MESSAGE_PREFIXES = [
|
|
1583
|
+
"Continue from where you left off",
|
|
1584
|
+
"Continue from where you stopped",
|
|
1585
|
+
"Retry the previous request from a clean approach",
|
|
1586
|
+
];
|
|
1587
|
+
function getRecoveryActionMetadata(message) {
|
|
1588
|
+
const meta = message?.metadata;
|
|
1589
|
+
const action = meta?.custom?.agentNativeRecoveryAction;
|
|
1590
|
+
return action === "continue" || action === "retry" ? action : null;
|
|
1591
|
+
}
|
|
1592
|
+
function isRecoveryUserMessage(message) {
|
|
1593
|
+
if (getRecoveryActionMetadata(message))
|
|
1594
|
+
return true;
|
|
1595
|
+
const text = getMessageText(message);
|
|
1596
|
+
return RECOVERY_USER_MESSAGE_PREFIXES.some((prefix) => text.startsWith(prefix));
|
|
1597
|
+
}
|
|
1598
|
+
export function latestNonRecoveryUserMessageText(messages) {
|
|
1599
|
+
for (let i = messages.length - 1; i >= 0; i--) {
|
|
1600
|
+
const message = messages[i];
|
|
1601
|
+
if (message?.role !== "user")
|
|
1602
|
+
continue;
|
|
1603
|
+
if (isRecoveryUserMessage(message))
|
|
1604
|
+
continue;
|
|
1605
|
+
const text = getMessageText(message);
|
|
1606
|
+
if (text)
|
|
1607
|
+
return text;
|
|
1608
|
+
}
|
|
1609
|
+
return "";
|
|
1610
|
+
}
|
|
1573
1611
|
function RunErrorRecoveryCard({ info, onContinue, onRetry, onFork, onDismiss, }) {
|
|
1574
1612
|
const [detailsOpen, setDetailsOpen] = useState(false);
|
|
1575
1613
|
const [copied, setCopied] = useState(false);
|
|
@@ -1772,7 +1810,7 @@ function ensureMessageMetadata(repo) {
|
|
|
1772
1810
|
// Re-export for backwards compatibility
|
|
1773
1811
|
import { extractThreadMeta, normalizeThreadRepository, } from "../agent/thread-data-builder.js";
|
|
1774
1812
|
export { extractThreadMeta };
|
|
1775
|
-
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) {
|
|
1813
|
+
const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateText, suggestions, dynamicSuggestions, emptyStateAddon, showHeader = true, onSwitchToCli, className, apiUrl, tabId, browserTabId, threadId, contextScope, onMessageCountChange, onSaveThread, onGenerateTitle, composerSlot, composerAreaClassName, composerPlaceholder, composerLayoutVariant = "default", centerComposerWhenEmpty = false, emptyStateDisplay = "default", 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) {
|
|
1776
1814
|
const thread = useThread();
|
|
1777
1815
|
const threadRuntime = useThreadRuntime();
|
|
1778
1816
|
const composerRuntime = useComposerRuntime();
|
|
@@ -1852,7 +1890,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
1852
1890
|
// user message and the `performRoundtrip` call that tries to record the
|
|
1853
1891
|
// assistant placeholder against that user message's id. The internal-bug
|
|
1854
1892
|
// throw turns into an unhandled rejection that Sentry captures from the
|
|
1855
|
-
//
|
|
1893
|
+
// assets.agent-native.com prompt composer (AGENT-NATIVE-BROWSER-18). Fix
|
|
1856
1894
|
// it by relinking to the current head whenever the requested parent has
|
|
1857
1895
|
// gone missing instead of throwing.
|
|
1858
1896
|
useEffect(() => {
|
|
@@ -2646,7 +2684,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2646
2684
|
...(messageAttachments.length > 0
|
|
2647
2685
|
? { attachments: messageAttachments }
|
|
2648
2686
|
: {}),
|
|
2649
|
-
...createUserMessageRunConfig(next.references, next.requestMode),
|
|
2687
|
+
...createUserMessageRunConfig(next.references, next.requestMode, next.recoveryAction),
|
|
2650
2688
|
});
|
|
2651
2689
|
})();
|
|
2652
2690
|
}, 100);
|
|
@@ -2742,7 +2780,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2742
2780
|
threadId,
|
|
2743
2781
|
threadRuntime,
|
|
2744
2782
|
]);
|
|
2745
|
-
const addToQueue = useCallback(async (text, images, references, attachments, requestMode, intent = "queued") => {
|
|
2783
|
+
const addToQueue = useCallback(async (text, images, references, attachments, requestMode, intent = "queued", recoveryAction) => {
|
|
2746
2784
|
materializeFrozenReconnectContent();
|
|
2747
2785
|
setShowContinue(false);
|
|
2748
2786
|
setLoopLimitInfo(null);
|
|
@@ -2788,6 +2826,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2788
2826
|
attachments: messageAttachments.length > 0 ? messageAttachments : undefined,
|
|
2789
2827
|
references,
|
|
2790
2828
|
requestMode: effectiveRequestMode,
|
|
2829
|
+
recoveryAction,
|
|
2791
2830
|
},
|
|
2792
2831
|
]);
|
|
2793
2832
|
}
|
|
@@ -2798,7 +2837,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2798
2837
|
...(messageAttachments.length > 0
|
|
2799
2838
|
? { attachments: messageAttachments }
|
|
2800
2839
|
: {}),
|
|
2801
|
-
...createUserMessageRunConfig(references, effectiveRequestMode),
|
|
2840
|
+
...createUserMessageRunConfig(references, effectiveRequestMode, recoveryAction),
|
|
2802
2841
|
});
|
|
2803
2842
|
}
|
|
2804
2843
|
}, [execMode, isRunning, materializeFrozenReconnectContent, threadRuntime]);
|
|
@@ -2807,6 +2846,9 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2807
2846
|
sendMessage(text, images) {
|
|
2808
2847
|
addToQueue(text, images);
|
|
2809
2848
|
},
|
|
2849
|
+
sendRecoveryMessage(text, recoveryAction, images) {
|
|
2850
|
+
addToQueue(text, images, undefined, undefined, undefined, "queued", recoveryAction);
|
|
2851
|
+
},
|
|
2810
2852
|
queueMessage(text, images) {
|
|
2811
2853
|
addToQueue(text, images);
|
|
2812
2854
|
},
|
|
@@ -2884,13 +2926,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2884
2926
|
return null;
|
|
2885
2927
|
return getRunErrorMetadata(last);
|
|
2886
2928
|
}, [messages]);
|
|
2887
|
-
const lastUserText = useMemo(() =>
|
|
2888
|
-
for (let i = messages.length - 1; i >= 0; i--) {
|
|
2889
|
-
if (messages[i]?.role === "user")
|
|
2890
|
-
return getMessageText(messages[i]);
|
|
2891
|
-
}
|
|
2892
|
-
return "";
|
|
2893
|
-
}, [messages]);
|
|
2929
|
+
const lastUserText = useMemo(() => latestNonRecoveryUserMessageText(messages), [messages]);
|
|
2894
2930
|
const latestMessage = messages[messages.length - 1];
|
|
2895
2931
|
const latestMessageRole = latestMessage?.role;
|
|
2896
2932
|
const latestAssistantWasPlan = latestMessageRole === "assistant" &&
|
|
@@ -2922,7 +2958,13 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2922
2958
|
(!userStoppedRunRef.current.runId ||
|
|
2923
2959
|
!visibleRunError.runId ||
|
|
2924
2960
|
userStoppedRunRef.current.runId === visibleRunError.runId));
|
|
2925
|
-
|
|
2961
|
+
const isFreshEmptyChat = messages.length === 0 &&
|
|
2962
|
+
!isRestoring &&
|
|
2963
|
+
!isReconnecting &&
|
|
2964
|
+
!authError &&
|
|
2965
|
+
!missingApiKey;
|
|
2966
|
+
const centeredEmptyState = centerComposerWhenEmpty && isFreshEmptyChat;
|
|
2967
|
+
return (_jsx(CheckpointContext.Provider, { value: checkpointCtx, children: _jsx(MessageActionsContext.Provider, { value: messageActionsCtx, children: _jsx(ChatRunningContext.Provider, { value: isRunning, children: _jsxs("div", { "data-agent-empty-state": centeredEmptyState ? "centered" : undefined, className: cn("relative flex flex-1 flex-col h-full min-h-0 text-foreground", className), onDragEnter: handleChatDragEnter, onDragOver: handleChatDragOver, onDragLeave: handleChatDragLeave, onDropCapture: handleChatDropCapture, onDrop: handleChatDrop, children: [dropActive && (_jsx("div", { "aria-hidden": "true", className: "pointer-events-none absolute inset-0 z-50 flex items-center justify-center rounded-md border-2 border-dashed border-primary/70 bg-primary/5 backdrop-blur-[1px]", children: _jsx("span", { className: "rounded-md bg-background/90 px-3 py-1.5 text-xs font-medium text-foreground shadow-sm", children: "Drop to attach" }) })), showHeader && (_jsxs("div", { className: "flex h-11 shrink-0 items-center justify-between border-b border-border px-4", children: [_jsx("span", { className: "text-[13px] font-medium text-muted-foreground", children: "Agent" }), _jsx("div", { className: "flex items-center gap-1", children: onSwitchToCli && (_jsx(TooltipProvider, { delayDuration: 200, children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("button", { onClick: onSwitchToCli, "aria-label": "Switch to CLI", className: "flex items-center gap-1 text-[12px] text-muted-foreground hover:text-foreground px-2 py-1 rounded-md hover:bg-accent", children: [_jsx(IconTerminal, { className: "h-3.5 w-3.5" }), "CLI"] }) }), _jsx(TooltipContent, { children: "Switch to CLI" })] }) })) })] })), _jsx("div", { ref: scrollRef, className: "agent-chat-scroll flex-1 overflow-y-auto overflow-x-hidden min-h-0", children: authError ? (_jsxs("div", { className: "flex flex-col items-center justify-center h-full px-4 gap-3", children: [_jsx("div", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-destructive/10", children: _jsx(IconLock, { className: "h-5 w-5 text-destructive" }) }), _jsxs("div", { className: "text-center max-w-[280px]", children: [_jsx("p", { className: "text-sm font-medium text-foreground mb-1", children: authSessionAvailable
|
|
2926
2968
|
? "Chat session needs refresh"
|
|
2927
2969
|
: authError.sessionExpired
|
|
2928
2970
|
? "Session expired"
|
|
@@ -2948,7 +2990,9 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2948
2990
|
window.location.reload();
|
|
2949
2991
|
}, className: authSessionAvailable
|
|
2950
2992
|
? "text-xs text-background bg-foreground hover:opacity-90 px-3 py-1.5 rounded-md"
|
|
2951
|
-
: "text-xs text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md border border-border hover:bg-accent", children: "Refresh chat" })] })] })) : missingApiKey && messages.length === 0 ? (_jsx("div", { className: "flex flex-col items-center justify-center h-full px-2", children: _jsx(BuilderSetupCard, { onConnected: handleBuilderConnected, bouncePulse: missingKeyBouncePulse }) })) : 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" })] })] })) : messages.length === 0 && !isReconnecting ? (_jsxs("div", { className:
|
|
2993
|
+
: "text-xs text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md border border-border hover:bg-accent", children: "Refresh chat" })] })] })) : missingApiKey && messages.length === 0 ? (_jsx("div", { className: "flex flex-col items-center justify-center h-full px-2", children: _jsx(BuilderSetupCard, { onConnected: handleBuilderConnected, bouncePulse: missingKeyBouncePulse }) })) : 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" })] })] })) : messages.length === 0 && !isReconnecting ? (_jsxs("div", { className: cn("agent-empty-state", emptyStateDisplay === "hidden"
|
|
2994
|
+
? "sr-only"
|
|
2995
|
+
: "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: "text-sm text-muted-foreground text-center max-w-[240px]", 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: () => {
|
|
2952
2996
|
threadRuntime.append({
|
|
2953
2997
|
role: "user",
|
|
2954
2998
|
content: [{ type: "text", text: suggestion }],
|
|
@@ -2959,15 +3003,15 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2959
3003
|
} }) }), missingApiKey && (_jsx(BuilderSetupCard, { onConnected: handleBuilderConnected, bouncePulse: missingKeyBouncePulse })), visibleLoopLimit && !showRunningInUI && (_jsx(LoopLimitContinueCard, { info: visibleLoopLimit, onContinue: () => {
|
|
2960
3004
|
setShowContinue(false);
|
|
2961
3005
|
setLoopLimitInfo(null);
|
|
2962
|
-
addToQueue("Continue from where you left off.");
|
|
3006
|
+
addToQueue("Continue from where you left off.", undefined, undefined, undefined, undefined, "queued", "continue");
|
|
2963
3007
|
} })), shouldShowRunError && visibleRunError && (_jsx(RunErrorRecoveryCard, { info: visibleRunError, onContinue: () => {
|
|
2964
3008
|
setRunErrorInfo(null);
|
|
2965
|
-
addToQueue("Continue from where you stopped. Use the partial work above, verify what succeeded, and finish the original request. Do not rerun the exact same failed tool input unless the failure was transient or the user explicitly asked for an exact rerun. Prefer dedicated app actions over raw database edits when they exist.");
|
|
3009
|
+
addToQueue("Continue from where you stopped. Use the partial work above, verify what succeeded, and finish the original request. Do not rerun the exact same failed tool input unless the failure was transient or the user explicitly asked for an exact rerun. Prefer dedicated app actions over raw database edits when they exist.", undefined, undefined, undefined, undefined, "queued", "continue");
|
|
2966
3010
|
}, onRetry: () => {
|
|
2967
3011
|
setRunErrorInfo(null);
|
|
2968
3012
|
addToQueue(lastUserText
|
|
2969
3013
|
? `Retry the previous request from a clean approach. Do not rerun the exact same failed tool input unless the failure was transient or the user explicitly asked for an exact rerun. If a provider query failed because of schema, syntax, or type mismatch, diagnose the error and adjust the query first.\n\nOriginal request:\n\n${lastUserText}`
|
|
2970
|
-
: "Retry the previous request from a clean approach. Do not rerun the exact same failed tool input unless the failure was transient or the user explicitly asked for an exact rerun. If a provider query failed because of schema, syntax, or type mismatch, diagnose the error and adjust the query first.");
|
|
3014
|
+
: "Retry the previous request from a clean approach. Do not rerun the exact same failed tool input unless the failure was transient or the user explicitly asked for an exact rerun. If a provider query failed because of schema, syntax, or type mismatch, diagnose the error and adjust the query first.", undefined, undefined, undefined, undefined, "queued", "retry");
|
|
2971
3015
|
}, onFork: onForkChat, onDismiss: () => {
|
|
2972
3016
|
if (visibleRunErrorKey) {
|
|
2973
3017
|
setDismissedRunErrorKey(visibleRunErrorKey);
|
|
@@ -2981,7 +3025,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2981
3025
|
.replace(/<context>[\s\S]*?<\/context>\n?/g, "")
|
|
2982
3026
|
.trim();
|
|
2983
3027
|
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));
|
|
2984
|
-
})] })) }), 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
|
|
3028
|
+
})] })) }), 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, { layoutVariant: composerLayoutVariant, className: cn(composerAreaClassName, missingApiKey && "cursor-pointer", isComposerDisabled && "opacity-70"), onClick: missingApiKey
|
|
2985
3029
|
? () => setMissingKeyBouncePulse((p) => p + 1)
|
|
2986
3030
|
: undefined, children: [_jsx(ComposerAttachmentPreviewStrip, {}), _jsx(TiptapComposer, { focusRef: tiptapRef, disabled: isComposerDisabled, placeholder: missingApiKey
|
|
2987
3031
|
? "Connect an AI engine above to start chatting…"
|
|
@@ -2992,9 +3036,9 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2992
3036
|
? queuedMessages.length > 0
|
|
2993
3037
|
? `${queuedMessages.length} queued — send a follow-up...`
|
|
2994
3038
|
: "Send a follow-up..."
|
|
2995
|
-
:
|
|
3039
|
+
: composerPlaceholder, onSubmit: isRunning
|
|
2996
3040
|
? (text, references, attachments, options) => void addToQueue(text, undefined, references.length > 0 ? references : undefined, attachments, undefined, options?.intent ?? "immediate")
|
|
2997
|
-
: 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: () => {
|
|
3041
|
+
: 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, layoutVariant: composerLayoutVariant, 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: () => {
|
|
2998
3042
|
// Nuclear stop: flip forceStopped so isRunning is false
|
|
2999
3043
|
// immediately. This unblocks submission even if the
|
|
3000
3044
|
// runtime or reconnect state is stuck.
|