@agent-native/core 0.128.3 → 0.129.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/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +91 -0
- package/corpus/core/docs/content/template-design-collaboration-and-full-apps.mdx +3 -1
- package/corpus/core/package.json +6 -3
- package/corpus/core/src/a2a/client.ts +18 -4
- package/corpus/core/src/a2a/server.ts +19 -3
- package/corpus/core/src/a2a/types.ts +7 -0
- package/corpus/core/src/action.ts +43 -16
- package/corpus/core/src/agent/engine/ai-sdk-engine.ts +14 -10
- package/corpus/core/src/agent/production-agent.ts +41 -3
- package/corpus/core/src/agent/thread-data-builder.ts +5 -0
- package/corpus/core/src/chat-threads/migrations.ts +53 -0
- package/corpus/core/src/cli/create.ts +4 -0
- package/corpus/core/src/cli/skills-content/design-visual-edit-skill.ts +36 -16
- package/corpus/core/src/cli/skills.ts +16 -0
- package/corpus/core/src/client/AgentPanel.tsx +9 -5
- package/corpus/core/src/client/AssistantChat.tsx +138 -46
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +16 -10
- package/corpus/core/src/client/agent-chat-adapter.ts +21 -3
- package/corpus/core/src/client/analytics.ts +159 -102
- package/corpus/core/src/client/chat/legacy-chart-shorthand.tsx +479 -0
- package/corpus/core/src/client/chat/markdown-renderer.tsx +23 -3
- package/corpus/core/src/client/chat/message-components.tsx +12 -5
- package/corpus/core/src/client/chat/runtime.ts +2 -1
- package/corpus/core/src/client/chat/tool-call-display.tsx +25 -2
- package/corpus/core/src/client/chat-model-groups.ts +3 -0
- package/corpus/core/src/client/client-status-requests.ts +161 -0
- package/corpus/core/src/client/settings/VoiceTranscriptionSection.tsx +2 -2
- package/corpus/core/src/client/sse-event-processor.ts +15 -3
- package/corpus/core/src/client/use-agent-engine-configured.ts +54 -50
- package/corpus/core/src/client/use-chat-models.ts +16 -11
- package/corpus/core/src/client/use-chat-threads.ts +32 -9
- package/corpus/core/src/client/use-session.ts +4 -5
- package/corpus/core/src/db/client.ts +83 -8
- package/corpus/core/src/db/ensure-additive-columns.ts +31 -20
- package/corpus/core/src/db/migrations.ts +22 -2
- package/corpus/core/src/extensions/actions.ts +1 -1
- package/corpus/core/src/mcp/approval-store.ts +99 -0
- package/corpus/core/src/mcp/build-server.ts +579 -303
- package/corpus/core/src/mcp/embed-app.ts +1 -1
- package/corpus/core/src/mcp/oauth-client-metadata.ts +380 -0
- package/corpus/core/src/mcp/oauth-route.ts +57 -52
- package/corpus/core/src/mcp/screen-memory-stdio.ts +400 -378
- package/corpus/core/src/mcp/server.ts +29 -145
- package/corpus/core/src/mcp/stdio.ts +72 -80
- package/corpus/core/src/mcp-client/manager.ts +6 -10
- package/corpus/core/src/mcp-client/oauth-client.ts +127 -36
- package/corpus/core/src/mcp-client/oauth-routes.ts +16 -6
- package/corpus/core/src/mcp-client/routes.ts +6 -5
- package/corpus/core/src/server/agent-capabilities.ts +20 -0
- package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +27 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +18 -0
- package/corpus/core/src/server/transcribe-voice.ts +14 -5
- package/corpus/core/src/templates/default/.agents/skills/security/SKILL.md +13 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +5 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +18 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +12 -0
- package/corpus/templates/analytics/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/analytics/actions/generate-chart.ts +2 -2
- package/corpus/templates/analytics/app/components/dashboard/DashboardPanelSkeleton.tsx +1 -10
- package/corpus/templates/analytics/app/global.css +0 -31
- package/corpus/templates/analytics/app/lib/sql-query.ts +46 -20
- package/corpus/templates/analytics/changelog/2026-07-28-analytics-dashboard-loading-states-now-use-a-simpler-standar.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-28-analytics-dashboards-now-load-first-party-charts-reliably-in.md +6 -0
- package/corpus/templates/analytics/server/lib/first-party-analytics-cache.ts +42 -16
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +4 -2
- package/corpus/templates/analytics/shared/sql-query-limits.ts +1 -0
- package/corpus/templates/assets/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/brain/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/calendar/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/chat/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/clips/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/clips/app/components/player/player-controls.tsx +3 -6
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +6 -2
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +3 -1
- package/corpus/templates/clips/changelog/2026-07-28-copied-share-links-no-longer-leave-an-unnecessary-confirmati.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-28-playback-skip-controls-no-longer-show-overlapping-numbers.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-28-public-clips-share-buttons-now-use-a-clean-text-only-label.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +14 -17
- package/corpus/templates/clips/desktop/src/overlays/live-audio-bars.tsx +3 -1
- package/corpus/templates/clips/desktop/src/styles.css +13 -10
- package/corpus/templates/clips/desktop/src-tauri/src/recording_indicator.rs +2 -2
- package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +36 -0
- package/corpus/templates/content/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/content/actions/_builder-cms-read-client.ts +155 -34
- package/corpus/templates/content/actions/_builder-docs-client.ts +151 -30
- package/corpus/templates/content/actions/stage-builder-source-bulk-update.ts +5 -2
- package/corpus/templates/content/app/root.tsx +35 -14
- package/corpus/templates/content/changelog/2026-07-28-builder-backed-files-media-fields-now-accept-direct-file-url.md +6 -0
- package/corpus/templates/content/changelog/2026-07-28-builder-content-reads-now-negotiate-the-newest-mcp-protocol-.md +6 -0
- package/corpus/templates/content/changelog/2026-07-28-public-content-pages-load-faster-before-the-optional-ask-sid.md +6 -0
- package/corpus/templates/design/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +36 -16
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +42 -3
- package/corpus/templates/design/actions/open-visual-edit.ts +2 -1
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +2 -2
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +14 -15
- package/corpus/templates/design/app/components/design/ResponsiveInteractBar.tsx +314 -0
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +88 -3
- package/corpus/templates/design/app/components/design/keyboard-shortcuts.ts +1 -1
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +7 -6
- package/corpus/templates/design/app/i18n-data.ts +56 -11
- package/corpus/templates/design/app/i18n-responsive-interact.ts +183 -0
- package/corpus/templates/design/app/lib/agent-chat.ts +60 -0
- package/corpus/templates/design/app/pages/design-editor/responsive-interact.ts +89 -0
- package/corpus/templates/design/changelog/2026-07-28-design-edits-can-be-applied-through-the-host-coding-agent-fr.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-interact-mode-can-preview-designs-in-responsive-device-sizes.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-interact-mode-now-opens-a-full-screen-responsive-preview-wit.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-show-or-hide-design-editing-chrome-with-cmd-on-apple-devices.md +2 -2
- package/corpus/templates/design/changelog/2026-07-28-visual-edit-now-always-shows-the-live-running-app-in-the-can.md +6 -0
- package/corpus/templates/dispatch/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/forms/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/macros/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/mail/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/plan/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/slides/.agents/skills/security/SKILL.md +13 -2
- package/corpus/templates/tasks/.agents/skills/security/SKILL.md +13 -2
- package/corpus/toolkit/CHANGELOG.md +13 -0
- package/corpus/toolkit/package.json +1 -1
- package/corpus/toolkit/src/chat-history.css +1 -2
- package/corpus/toolkit/src/composer/TiptapComposer.tsx +45 -0
- package/dist/a2a/client.d.ts +7 -0
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +8 -3
- package/dist/a2a/client.js.map +1 -1
- package/dist/a2a/server.d.ts.map +1 -1
- package/dist/a2a/server.js +18 -3
- package/dist/a2a/server.js.map +1 -1
- package/dist/a2a/types.d.ts +7 -0
- package/dist/a2a/types.d.ts.map +1 -1
- package/dist/a2a/types.js.map +1 -1
- package/dist/action.d.ts +15 -1
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +39 -16
- package/dist/action.js.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
- package/dist/agent/engine/ai-sdk-engine.js +14 -10
- package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +35 -7
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts +2 -0
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +3 -0
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/chat-threads/migrations.d.ts +21 -0
- package/dist/chat-threads/migrations.d.ts.map +1 -0
- package/dist/chat-threads/migrations.js +45 -0
- package/dist/chat-threads/migrations.js.map +1 -0
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +4 -0
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.js +36 -16
- package/dist/cli/skills-content/design-visual-edit-skill.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +15 -0
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +6 -5
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +37 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +41 -8
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +11 -10
- 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 +19 -3
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +150 -101
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/chat/legacy-chart-shorthand.d.ts +29 -0
- package/dist/client/chat/legacy-chart-shorthand.d.ts.map +1 -0
- package/dist/client/chat/legacy-chart-shorthand.js +330 -0
- package/dist/client/chat/legacy-chart-shorthand.js.map +1 -0
- package/dist/client/chat/markdown-renderer.d.ts.map +1 -1
- package/dist/client/chat/markdown-renderer.js +8 -2
- package/dist/client/chat/markdown-renderer.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +2 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +11 -4
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/runtime.d.ts.map +1 -1
- package/dist/client/chat/runtime.js +2 -1
- package/dist/client/chat/runtime.js.map +1 -1
- 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 +14 -8
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/chat-model-groups.d.ts.map +1 -1
- package/dist/client/chat-model-groups.js +3 -0
- package/dist/client/chat-model-groups.js.map +1 -1
- package/dist/client/client-status-requests.d.ts +14 -0
- package/dist/client/client-status-requests.d.ts.map +1 -0
- package/dist/client/client-status-requests.js +126 -0
- package/dist/client/client-status-requests.js.map +1 -0
- package/dist/client/settings/VoiceTranscriptionSection.js +1 -1
- package/dist/client/settings/VoiceTranscriptionSection.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts +7 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +8 -3
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
- package/dist/client/use-agent-engine-configured.js +29 -43
- package/dist/client/use-agent-engine-configured.js.map +1 -1
- package/dist/client/use-chat-models.d.ts.map +1 -1
- package/dist/client/use-chat-models.js +11 -11
- package/dist/client/use-chat-models.js.map +1 -1
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +23 -7
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/client/use-session.d.ts.map +1 -1
- package/dist/client/use-session.js +4 -4
- package/dist/client/use-session.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +48 -4
- package/dist/db/client.js.map +1 -1
- package/dist/db/ensure-additive-columns.d.ts.map +1 -1
- package/dist/db/ensure-additive-columns.js +32 -21
- package/dist/db/ensure-additive-columns.js.map +1 -1
- package/dist/db/migrations.d.ts +9 -0
- package/dist/db/migrations.d.ts.map +1 -1
- package/dist/db/migrations.js +14 -3
- package/dist/db/migrations.js.map +1 -1
- package/dist/extensions/actions.js +1 -1
- package/dist/extensions/actions.js.map +1 -1
- package/dist/mcp/approval-store.d.ts +16 -0
- package/dist/mcp/approval-store.d.ts.map +1 -0
- package/dist/mcp/approval-store.js +85 -0
- package/dist/mcp/approval-store.js.map +1 -0
- package/dist/mcp/build-server.d.ts +1 -34
- package/dist/mcp/build-server.d.ts.map +1 -1
- package/dist/mcp/build-server.js +220 -23
- package/dist/mcp/build-server.js.map +1 -1
- package/dist/mcp/embed-app.js +1 -1
- package/dist/mcp/embed-app.js.map +1 -1
- package/dist/mcp/oauth-client-metadata.d.ts +15 -0
- package/dist/mcp/oauth-client-metadata.d.ts.map +1 -0
- package/dist/mcp/oauth-client-metadata.js +297 -0
- package/dist/mcp/oauth-client-metadata.js.map +1 -0
- package/dist/mcp/oauth-route.d.ts.map +1 -1
- package/dist/mcp/oauth-route.js +39 -53
- package/dist/mcp/oauth-route.js.map +1 -1
- package/dist/mcp/screen-memory-stdio.d.ts.map +1 -1
- package/dist/mcp/screen-memory-stdio.js +304 -296
- package/dist/mcp/screen-memory-stdio.js.map +1 -1
- package/dist/mcp/server.d.ts +12 -25
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +24 -133
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/stdio.d.ts.map +1 -1
- package/dist/mcp/stdio.js +36 -35
- package/dist/mcp/stdio.js.map +1 -1
- package/dist/mcp-client/manager.d.ts.map +1 -1
- package/dist/mcp-client/manager.js +6 -6
- package/dist/mcp-client/manager.js.map +1 -1
- package/dist/mcp-client/oauth-client.d.ts +13 -17
- package/dist/mcp-client/oauth-client.d.ts.map +1 -1
- package/dist/mcp-client/oauth-client.js +74 -16
- package/dist/mcp-client/oauth-client.js.map +1 -1
- package/dist/mcp-client/oauth-routes.d.ts +2 -2
- package/dist/mcp-client/oauth-routes.d.ts.map +1 -1
- package/dist/mcp-client/oauth-routes.js +16 -6
- package/dist/mcp-client/oauth-routes.js.map +1 -1
- package/dist/mcp-client/routes.js +5 -5
- package/dist/mcp-client/routes.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-capabilities.d.ts.map +1 -1
- package/dist/server/agent-capabilities.js +21 -0
- package/dist/server/agent-capabilities.js.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.d.ts +14 -0
- package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.js +16 -0
- package/dist/server/agent-chat/action-filters-a2a.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +11 -1
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/transcribe-voice.js +12 -6
- package/dist/server/transcribe-voice.js.map +1 -1
- package/dist/templates/chat/.agents/skills/security/SKILL.md +13 -2
- package/dist/templates/default/.agents/skills/security/SKILL.md +13 -2
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +5 -2
- package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +18 -0
- package/dist/templates/workspace-core/.agents/skills/security/SKILL.md +13 -2
- package/docs/content/template-design-collaboration-and-full-apps.mdx +3 -1
- package/package.json +7 -4
- package/src/a2a/client.ts +18 -4
- package/src/a2a/server.ts +19 -3
- package/src/a2a/types.ts +7 -0
- package/src/action.ts +43 -16
- package/src/agent/engine/ai-sdk-engine.ts +14 -10
- package/src/agent/production-agent.ts +41 -3
- package/src/agent/thread-data-builder.ts +5 -0
- package/src/chat-threads/migrations.ts +53 -0
- package/src/cli/create.ts +4 -0
- package/src/cli/skills-content/design-visual-edit-skill.ts +36 -16
- package/src/cli/skills.ts +16 -0
- package/src/client/AgentPanel.tsx +9 -5
- package/src/client/AssistantChat.tsx +138 -46
- package/src/client/MultiTabAssistantChat.tsx +16 -10
- package/src/client/agent-chat-adapter.ts +21 -3
- package/src/client/analytics.ts +159 -102
- package/src/client/chat/legacy-chart-shorthand.tsx +479 -0
- package/src/client/chat/markdown-renderer.tsx +23 -3
- package/src/client/chat/message-components.tsx +12 -5
- package/src/client/chat/runtime.ts +2 -1
- package/src/client/chat/tool-call-display.tsx +25 -2
- package/src/client/chat-model-groups.ts +3 -0
- package/src/client/client-status-requests.ts +161 -0
- package/src/client/settings/VoiceTranscriptionSection.tsx +2 -2
- package/src/client/sse-event-processor.ts +15 -3
- package/src/client/use-agent-engine-configured.ts +54 -50
- package/src/client/use-chat-models.ts +16 -11
- package/src/client/use-chat-threads.ts +32 -9
- package/src/client/use-session.ts +4 -5
- package/src/db/client.ts +83 -8
- package/src/db/ensure-additive-columns.ts +31 -20
- package/src/db/migrations.ts +22 -2
- package/src/extensions/actions.ts +1 -1
- package/src/mcp/approval-store.ts +99 -0
- package/src/mcp/build-server.ts +579 -303
- package/src/mcp/embed-app.ts +1 -1
- package/src/mcp/oauth-client-metadata.ts +380 -0
- package/src/mcp/oauth-route.ts +57 -52
- package/src/mcp/screen-memory-stdio.ts +400 -378
- package/src/mcp/server.ts +29 -145
- package/src/mcp/stdio.ts +72 -80
- package/src/mcp-client/manager.ts +6 -10
- package/src/mcp-client/oauth-client.ts +127 -36
- package/src/mcp-client/oauth-routes.ts +16 -6
- package/src/mcp-client/routes.ts +6 -5
- package/src/server/agent-capabilities.ts +20 -0
- package/src/server/agent-chat/action-filters-a2a.ts +27 -0
- package/src/server/agent-chat-plugin.ts +18 -0
- package/src/server/transcribe-voice.ts +14 -5
- package/src/templates/chat/.agents/skills/security/SKILL.md +13 -2
- package/src/templates/default/.agents/skills/security/SKILL.md +13 -2
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +5 -2
- package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +18 -0
- package/src/templates/workspace-core/.agents/skills/security/SKILL.md +13 -2
|
@@ -95,6 +95,7 @@ import {
|
|
|
95
95
|
AGENT_CHAT_VIEW_TRANSITION_CLASS,
|
|
96
96
|
getAgentChatViewTransitionStyle,
|
|
97
97
|
} from "./chat-view-transition.js";
|
|
98
|
+
import { fetchBuilderStatus } from "./client-status-requests.js";
|
|
98
99
|
import { RealtimeVoiceModeProvider } from "./composer/index.js";
|
|
99
100
|
import {
|
|
100
101
|
getFramePostMessageTargetOrigin,
|
|
@@ -481,13 +482,16 @@ function useBuilderConnectUrl() {
|
|
|
481
482
|
// global), refresh fired again, and we'd loop forever.
|
|
482
483
|
let lastConfigured = false;
|
|
483
484
|
const refresh = () => {
|
|
484
|
-
|
|
485
|
-
|
|
485
|
+
fetchBuilderStatus<{
|
|
486
|
+
cliAuthUrl?: string;
|
|
487
|
+
connectUrl?: string;
|
|
488
|
+
configured?: boolean;
|
|
489
|
+
}>()
|
|
490
|
+
.then((result) => (result.state === "available" ? result.value : null))
|
|
486
491
|
.then((data) => {
|
|
487
492
|
if (cancelled || !data) return;
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
}
|
|
493
|
+
const nextConnectUrl = data.cliAuthUrl || data.connectUrl;
|
|
494
|
+
if (nextConnectUrl) setConnectUrl(nextConnectUrl);
|
|
491
495
|
const nextConfigured = !!data.configured;
|
|
492
496
|
setConfigured(nextConfigured);
|
|
493
497
|
if (nextConfigured && !lastConfigured) {
|
|
@@ -24,6 +24,8 @@ import type {
|
|
|
24
24
|
} from "@assistant-ui/react";
|
|
25
25
|
import { CompositeAttachmentAdapter } from "@assistant-ui/react";
|
|
26
26
|
import {
|
|
27
|
+
IconArrowUp,
|
|
28
|
+
IconClock,
|
|
27
29
|
IconMessage,
|
|
28
30
|
IconX,
|
|
29
31
|
IconPlayerStopFilled,
|
|
@@ -223,7 +225,7 @@ export interface AssistantChatSendOptions {
|
|
|
223
225
|
submitMessageId?: string;
|
|
224
226
|
}
|
|
225
227
|
|
|
226
|
-
function createUserMessageRunConfig(
|
|
228
|
+
export function createUserMessageRunConfig(
|
|
227
229
|
references?: Reference[],
|
|
228
230
|
requestMode?: AgentRequestMode,
|
|
229
231
|
recoveryAction?: AgentRecoveryAction,
|
|
@@ -231,6 +233,11 @@ function createUserMessageRunConfig(
|
|
|
231
233
|
approvedToolCalls?: string[],
|
|
232
234
|
queuedMessageId?: string,
|
|
233
235
|
hideUserMessage?: boolean,
|
|
236
|
+
modelSnapshot?: {
|
|
237
|
+
model?: string;
|
|
238
|
+
engine?: string;
|
|
239
|
+
effort?: ReasoningEffort;
|
|
240
|
+
},
|
|
234
241
|
) {
|
|
235
242
|
const custom: {
|
|
236
243
|
references?: Reference[];
|
|
@@ -238,7 +245,13 @@ function createUserMessageRunConfig(
|
|
|
238
245
|
trackInRunsTray?: boolean;
|
|
239
246
|
agentNativeQueuedMessageId?: string;
|
|
240
247
|
approvedToolCalls?: string[];
|
|
248
|
+
model?: string;
|
|
249
|
+
engine?: string;
|
|
250
|
+
effort?: ReasoningEffort;
|
|
241
251
|
} = {};
|
|
252
|
+
if (modelSnapshot?.model) custom.model = modelSnapshot.model;
|
|
253
|
+
if (modelSnapshot?.engine) custom.engine = modelSnapshot.engine;
|
|
254
|
+
if (modelSnapshot?.effort) custom.effort = modelSnapshot.effort;
|
|
242
255
|
if (references && references.length > 0) {
|
|
243
256
|
custom.references = references;
|
|
244
257
|
}
|
|
@@ -1650,8 +1663,27 @@ type QueuedMessage = {
|
|
|
1650
1663
|
recoveryAction?: AgentRecoveryAction;
|
|
1651
1664
|
trackInRunsTray?: boolean;
|
|
1652
1665
|
hideUserMessage?: boolean;
|
|
1666
|
+
/**
|
|
1667
|
+
* Model/engine/effort snapshotted at enqueue time, for the same reason
|
|
1668
|
+
* `requestMode` is: the picker is global and live, so a queue that flushes
|
|
1669
|
+
* after the user switches models would otherwise silently run the message
|
|
1670
|
+
* under a model it was never composed for. Entries persisted before this
|
|
1671
|
+
* existed simply lack the fields and fall back to the live selection.
|
|
1672
|
+
*/
|
|
1673
|
+
model?: string;
|
|
1674
|
+
engine?: string;
|
|
1675
|
+
effort?: ReasoningEffort;
|
|
1653
1676
|
};
|
|
1654
1677
|
|
|
1678
|
+
export function hoistQueuedMessageToFront<T extends { id: string }>(
|
|
1679
|
+
messages: readonly T[],
|
|
1680
|
+
id: string,
|
|
1681
|
+
): T[] {
|
|
1682
|
+
const target = messages.find((message) => message.id === id);
|
|
1683
|
+
if (!target) return [...messages];
|
|
1684
|
+
return [target, ...messages.filter((message) => message.id !== id)];
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1655
1687
|
export function queuedMessageImageSources(
|
|
1656
1688
|
message: Pick<QueuedMessage, "attachments" | "images">,
|
|
1657
1689
|
): string[] {
|
|
@@ -2241,6 +2273,7 @@ const AssistantChatInner = forwardRef<
|
|
|
2241
2273
|
planModeDisabledReason,
|
|
2242
2274
|
selectedModel,
|
|
2243
2275
|
defaultModel,
|
|
2276
|
+
selectedEngine,
|
|
2244
2277
|
selectedEffort,
|
|
2245
2278
|
availableModels,
|
|
2246
2279
|
modelListLoading,
|
|
@@ -4170,6 +4203,11 @@ const AssistantChatInner = forwardRef<
|
|
|
4170
4203
|
undefined,
|
|
4171
4204
|
next.id,
|
|
4172
4205
|
next.hideUserMessage,
|
|
4206
|
+
{
|
|
4207
|
+
model: next.model,
|
|
4208
|
+
engine: next.engine,
|
|
4209
|
+
effort: next.effort,
|
|
4210
|
+
},
|
|
4173
4211
|
),
|
|
4174
4212
|
} as Parameters<typeof threadRuntime.append>[0]);
|
|
4175
4213
|
appended = true;
|
|
@@ -4493,6 +4531,22 @@ const AssistantChatInner = forwardRef<
|
|
|
4493
4531
|
// Keep the ref current so addToQueue can call it without a stale closure.
|
|
4494
4532
|
stopActiveRunRef.current = stopActiveRun;
|
|
4495
4533
|
|
|
4534
|
+
// Explicit opt-in interrupt from a queued bubble: hoist the entry to the
|
|
4535
|
+
// front and abort the active run, letting auto-dequeue re-send it once the
|
|
4536
|
+
// run clears. Plain Enter still queues — this is the only send-now gesture.
|
|
4537
|
+
const sendQueuedMessageNow = useCallback(
|
|
4538
|
+
(id: string) => {
|
|
4539
|
+
applyLocalQueuedMessages((prev) => hoistQueuedMessageToFront(prev, id));
|
|
4540
|
+
stopActiveRunRef.current({ preserveQueuedMessages: true });
|
|
4541
|
+
},
|
|
4542
|
+
[applyLocalQueuedMessages],
|
|
4543
|
+
);
|
|
4544
|
+
|
|
4545
|
+
const visibleQueuedMessages = useMemo(
|
|
4546
|
+
() => queuedMessages.filter((message) => !message.hideUserMessage),
|
|
4547
|
+
[queuedMessages],
|
|
4548
|
+
);
|
|
4549
|
+
|
|
4496
4550
|
const addToQueue = useCallback(
|
|
4497
4551
|
async (
|
|
4498
4552
|
text: string,
|
|
@@ -4663,6 +4717,12 @@ const AssistantChatInner = forwardRef<
|
|
|
4663
4717
|
: execMode === "build"
|
|
4664
4718
|
? "act"
|
|
4665
4719
|
: undefined);
|
|
4720
|
+
// Same reasoning for the model picker — see `QueuedMessage.model`.
|
|
4721
|
+
const modelSnapshot = {
|
|
4722
|
+
model: selectedModel,
|
|
4723
|
+
engine: selectedEngine,
|
|
4724
|
+
effort: selectedEffort,
|
|
4725
|
+
};
|
|
4666
4726
|
if (isRunning && intent === "immediate") {
|
|
4667
4727
|
// Explicit interrupt path: abort the active server run, then let the
|
|
4668
4728
|
// auto-dequeue path append this message once the run is clear. Normal
|
|
@@ -4683,6 +4743,7 @@ const AssistantChatInner = forwardRef<
|
|
|
4683
4743
|
recoveryAction,
|
|
4684
4744
|
trackInRunsTray,
|
|
4685
4745
|
hideUserMessage,
|
|
4746
|
+
...modelSnapshot,
|
|
4686
4747
|
},
|
|
4687
4748
|
]);
|
|
4688
4749
|
stopActiveRunRef.current({ preserveQueuedMessages: true });
|
|
@@ -4703,6 +4764,7 @@ const AssistantChatInner = forwardRef<
|
|
|
4703
4764
|
recoveryAction,
|
|
4704
4765
|
trackInRunsTray,
|
|
4705
4766
|
hideUserMessage,
|
|
4767
|
+
...modelSnapshot,
|
|
4706
4768
|
},
|
|
4707
4769
|
]);
|
|
4708
4770
|
} else {
|
|
@@ -4754,6 +4816,9 @@ const AssistantChatInner = forwardRef<
|
|
|
4754
4816
|
markOptimisticRunning,
|
|
4755
4817
|
appendThreadMessage,
|
|
4756
4818
|
requestMissingKeySetup,
|
|
4819
|
+
selectedEffort,
|
|
4820
|
+
selectedEngine,
|
|
4821
|
+
selectedModel,
|
|
4757
4822
|
updateComposerContextItems,
|
|
4758
4823
|
],
|
|
4759
4824
|
);
|
|
@@ -5539,52 +5604,79 @@ const AssistantChatInner = forwardRef<
|
|
|
5539
5604
|
/>
|
|
5540
5605
|
</MessageScrollerItem>
|
|
5541
5606
|
)}
|
|
5542
|
-
{
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5607
|
+
{visibleQueuedMessages.length > 0 && (
|
|
5608
|
+
<MessageScrollerItem>
|
|
5609
|
+
<div className="flex items-center justify-end gap-1.5 pr-0.5 text-xs text-muted-foreground">
|
|
5610
|
+
<IconClock className="h-3 w-3" />
|
|
5611
|
+
<span>
|
|
5612
|
+
{visibleQueuedMessages.length} queued
|
|
5613
|
+
</span>
|
|
5614
|
+
</div>
|
|
5615
|
+
</MessageScrollerItem>
|
|
5616
|
+
)}
|
|
5617
|
+
{visibleQueuedMessages.map((msg) => {
|
|
5618
|
+
const displayText = displayableUserMessageText(
|
|
5619
|
+
msg.text,
|
|
5620
|
+
);
|
|
5621
|
+
const imageSources =
|
|
5622
|
+
queuedMessageImageSources(msg);
|
|
5623
|
+
return (
|
|
5624
|
+
<MessageScrollerItem
|
|
5625
|
+
key={msg.id}
|
|
5626
|
+
messageId={msg.id}
|
|
5627
|
+
>
|
|
5628
|
+
<div className="group flex items-start justify-end gap-1.5">
|
|
5629
|
+
{isRunning && (
|
|
5630
|
+
<Tooltip>
|
|
5631
|
+
<TooltipTrigger asChild>
|
|
5632
|
+
<button
|
|
5633
|
+
type="button"
|
|
5634
|
+
onClick={() =>
|
|
5635
|
+
sendQueuedMessageNow(msg.id)
|
|
5636
|
+
}
|
|
5637
|
+
aria-label="Send now"
|
|
5638
|
+
className="mt-1.5 flex h-5 w-5 cursor-pointer items-center justify-center rounded-full border border-border bg-background text-muted-foreground opacity-0 shadow-sm transition-opacity hover:bg-accent hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100"
|
|
5639
|
+
>
|
|
5640
|
+
<IconArrowUp className="h-3 w-3" />
|
|
5641
|
+
</button>
|
|
5642
|
+
</TooltipTrigger>
|
|
5643
|
+
<TooltipContent>
|
|
5644
|
+
Send now (stops the current
|
|
5645
|
+
response)
|
|
5646
|
+
</TooltipContent>
|
|
5647
|
+
</Tooltip>
|
|
5648
|
+
)}
|
|
5649
|
+
<button
|
|
5650
|
+
type="button"
|
|
5651
|
+
onClick={() =>
|
|
5652
|
+
applyLocalQueuedMessages((prev) =>
|
|
5653
|
+
prev.filter((m) => m.id !== msg.id),
|
|
5654
|
+
)
|
|
5655
|
+
}
|
|
5656
|
+
aria-label="Remove from queue"
|
|
5657
|
+
className="mt-1.5 flex h-5 w-5 cursor-pointer items-center justify-center rounded-full border border-border bg-background text-muted-foreground opacity-0 shadow-sm transition-opacity hover:bg-accent hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100"
|
|
5658
|
+
>
|
|
5659
|
+
<IconX className="h-3 w-3" />
|
|
5660
|
+
</button>
|
|
5661
|
+
<div className="max-w-[85%] rounded-lg bg-accent/50 px-3 py-2 text-sm leading-relaxed text-foreground/60 whitespace-pre-wrap break-words">
|
|
5662
|
+
{displayText}
|
|
5663
|
+
{imageSources.length > 0 && (
|
|
5664
|
+
<div className="flex flex-wrap gap-1.5 mt-1.5">
|
|
5665
|
+
{imageSources.map((img, j) => (
|
|
5666
|
+
<img
|
|
5667
|
+
key={j}
|
|
5668
|
+
src={img}
|
|
5669
|
+
alt=""
|
|
5670
|
+
className="h-12 w-12 rounded object-cover border border-border/50"
|
|
5671
|
+
/>
|
|
5672
|
+
))}
|
|
5673
|
+
</div>
|
|
5674
|
+
)}
|
|
5584
5675
|
</div>
|
|
5585
|
-
</
|
|
5586
|
-
|
|
5587
|
-
|
|
5676
|
+
</div>
|
|
5677
|
+
</MessageScrollerItem>
|
|
5678
|
+
);
|
|
5679
|
+
})}
|
|
5588
5680
|
{resolvedThreadFooterSlot ? (
|
|
5589
5681
|
<MessageScrollerItem>
|
|
5590
5682
|
<div className="agent-thread-footer-slot">
|
|
@@ -41,6 +41,10 @@ import {
|
|
|
41
41
|
type ChatHistoryItem,
|
|
42
42
|
type ChatHistorySection,
|
|
43
43
|
} from "./chat/ChatHistoryList.js";
|
|
44
|
+
import {
|
|
45
|
+
fetchBuilderStatus,
|
|
46
|
+
fetchEnvironmentStatus,
|
|
47
|
+
} from "./client-status-requests.js";
|
|
44
48
|
import {
|
|
45
49
|
Popover,
|
|
46
50
|
PopoverAnchor,
|
|
@@ -1114,14 +1118,10 @@ export function MultiTabAssistantChat({
|
|
|
1114
1118
|
callAction("manage-agent-engine" as any, { action: "list" } as any).catch(
|
|
1115
1119
|
() => null,
|
|
1116
1120
|
),
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
.catch(() => []),
|
|
1120
|
-
fetch(agentNativePath("/_agent-native/builder/status"))
|
|
1121
|
-
.then((r) => (r.ok ? r.json() : null))
|
|
1122
|
-
.catch(() => null),
|
|
1121
|
+
fetchEnvironmentStatus<Array<{ key: string; configured: boolean }>>(),
|
|
1122
|
+
fetchBuilderStatus<{ configured?: boolean }>(),
|
|
1123
1123
|
])
|
|
1124
|
-
.then(([enginesData,
|
|
1124
|
+
.then(([enginesData, envResult, builderResult]) => {
|
|
1125
1125
|
if (!enginesData?.engines) {
|
|
1126
1126
|
// Leaves `availableModels` empty for the session, so an override with
|
|
1127
1127
|
// no engine of its own has nothing to resolve against.
|
|
@@ -1130,10 +1130,16 @@ export function MultiTabAssistantChat({
|
|
|
1130
1130
|
);
|
|
1131
1131
|
return;
|
|
1132
1132
|
}
|
|
1133
|
+
if (
|
|
1134
|
+
envResult.state !== "available" ||
|
|
1135
|
+
builderResult.state !== "available"
|
|
1136
|
+
) {
|
|
1137
|
+
return;
|
|
1138
|
+
}
|
|
1139
|
+
const envKeys = envResult.value;
|
|
1140
|
+
const builderStatus = builderResult.value;
|
|
1133
1141
|
const configuredKeys = new Set(
|
|
1134
|
-
(
|
|
1135
|
-
.filter((k) => k.configured)
|
|
1136
|
-
.map((k) => k.key),
|
|
1142
|
+
envKeys.filter((k) => k.configured).map((k) => k.key),
|
|
1137
1143
|
);
|
|
1138
1144
|
const builderConnected = builderStatus?.configured === true;
|
|
1139
1145
|
const currentEngineName: string | undefined =
|
|
@@ -884,6 +884,9 @@ function lastCompletedTimeoutCandidateTool(
|
|
|
884
884
|
part.activity !== true &&
|
|
885
885
|
part.result !== undefined &&
|
|
886
886
|
part.isError !== true &&
|
|
887
|
+
// A settled-interrupted tool has a result but an unknown outcome; claiming
|
|
888
|
+
// it completed is the same false-success this message exists to avoid.
|
|
889
|
+
part.outcome !== "unknown" &&
|
|
887
890
|
isCompletedToolTimeoutCandidate(part)
|
|
888
891
|
) {
|
|
889
892
|
return part;
|
|
@@ -1633,6 +1636,21 @@ export function createAgentChatAdapter(
|
|
|
1633
1636
|
: execModeRef?.current === "build"
|
|
1634
1637
|
? "act"
|
|
1635
1638
|
: undefined;
|
|
1639
|
+
// Queued turns carry the model/engine/effort they were composed with.
|
|
1640
|
+
// The refs track the live picker, so without this a queue that flushes
|
|
1641
|
+
// after the user switches models runs under the wrong one.
|
|
1642
|
+
const runConfigSelection = (key: "model" | "engine" | "effort") => {
|
|
1643
|
+
const raw =
|
|
1644
|
+
runConfig?.custom && typeof runConfig.custom === "object"
|
|
1645
|
+
? (runConfig.custom as Record<string, unknown>)[key]
|
|
1646
|
+
: undefined;
|
|
1647
|
+
return typeof raw === "string" && raw.length > 0 ? raw : undefined;
|
|
1648
|
+
};
|
|
1649
|
+
const model = runConfigSelection("model") ?? modelRef?.current;
|
|
1650
|
+
const engine = runConfigSelection("engine") ?? engineRef?.current;
|
|
1651
|
+
const effort =
|
|
1652
|
+
(runConfigSelection("effort") as ReasoningEffort | undefined) ??
|
|
1653
|
+
effortRef?.current;
|
|
1636
1654
|
|
|
1637
1655
|
const withRequestModeMetadata = (
|
|
1638
1656
|
result: ChatModelRunResult,
|
|
@@ -3181,9 +3199,9 @@ export function createAgentChatAdapter(
|
|
|
3181
3199
|
? { internalContinuation: true }
|
|
3182
3200
|
: {}),
|
|
3183
3201
|
...(requestMode ? { mode: requestMode } : {}),
|
|
3184
|
-
...(
|
|
3185
|
-
...(
|
|
3186
|
-
...(
|
|
3202
|
+
...(model ? { model } : {}),
|
|
3203
|
+
...(engine ? { engine } : {}),
|
|
3204
|
+
...(effort ? { effort } : {}),
|
|
3187
3205
|
...(browserTabId ? { browserTabId } : {}),
|
|
3188
3206
|
...(scopeRef?.current ? { scope: scopeRef.current } : {}),
|
|
3189
3207
|
...(includeAttachments ? { attachments } : {}),
|