@agent-native/core 0.35.3 → 0.37.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/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +249 -11
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +25 -25
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +32 -15
- 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 +68 -24
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/composer/ComposerPlusMenu.d.ts.map +1 -1
- package/dist/client/composer/ComposerPlusMenu.js +174 -8
- package/dist/client/composer/ComposerPlusMenu.js.map +1 -1
- package/dist/client/composer/PromptComposer.d.ts +2 -0
- package/dist/client/composer/PromptComposer.d.ts.map +1 -1
- package/dist/client/composer/PromptComposer.js +2 -2
- package/dist/client/composer/PromptComposer.js.map +1 -1
- package/dist/client/composer/TiptapComposer.js +1 -1
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/context-xray/ContextMeter.d.ts +2 -1
- package/dist/client/context-xray/ContextMeter.d.ts.map +1 -1
- package/dist/client/context-xray/ContextMeter.js +19 -25
- package/dist/client/context-xray/ContextMeter.js.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.d.ts +1 -3
- package/dist/client/context-xray/ContextXRayPanel.d.ts.map +1 -1
- package/dist/client/context-xray/ContextXRayPanel.js +27 -24
- package/dist/client/context-xray/ContextXRayPanel.js.map +1 -1
- package/dist/client/conversation/AgentConversation.d.ts.map +1 -1
- package/dist/client/conversation/AgentConversation.js +2 -1
- package/dist/client/conversation/AgentConversation.js.map +1 -1
- package/dist/client/dynamic-suggestions.d.ts +13 -7
- package/dist/client/dynamic-suggestions.d.ts.map +1 -1
- package/dist/client/dynamic-suggestions.js +23 -12
- package/dist/client/dynamic-suggestions.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/route-state.d.ts +116 -0
- package/dist/client/route-state.d.ts.map +1 -0
- package/dist/client/route-state.js +205 -0
- package/dist/client/route-state.js.map +1 -0
- package/dist/client/sse-event-processor.d.ts +1 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +62 -15
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/client/tool-display.d.ts +4 -0
- package/dist/client/tool-display.d.ts.map +1 -0
- package/dist/client/tool-display.js +28 -0
- package/dist/client/tool-display.js.map +1 -0
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +40 -31
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/client/use-external-value.d.ts.map +1 -1
- package/dist/client/use-external-value.js +14 -7
- package/dist/client/use-external-value.js.map +1 -1
- package/dist/extensions/html-shell.d.ts +3 -2
- package/dist/extensions/html-shell.d.ts.map +1 -1
- package/dist/extensions/html-shell.js +12 -2
- package/dist/extensions/html-shell.js.map +1 -1
- package/dist/extensions/routes.js +2 -7
- package/dist/extensions/routes.js.map +1 -1
- package/dist/server/core-routes-plugin.js +2 -2
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/security-headers.d.ts +16 -19
- package/dist/server/security-headers.d.ts.map +1 -1
- package/dist/server/security-headers.js +24 -25
- package/dist/server/security-headers.js.map +1 -1
- package/dist/templates/default/AGENTS.md +7 -1
- package/dist/templates/default/app/hooks/use-navigation-state.ts +10 -76
- package/docs/content/context-awareness.md +90 -48
- package/docs/content/creating-templates.md +22 -1
- package/docs/content/external-agents.md +1 -1
- package/package.json +2 -1
- package/src/templates/default/AGENTS.md +7 -1
- package/src/templates/default/app/hooks/use-navigation-state.ts +10 -76
|
@@ -6,7 +6,7 @@ import ReactMarkdown, { defaultUrlTransform } from "react-markdown";
|
|
|
6
6
|
import remarkGfm from "remark-gfm";
|
|
7
7
|
import { createAgentChatAdapter, } from "./agent-chat-adapter.js";
|
|
8
8
|
import { appendAgentChatContextToMessage, formatAgentChatContextItemsForPrompt, normalizeAgentChatContextItem, publishAgentChatContextItems, refreshAgentChatContext, } from "./agent-chat.js";
|
|
9
|
-
import {
|
|
9
|
+
import { useAgentDynamicSuggestionsResult, } from "./dynamic-suggestions.js";
|
|
10
10
|
import { initialSmoothStreamingGraphemeCount, SMOOTH_STREAMING_COMMIT_INTERVAL_MS, smoothStreamingPunctuationDelayMs, smoothStreamingRevealCount, splitStreamingTextGraphemes, } from "../shared/streaming-text-smoothing.js";
|
|
11
11
|
import { getActiveRun } from "./active-run-state.js";
|
|
12
12
|
import { AgentAutoContinueSignal, readSSEStreamRaw, } from "./sse-event-processor.js";
|
|
@@ -19,6 +19,7 @@ import { TextAttachmentAdapter } from "./composer/attachment-accept.js";
|
|
|
19
19
|
import { AgentTaskCard } from "./AgentTaskCard.js";
|
|
20
20
|
import { ConnectBuilderCard } from "./ConnectBuilderCard.js";
|
|
21
21
|
import { McpAppRenderer } from "./mcp-apps/McpAppRenderer.js";
|
|
22
|
+
import { humanizeToolLabelText, humanizeToolName } from "./tool-display.js";
|
|
22
23
|
import { useBuilderConnectFlow } from "./settings/useBuilderStatus.js";
|
|
23
24
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "./components/ui/tooltip.js";
|
|
24
25
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "./components/ui/dropdown-menu.js";
|
|
@@ -114,7 +115,7 @@ function getFileDataURL(file) {
|
|
|
114
115
|
// images on the client before we ever serialize them.
|
|
115
116
|
const MAX_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
116
117
|
const MAX_IMAGE_DIMENSION = 2048;
|
|
117
|
-
const SHOW_AGENT_ACTIVITY_STEPS =
|
|
118
|
+
const SHOW_AGENT_ACTIVITY_STEPS = true;
|
|
118
119
|
function loadImage(url) {
|
|
119
120
|
return new Promise((resolve, reject) => {
|
|
120
121
|
const img = new Image();
|
|
@@ -867,9 +868,9 @@ function useSmoothStreamingText(targetText, streaming, resetKey) {
|
|
|
867
868
|
}
|
|
868
869
|
const visibleNoLongerMatchesTarget = visibleTextRef.current.length > 0 &&
|
|
869
870
|
!targetText.startsWith(visibleTextRef.current);
|
|
870
|
-
if (
|
|
871
|
-
|
|
872
|
-
|
|
871
|
+
if (visibleNoLongerMatchesTarget ||
|
|
872
|
+
visibleCountRef.current > targetGraphemes.length ||
|
|
873
|
+
(keyChanged && visibleTextRef.current.length === 0)) {
|
|
873
874
|
commitVisibleCount(initialSmoothStreamingGraphemeCount(targetGraphemes));
|
|
874
875
|
lastCommitAtRef.current = 0;
|
|
875
876
|
pauseUntilRef.current = 0;
|
|
@@ -963,15 +964,6 @@ function stringifyToolValue(value, pretty = false) {
|
|
|
963
964
|
return String(value ?? "");
|
|
964
965
|
}
|
|
965
966
|
}
|
|
966
|
-
function toolArgsPreview(args) {
|
|
967
|
-
return Object.entries(args)
|
|
968
|
-
.map(([key, value]) => {
|
|
969
|
-
const singleLine = stringifyToolValue(value).replace(/\s+/g, " ").trim();
|
|
970
|
-
const preview = singleLine.length > 96 ? `${singleLine.slice(0, 96)}...` : singleLine;
|
|
971
|
-
return `${key}=${preview}`;
|
|
972
|
-
})
|
|
973
|
-
.join(", ");
|
|
974
|
-
}
|
|
975
967
|
function looksLikeSql(text) {
|
|
976
968
|
return /^\s*(select|with|insert|update|delete|merge|create|alter|drop|explain|declare|begin)\b/i.test(text);
|
|
977
969
|
}
|
|
@@ -1195,7 +1187,6 @@ function ToolCallDisplay({ toolName, argsText, args, result, mcpApp, isRunning,
|
|
|
1195
1187
|
// Fall through to default pill rendering
|
|
1196
1188
|
}
|
|
1197
1189
|
}
|
|
1198
|
-
const argsStr = isAgentCall ? "" : toolArgsPreview(args);
|
|
1199
1190
|
const inputPayload = hasArgs ? toolInputPayload(toolName, args) : null;
|
|
1200
1191
|
const resultPayload = toolResultPayload(result);
|
|
1201
1192
|
const displayName = isAgentCall
|
|
@@ -1204,14 +1195,14 @@ function ToolCallDisplay({ toolName, argsText, args, result, mcpApp, isRunning,
|
|
|
1204
1195
|
: isAgentError
|
|
1205
1196
|
? `Error asking ${agentName}`
|
|
1206
1197
|
: `Asked ${agentName}`
|
|
1207
|
-
: toolName;
|
|
1198
|
+
: humanizeToolName(toolName);
|
|
1208
1199
|
const canExpand = isAgentCall
|
|
1209
1200
|
? hasStreamText
|
|
1210
1201
|
: hasArgs || result !== undefined;
|
|
1211
1202
|
const isExpanded = isAgentCall ? hasStreamText && expanded : expanded;
|
|
1212
1203
|
return (_jsxs("div", { className: "my-1 overflow-hidden", children: [mcpApp && _jsx(McpAppRenderer, { app: mcpApp, className: "mb-1.5" }), _jsxs("button", { onClick: () => canExpand && setExpanded(!isExpanded), "aria-expanded": canExpand ? isExpanded : undefined, className: cn("flex items-center gap-2 rounded-md px-2.5 py-1.5 text-xs font-mono w-full text-left overflow-hidden", isRunning
|
|
1213
1204
|
? "bg-muted text-muted-foreground"
|
|
1214
|
-
: "bg-muted text-muted-foreground hover:bg-accent"), children: [_jsx("span", { className: "shrink-0", children: isRunning ? (_jsx(IconLoader2, { className: "h-3 w-3 animate-spin" })) : isAgentError ? (_jsx(IconCircleX, { className: "h-3 w-3 text-destructive" })) : result !== undefined ? (_jsx(IconCheck, { className: "h-3 w-3 text-emerald-500" })) : (_jsx(IconSquareFilled, { className: "h-3 w-3 text-muted-foreground" })) }),
|
|
1205
|
+
: "bg-muted text-muted-foreground hover:bg-accent"), children: [_jsx("span", { className: "shrink-0", children: isRunning ? (_jsx(IconLoader2, { className: "h-3 w-3 animate-spin" })) : isAgentError ? (_jsx(IconCircleX, { className: "h-3 w-3 text-destructive" })) : result !== undefined ? (_jsx(IconCheck, { className: "h-3 w-3 text-emerald-500" })) : (_jsx(IconSquareFilled, { className: "h-3 w-3 text-muted-foreground" })) }), _jsx("span", { className: "truncate min-w-0", children: _jsx("span", { className: "font-medium", children: displayName }) }), canExpand && (_jsx(IconChevronDown, { className: cn("ml-auto h-3 w-3 shrink-0 opacity-40", isExpanded && "rotate-180") }))] }), isExpanded && isAgentCall && hasStreamText && (_jsx("div", { ref: streamRef, className: "mt-1 rounded-md bg-muted/50 px-3 py-2 text-xs text-muted-foreground break-words max-h-48 overflow-y-auto agent-markdown prose prose-sm prose-invert max-w-none", children: _jsx(ReactMarkdown, { remarkPlugins: [remarkGfm], components: markdownComponents, urlTransform: markdownUrlTransform, children: agentStreamText }) })), isExpanded && !isAgentCall && (hasArgs || result !== undefined) && (_jsxs("div", { className: "mt-1 space-y-2 rounded-md bg-muted/50 px-3 py-2 text-xs text-muted-foreground", children: [inputPayload && _jsx(ToolDetailViewer, { payload: inputPayload }), resultPayload && _jsx(ToolDetailViewer, { payload: resultPayload })] }))] }));
|
|
1215
1206
|
}
|
|
1216
1207
|
function ToolCallFallback({ toolName, args, argsText, result, ...rest }) {
|
|
1217
1208
|
const chatRunning = React.useContext(ChatRunningContext);
|
|
@@ -1958,13 +1949,16 @@ function ensureMessageMetadata(repo) {
|
|
|
1958
1949
|
// Re-export for backwards compatibility
|
|
1959
1950
|
import { extractThreadMeta, normalizeThreadRepository, } from "../agent/thread-data-builder.js";
|
|
1960
1951
|
export { extractThreadMeta };
|
|
1952
|
+
function EmptyStateSuggestionSkeleton() {
|
|
1953
|
+
return (_jsxs("div", { className: "flex w-full max-w-[280px] flex-col gap-1.5", "aria-hidden": "true", children: [_jsx("div", { className: "h-12 w-full rounded-lg border border-border bg-muted/60 animate-pulse" }), _jsx("div", { className: "h-12 w-full rounded-lg border border-border bg-muted/60 animate-pulse" }), _jsx("div", { className: "h-12 w-full rounded-lg border border-border bg-muted/60 animate-pulse" })] }));
|
|
1954
|
+
}
|
|
1961
1955
|
const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateText, suggestions, dynamicSuggestions, emptyStateAddon, showHeader = true, onSwitchToCli, className, apiUrl, tabId, browserTabId, threadId, contextScope, isActiveComposer = true, 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, externalStreaming = false, }, ref) {
|
|
1962
1956
|
const thread = useThread();
|
|
1963
1957
|
const threadRuntime = useThreadRuntime();
|
|
1964
1958
|
const composerRuntime = useComposerRuntime();
|
|
1965
1959
|
const isRuntimeRunning = thread.isRunning;
|
|
1966
1960
|
const messages = thread.messages;
|
|
1967
|
-
const resolvedSuggestions =
|
|
1961
|
+
const { suggestions: resolvedSuggestions, isLoading: suggestionsLoading } = useAgentDynamicSuggestionsResult({
|
|
1968
1962
|
staticSuggestions: suggestions,
|
|
1969
1963
|
dynamicSuggestions,
|
|
1970
1964
|
browserTabId,
|
|
@@ -2837,16 +2831,17 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
2837
2831
|
detail.label.trim()) {
|
|
2838
2832
|
const label = detail.label.trim();
|
|
2839
2833
|
const tool = detail.tool?.trim() || undefined;
|
|
2840
|
-
|
|
2834
|
+
const displayLabel = humanizeToolLabelText(label, tool);
|
|
2835
|
+
setActivityLabel(displayLabel);
|
|
2841
2836
|
setActivitySteps((prev) => {
|
|
2842
2837
|
const last = prev[prev.length - 1];
|
|
2843
|
-
if (last?.label ===
|
|
2838
|
+
if (last?.label === displayLabel && last.tool === tool)
|
|
2844
2839
|
return prev;
|
|
2845
2840
|
return [
|
|
2846
2841
|
...prev,
|
|
2847
2842
|
{
|
|
2848
2843
|
id: `${Date.now()}-${++activityStepIdCounter.current}`,
|
|
2849
|
-
label,
|
|
2844
|
+
label: displayLabel,
|
|
2850
2845
|
...(tool ? { tool } : {}),
|
|
2851
2846
|
},
|
|
2852
2847
|
].slice(-6);
|
|
@@ -3188,6 +3183,8 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
3188
3183
|
!isComposerDisabled &&
|
|
3189
3184
|
!showRunningInUI;
|
|
3190
3185
|
const canImplementPlan = showPlanModeCallout && latestAssistantWasPlan;
|
|
3186
|
+
const contextXRayEnabled = Boolean(threadId &&
|
|
3187
|
+
(messages.length > 0 || isReconnecting || reconnectContent.length > 0));
|
|
3191
3188
|
const handleImplementPlan = useCallback(() => {
|
|
3192
3189
|
onExecModeChange?.("build");
|
|
3193
3190
|
void addToQueue("Implement the plan.", undefined, undefined, undefined, "act");
|
|
@@ -3254,12 +3251,13 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
3254
3251
|
? "text-xs text-background bg-foreground hover:opacity-90 px-3 py-1.5 rounded-md"
|
|
3255
3252
|
: "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"
|
|
3256
3253
|
? "sr-only"
|
|
3257
|
-
: "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: "
|
|
3254
|
+
: "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, suggestionsLoading ? (_jsx(EmptyStateSuggestionSkeleton, {})) : resolvedSuggestions &&
|
|
3255
|
+
resolvedSuggestions.length > 0 ? (_jsx("div", { className: "flex flex-col gap-1.5 w-full max-w-[280px]", children: resolvedSuggestions.map((suggestion) => (_jsx("button", { onClick: () => {
|
|
3258
3256
|
threadRuntime.append({
|
|
3259
3257
|
role: "user",
|
|
3260
3258
|
content: [{ type: "text", text: suggestion }],
|
|
3261
3259
|
});
|
|
3262
|
-
}, 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))) }))] })) : (_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: {
|
|
3260
|
+
}, 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: {
|
|
3263
3261
|
UserMessage,
|
|
3264
3262
|
AssistantMessage,
|
|
3265
3263
|
} }) }), missingApiKey && (_jsx(BuilderSetupCard, { onConnected: handleBuilderConnected, bouncePulse: missingKeyBouncePulse })), visibleLoopLimit && !showRunningInUI && (_jsx(LoopLimitContinueCard, { info: visibleLoopLimit, onContinue: () => {
|
|
@@ -3297,7 +3295,7 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
3297
3295
|
? "Reconnecting"
|
|
3298
3296
|
: SHOW_AGENT_ACTIVITY_STEPS
|
|
3299
3297
|
? (activityLabel ?? "Thinking")
|
|
3300
|
-
: "Thinking" })),
|
|
3298
|
+
: "Thinking" })), _jsxs(AgentComposerFrame, { layoutVariant: composerLayoutVariant, className: cn(composerAreaClassName, missingApiKey && "cursor-pointer", isComposerDisabled && "opacity-70"), onClick: missingApiKey
|
|
3301
3299
|
? () => setMissingKeyBouncePulse((p) => p + 1)
|
|
3302
3300
|
: undefined, children: [_jsx(ComposerAttachmentPreviewStrip, {}), _jsx(TiptapComposer, { focusRef: tiptapRef, disabled: isComposerDisabled, placeholder: missingApiKey
|
|
3303
3301
|
? "Connect an AI engine above to start chatting…"
|
|
@@ -3310,7 +3308,9 @@ const AssistantChatInner = forwardRef(function AssistantChatInner({ emptyStateTe
|
|
|
3310
3308
|
: "Send a follow-up..."
|
|
3311
3309
|
: composerPlaceholder, onSubmit: isRunning || composerContextItems.length > 0
|
|
3312
3310
|
? (text, references, attachments, options) => void addToQueue(text, undefined, references.length > 0 ? references : undefined, attachments, undefined, options?.intent ?? "immediate", undefined, true)
|
|
3313
|
-
: 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, extraActionButton:
|
|
3311
|
+
: 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, extraActionButton: contextXRayEnabled ||
|
|
3312
|
+
composerExtraActionButton ||
|
|
3313
|
+
showRunningInUI ? (_jsxs(_Fragment, { children: [contextXRayEnabled && (_jsx(ContextMeter, { threadId: threadId })), composerExtraActionButton, showRunningInUI && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: () => {
|
|
3314
3314
|
// Nuclear stop: flip forceStopped so isRunning is false
|
|
3315
3315
|
// immediately. This unblocks submission even if the
|
|
3316
3316
|
// runtime or reconnect state is stuck.
|