@agent-native/core 0.149.1 → 0.149.3
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 +1 -1
- package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/analytics/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/analytics/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/analytics/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/analytics/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/analytics/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +2 -0
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/analytics/AGENTS.md +25 -32
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +150 -46
- package/corpus/templates/analytics/app/global.css +1 -1
- package/corpus/templates/analytics/app/i18n-data.ts +37 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +1 -1
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +32 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +2 -0
- package/corpus/templates/analytics/changelog/2026-08-10-dashboard-tables-can-be-copied-and-sorted-by-multiple-column.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/assets/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/assets/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/assets/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/assets/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/assets/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/assets/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/assets/AGENTS.md +6 -9
- package/corpus/templates/assets/app/global.css +1 -1
- package/corpus/templates/assets/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/assets/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/brain/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/brain/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/brain/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/brain/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/brain/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/brain/AGENTS.md +5 -12
- package/corpus/templates/brain/app/global.css +1 -1
- package/corpus/templates/brain/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/brain/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/calendar/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/calendar/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/calendar/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/calendar/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/calendar/AGENTS.md +8 -9
- package/corpus/templates/chat/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/chat/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/chat/AGENTS.md +32 -80
- package/corpus/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/clips/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/clips/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/clips/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/clips/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/clips/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/clips/AGENTS.md +25 -31
- package/corpus/templates/clips/changelog/2026-08-10-clips-desktop-sign-in-now-starts-with-magic-links-and-google.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/overlay.css +1 -0
- package/corpus/templates/clips/desktop/src/app.tsx +274 -137
- package/corpus/templates/clips/desktop/src/styles.css +35 -0
- package/corpus/templates/content/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/content/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/content/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/content/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/content/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/content/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/content/AGENTS.md +5 -9
- package/corpus/templates/content/app/global.css +1 -0
- package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/crm/AGENTS.md +7 -11
- package/corpus/templates/crm/app/global.css +1 -1
- package/corpus/templates/crm/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/crm/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/design/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/design/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/design/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/design/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/design/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/design/.agents/skills/creative-context/SKILL.md +4 -2
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +70 -3
- package/corpus/templates/design/AGENTS.md +13 -21
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +12 -0
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +19 -2
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +115 -7
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +82 -7
- package/corpus/templates/design/app/components/design/design-trace.ts +120 -0
- package/corpus/templates/design/app/components/design/dnd-debug.ts +2 -1
- package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +40 -26
- package/corpus/templates/design/app/components/design/multi-screen/board-surface-html.ts +4 -1
- package/corpus/templates/design/app/components/design/multi-screen/frame-geometry.ts +12 -3
- package/corpus/templates/design/app/components/design/multi-screen/screen-content-cache.ts +4 -0
- package/corpus/templates/design/app/components/design/multi-screen/types.ts +7 -0
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -2
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +2 -2
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +3 -0
- package/corpus/templates/design/app/i18n-data.ts +1 -0
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +5 -5
- package/corpus/templates/design/app/pages/DesignSystems.tsx +3 -2
- package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +100 -13
- package/corpus/templates/design/app/pages/design-editor/cross-screen-text-color.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/data-operations.ts +14 -0
- package/corpus/templates/design/changelog/2026-08-10-marquee-selecting-layers-far-down-a-tall-screen-now-selects-.md +6 -0
- package/corpus/templates/design/changelog/2026-08-10-the-frame-tool-draws-a-plain-frame-by-default-with-screen-av.md +6 -0
- package/corpus/templates/design/e2e/global-setup.ts +27 -32
- package/corpus/templates/design/playwright.config.ts +3 -5
- package/corpus/templates/design/shared/breakpoint-media.ts +9 -2
- package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/dispatch/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/dispatch/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/dispatch/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/dispatch/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/dispatch/AGENTS.md +9 -16
- package/corpus/templates/dispatch/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/factory/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/factory/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/factory/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/factory/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/factory/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/factory/AGENTS.md +10 -24
- package/corpus/templates/factory/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/forms/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/forms/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/forms/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/forms/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/forms/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/forms/AGENTS.md +11 -17
- package/corpus/templates/forms/app/global.css +1 -0
- package/corpus/templates/forms/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/forms/changelog/2026-08-11-full-page-chat-composers-stay-at-a-focused-750px-width.md +6 -0
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/macros/AGENTS.md +8 -8
- package/corpus/templates/mail/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/mail/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/mail/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/mail/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/mail/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/mail/AGENTS.md +5 -6
- package/corpus/templates/plan/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/plan/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/plan/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/plan/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/plan/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/plan/AGENTS.md +5 -14
- package/corpus/templates/plan/app/global.css +1 -0
- package/corpus/templates/plan/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/corpus/templates/plan/changelog/2026-08-11-plan-no-longer-reloads-when-runtime-state-changes.md +6 -0
- package/corpus/templates/plan/server/ui-plan-html.ts +4 -1
- package/corpus/templates/plan/vite.config.ts +5 -0
- package/corpus/templates/slides/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/slides/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/slides/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/slides/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +2 -2
- package/corpus/templates/slides/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/slides/.agents/skills/creative-context/SKILL.md +6 -3
- package/corpus/templates/slides/.agents/skills/deck-management/SKILL.md +6 -1
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/slides/.agents/skills/image-generation-via-a2a/SKILL.md +3 -2
- package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +3 -0
- package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +3 -3
- package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/slides/AGENTS.md +33 -35
- package/corpus/templates/slides/actions/add-deck.ts +2 -0
- package/corpus/templates/slides/actions/add-slide.ts +15 -1
- package/corpus/templates/slides/actions/create-deck.ts +18 -6
- package/corpus/templates/slides/actions/get-deck-reference-context.ts +2 -2
- package/corpus/templates/slides/actions/get-deck.ts +83 -7
- package/corpus/templates/slides/actions/import-file.ts +2 -1
- package/corpus/templates/slides/actions/patch-deck.ts +165 -9
- package/corpus/templates/slides/actions/save-deck.ts +24 -1
- package/corpus/templates/slides/actions/update-slide.ts +1 -1
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +2 -2
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +1 -23
- package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +2 -2
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +6 -6
- package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +3 -3
- package/corpus/templates/slides/app/components/editor/DeckEditorSkeleton.tsx +4 -4
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +432 -668
- package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +296 -259
- package/corpus/templates/slides/app/components/editor/GeneratingSlidePreview.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/GoogleDriveConnectionCta.tsx +13 -1
- package/corpus/templates/slides/app/components/editor/NewDeckReferenceStep.tsx +56 -174
- package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +241 -116
- package/corpus/templates/slides/app/components/editor/SlideContextToolbar.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +42 -14
- package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +6 -12
- package/corpus/templates/slides/app/components/editor/editor-command-model.ts +35 -0
- package/corpus/templates/slides/app/components/layout/AgentWorkIndicator.tsx +1 -1
- package/corpus/templates/slides/app/components/layout/Layout.tsx +34 -35
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +8 -10
- package/corpus/templates/slides/app/components/layout/layout-route-policy.ts +2 -5
- package/corpus/templates/slides/app/components/onboarding/FirstDeckOnboardingFlow.tsx +45 -40
- package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +63 -16
- package/corpus/templates/slides/app/context/DeckContext.tsx +2 -1
- package/corpus/templates/slides/app/global.css +76 -1
- package/corpus/templates/slides/app/hooks/use-generating-slide-preview.ts +25 -3
- package/corpus/templates/slides/app/i18n/en-US.ts +2 -0
- package/corpus/templates/slides/app/lib/create-deck-generation.ts +52 -23
- package/corpus/templates/slides/app/lib/recent-references.ts +23 -1
- package/corpus/templates/slides/app/lib/slide-animation-elements.ts +104 -3
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +17 -33
- package/corpus/templates/slides/app/pages/DesignSystems.tsx +2 -2
- package/corpus/templates/slides/app/pages/Index.tsx +315 -151
- package/corpus/templates/slides/app/root.tsx +43 -0
- package/corpus/templates/slides/changelog/2026-08-10-ai-editing-avatar-badge.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-generated-decks-keep-a-clear-human-readable-title.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-new-deck-creation-now-shows-progress-opens-the-editor-direct.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-presentation-reveals-now-follow-valid-targets.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-slides-editing-controls-are-consolidated-into-one-focused-me.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-slides-now-verify-and-restyle-every-imported-slide-in-one-pa.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-slides-only-suggests-a-google-connection-for-relevant-reques.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-10-the-google-slides-import-option-is-now-labeled-slides.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-11-faster-slides-chat-deck-reads.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-11-slides-chat-can-read-one-slide-without-loading-the-full-deck.md +6 -0
- package/corpus/templates/slides/changelog/2026-08-11-slides-clearly-indicate-when-an-ai-agent-is-editing-alongsid.md +6 -0
- package/corpus/templates/slides/package.json +1 -0
- package/corpus/templates/slides/server/lib/chat-attachments.ts +1 -1
- package/corpus/templates/slides/server/lib/validate-slide-animations.ts +163 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +8 -5
- package/corpus/templates/slides/shared/api.ts +47 -15
- package/corpus/templates/slides/shared/deck-title.ts +135 -0
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +54 -488
- package/corpus/templates/tasks/.agents/skills/actions/references/action-fields.md +136 -0
- package/corpus/templates/tasks/.agents/skills/actions/references/examples.md +94 -0
- package/corpus/templates/tasks/.agents/skills/actions/references/provider-apis.md +95 -0
- package/corpus/templates/tasks/.agents/skills/agent-watchdog/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/create-skill/SKILL.md +9 -35
- package/corpus/templates/tasks/.agents/skills/efficient-fable/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/efficient-frontier/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +4 -5
- package/corpus/templates/tasks/.agents/skills/plan-arbiter/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/plow-ahead/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/quick-recap/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/read-the-damn-docs/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/stay-within-limits/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/corpus/templates/tasks/AGENTS.md +5 -20
- package/corpus/templates/tasks/app/components/tasks/TaskListRow.tsx +4 -1
- package/dist/agent/engine/ai-sdk-engine.js +1 -1
- package/dist/agent/production-agent.d.ts +21 -1
- package/dist/agent/production-agent.js +505 -355
- package/dist/agent/run-manager.js +156 -14
- package/dist/agent/run-store.d.ts +11 -10
- package/dist/agent/run-store.js +17 -13
- package/dist/agent/tool-approval-store.d.ts +18 -0
- package/dist/agent/tool-approval-store.js +122 -0
- package/dist/agent/types.d.ts +1 -1
- package/dist/cli/code-agent-executor.js +11 -2
- package/dist/client/AgentPanel.js +31 -6
- package/dist/client/AssistantChat.d.ts +9 -4
- package/dist/client/AssistantChat.js +221 -149
- package/dist/client/active-run-state.d.ts +9 -1
- package/dist/client/active-run-state.js +34 -3
- package/dist/client/agent-chat/index.d.ts +1 -1
- package/dist/client/agent-chat-adapter.d.ts +8 -0
- package/dist/client/agent-chat-adapter.js +125 -28
- package/dist/client/agent-chat.d.ts +1 -1
- package/dist/client/chat/markdown-renderer.js +14 -2
- package/dist/client/chat/message-components.d.ts +13 -3
- package/dist/client/chat/message-components.js +57 -52
- package/dist/client/chat/run-recovery.d.ts +1 -0
- package/dist/client/chat/run-recovery.js +8 -0
- package/dist/client/chat/tool-call-display.d.ts +5 -5
- package/dist/client/chat/tool-call-display.js +9 -212
- package/dist/client/chat-first/apps-rail.js +3 -3
- package/dist/client/chat-first/browser-pane.js +4 -1
- package/dist/client/chat-first/chat-history.d.ts +3 -1
- package/dist/client/chat-first/chat-history.js +7 -4
- package/dist/client/chat-first/surface-tabs.d.ts +1 -1
- package/dist/client/chat-first/surface-tabs.js +52 -41
- package/dist/client/chat-first/types.d.ts +3 -0
- package/dist/client/chat-first.d.ts +10 -0
- package/dist/client/chat-first.js +37 -2
- package/dist/client/components/ui/message-scroller.js +4 -1
- package/dist/client/i18n.js +3 -1
- package/dist/client/resources/McpConnectionSuggestion.js +9 -1
- package/dist/client/sse-event-processor.d.ts +4 -2
- package/dist/client/sse-event-processor.js +46 -6
- package/dist/client/use-chat-models.js +156 -80
- package/dist/client/use-run-stuck-detection.d.ts +2 -0
- package/dist/client/use-run-stuck-detection.js +85 -9
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/integrations/adapters/slack.d.ts +0 -4
- package/dist/integrations/adapters/slack.js +6 -30
- package/dist/integrations/catalog.js +1 -1
- package/dist/integrations/pending-tasks-store.d.ts +0 -8
- package/dist/integrations/pending-tasks-store.js +0 -21
- package/dist/integrations/slack-manifest.d.ts +2 -2
- package/dist/integrations/slack-manifest.js +0 -3
- package/dist/integrations/webhook-handler.js +1 -1
- package/dist/mcp/screen-memory-stdio.d.ts +7 -7
- package/dist/observability/routes.d.ts +3 -3
- package/dist/provider-api/actions/custom-provider-registration.d.ts +4 -4
- package/dist/provider-api/actions/provider-api.d.ts +8 -8
- package/dist/scripts/docs/source-search.js +2 -2
- package/dist/server/agent-chat/framework-prompts.js +7 -2
- package/dist/server/agent-chat/prompt-resources.js +2 -2
- package/dist/server/agent-chat/skill-frontmatter.d.ts +31 -2
- package/dist/server/agent-chat/skill-frontmatter.js +41 -15
- package/dist/server/agent-chat-plugin.js +3 -3
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/agents-bundle.d.ts +16 -19
- package/dist/server/agents-bundle.js +19 -35
- package/dist/server/auth.js +262 -31
- package/dist/server/better-auth-instance.d.ts +1 -0
- package/dist/server/better-auth-instance.js +17 -2
- package/dist/server/onboarding-html.js +56 -9
- package/dist/server/prompts/framework-core-compact.d.ts +6 -1
- package/dist/server/prompts/framework-core-compact.js +12 -9
- package/dist/server/prompts/framework-core.d.ts +6 -1
- package/dist/server/prompts/framework-core.js +11 -9
- package/dist/server/prompts/index.d.ts +1 -1
- package/dist/server/prompts/index.js +1 -1
- package/dist/server/prompts/shared-rules.d.ts +15 -11
- package/dist/server/prompts/shared-rules.js +17 -13
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/shared/reasoning-effort.d.ts +8 -8
- package/dist/shared/reasoning-effort.js +10 -10
- package/dist/shared/streaming-text-smoothing.js +41 -11
- package/dist/styles/agent-native.css +19 -32
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/chat/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
- package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/chat/AGENTS.md +32 -80
- package/dist/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/dist/templates/default/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/default/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/default/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/default/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/default/.agents/skills/create-skill/SKILL.md +9 -35
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +4 -5
- package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/headless/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/headless/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/headless/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/headless/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +54 -488
- package/dist/templates/workspace-core/.agents/skills/actions/references/action-fields.md +136 -0
- package/dist/templates/workspace-core/.agents/skills/actions/references/examples.md +94 -0
- package/dist/templates/workspace-core/.agents/skills/actions/references/provider-apis.md +95 -0
- package/dist/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +1 -0
- package/dist/templates/workspace-core/.agents/skills/agent-page/SKILL.md +1 -0
- package/dist/templates/workspace-core/.agents/skills/create-skill/SKILL.md +9 -35
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +4 -5
- package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +21 -29
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +7 -17
- package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +3 -3
- package/dist/templates/workspace-core/AGENTS.md +7 -16
- package/docs/content/messaging.mdx +6 -7
- package/docs/content/template-chat.mdx +1 -1
- package/package.json +2 -2
- package/src/templates/chat/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/chat/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/chat/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/chat/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/chat/.agents/skills/create-skill/SKILL.md +9 -35
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +4 -5
- package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/chat/AGENTS.md +32 -80
- package/src/templates/chat/changelog/2026-08-10-full-page-chat-now-uses-the-available-width-up-to-1000px-for.md +6 -0
- package/src/templates/default/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/default/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/default/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/default/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/default/.agents/skills/create-skill/SKILL.md +9 -35
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +4 -5
- package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/headless/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/headless/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/headless/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/headless/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +54 -488
- package/src/templates/workspace-core/.agents/skills/actions/references/action-fields.md +136 -0
- package/src/templates/workspace-core/.agents/skills/actions/references/examples.md +94 -0
- package/src/templates/workspace-core/.agents/skills/actions/references/provider-apis.md +95 -0
- package/src/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +1 -0
- package/src/templates/workspace-core/.agents/skills/agent-page/SKILL.md +1 -0
- package/src/templates/workspace-core/.agents/skills/create-skill/SKILL.md +9 -35
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +4 -5
- package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +21 -29
- package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +18 -31
- package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +7 -17
- package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +3 -3
- package/src/templates/workspace-core/AGENTS.md +7 -16
|
@@ -3,9 +3,12 @@ import { PromptComposer } from "@agent-native/core/client/composer";
|
|
|
3
3
|
import { ensureEmbedAuthFetchInterceptor } from "@agent-native/core/client/host";
|
|
4
4
|
import { useT } from "@agent-native/core/client/i18n";
|
|
5
5
|
import {
|
|
6
|
+
IconArrowLeft,
|
|
6
7
|
IconBrandGoogle,
|
|
7
8
|
IconFileTypePdf,
|
|
9
|
+
IconLoader2,
|
|
8
10
|
IconPresentation,
|
|
11
|
+
IconUpload,
|
|
9
12
|
} from "@tabler/icons-react";
|
|
10
13
|
import { useState, useEffect, useCallback, useRef } from "react";
|
|
11
14
|
import { createPortal } from "react-dom";
|
|
@@ -86,7 +89,7 @@ interface PromptPopoverProps {
|
|
|
86
89
|
placeholder?: string;
|
|
87
90
|
onSkip?: () => void;
|
|
88
91
|
skipLabel?: string;
|
|
89
|
-
onSubmit: (prompt: string, files: UploadedFile[]) => void
|
|
92
|
+
onSubmit: (prompt: string, files: UploadedFile[]) => void | Promise<void>;
|
|
90
93
|
loading?: boolean;
|
|
91
94
|
anchorRef?: React.RefObject<HTMLElement | null>;
|
|
92
95
|
centered?: boolean;
|
|
@@ -125,10 +128,14 @@ export default function PromptPopover({
|
|
|
125
128
|
}: PromptPopoverProps) {
|
|
126
129
|
const t = useT();
|
|
127
130
|
const [uploading, setUploading] = useState(false);
|
|
131
|
+
const [submitting, setSubmitting] = useState(false);
|
|
128
132
|
const [promptText, setPromptText] = useState("");
|
|
129
133
|
const [googleDocContext, setGoogleDocContext] = useState("");
|
|
130
134
|
const [googleSlidesUrl, setGoogleSlidesUrl] = useState("");
|
|
131
|
-
const [
|
|
135
|
+
const [importMode, setImportMode] = useState<PromptImportSource | null>(null);
|
|
136
|
+
const [selectedImportFile, setSelectedImportFile] = useState<File | null>(
|
|
137
|
+
null,
|
|
138
|
+
);
|
|
132
139
|
const [importingSource, setImportingSource] =
|
|
133
140
|
useState<PromptImportSource | null>(null);
|
|
134
141
|
const pdfInputRef = useRef<HTMLInputElement>(null);
|
|
@@ -216,16 +223,20 @@ export default function PromptPopover({
|
|
|
216
223
|
if (files.length > 0 && onBeforeUpload?.(enrichedText, files) === false) {
|
|
217
224
|
return;
|
|
218
225
|
}
|
|
226
|
+
setSubmitting(true);
|
|
219
227
|
try {
|
|
220
228
|
const uploaded = await uploadFiles(files);
|
|
221
|
-
onSubmit(enrichedText, uploaded);
|
|
229
|
+
await onSubmit(enrichedText, uploaded);
|
|
230
|
+
setSubmitting(false);
|
|
222
231
|
} catch (error) {
|
|
232
|
+
setSubmitting(false);
|
|
223
233
|
toast.error(t("raw.uploadFailed"), {
|
|
224
234
|
description:
|
|
225
235
|
error instanceof Error
|
|
226
236
|
? error.message
|
|
227
237
|
: t("raw.uploadAttachedFailed"),
|
|
228
238
|
});
|
|
239
|
+
throw error;
|
|
229
240
|
}
|
|
230
241
|
},
|
|
231
242
|
[googleDocContext, onBeforeUpload, onSubmit, uploadFiles, t],
|
|
@@ -255,11 +266,25 @@ export default function PromptPopover({
|
|
|
255
266
|
const handleFileImport = useCallback(
|
|
256
267
|
(kind: "pdf" | "pptx", file: File | undefined) => {
|
|
257
268
|
if (!file) return;
|
|
269
|
+
setSelectedImportFile(file);
|
|
258
270
|
void runImport({ kind, files: [file] });
|
|
259
271
|
},
|
|
260
272
|
[runImport],
|
|
261
273
|
);
|
|
262
274
|
|
|
275
|
+
const chooseImportMode = useCallback((kind: PromptImportSource) => {
|
|
276
|
+
setImportMode(kind);
|
|
277
|
+
setSelectedImportFile(null);
|
|
278
|
+
setGoogleSlidesUrl("");
|
|
279
|
+
}, []);
|
|
280
|
+
|
|
281
|
+
const returnToPrompt = useCallback(() => {
|
|
282
|
+
if (importingSource) return;
|
|
283
|
+
setImportMode(null);
|
|
284
|
+
setSelectedImportFile(null);
|
|
285
|
+
setGoogleSlidesUrl("");
|
|
286
|
+
}, [importingSource]);
|
|
287
|
+
|
|
263
288
|
const handleGoogleSlidesImport = useCallback(() => {
|
|
264
289
|
const url = googleSlidesUrl.trim();
|
|
265
290
|
if (!url) return;
|
|
@@ -271,13 +296,31 @@ export default function PromptPopover({
|
|
|
271
296
|
setPromptText("");
|
|
272
297
|
setGoogleDocContext("");
|
|
273
298
|
setGoogleSlidesUrl("");
|
|
274
|
-
|
|
299
|
+
setImportMode(null);
|
|
300
|
+
setSelectedImportFile(null);
|
|
275
301
|
setImportingSource(null);
|
|
302
|
+
setSubmitting(false);
|
|
276
303
|
}
|
|
277
304
|
}, [open]);
|
|
278
305
|
|
|
279
306
|
if (!open) return null;
|
|
280
307
|
|
|
308
|
+
const importEnabled = Boolean(onImport && importFromLabel);
|
|
309
|
+
const normalizedImportFromLabel = importFromLabel
|
|
310
|
+
?.trim()
|
|
311
|
+
.replace(/^or\s+/i, "")
|
|
312
|
+
.toLowerCase();
|
|
313
|
+
const importFromCopy = normalizedImportFromLabel
|
|
314
|
+
? `Or ${normalizedImportFromLabel}`
|
|
315
|
+
: "";
|
|
316
|
+
const importModeLabel =
|
|
317
|
+
importMode === "google-slides"
|
|
318
|
+
? t("home.googleSlidesReferenceTitle")
|
|
319
|
+
: importMode === "pdf"
|
|
320
|
+
? "PDF"
|
|
321
|
+
: "PPT";
|
|
322
|
+
const importInputRef = importMode === "pdf" ? pdfInputRef : pptxInputRef;
|
|
323
|
+
|
|
281
324
|
const popover = (
|
|
282
325
|
<>
|
|
283
326
|
{centered && (
|
|
@@ -296,7 +339,7 @@ export default function PromptPopover({
|
|
|
296
339
|
>
|
|
297
340
|
<div className="flex items-center justify-between gap-3 px-4 pb-2.5 pt-3.5">
|
|
298
341
|
<span className="text-sm font-medium text-foreground">{title}</span>
|
|
299
|
-
{onSkip && (
|
|
342
|
+
{onSkip && !importMode && !submitting && (
|
|
300
343
|
<button
|
|
301
344
|
type="button"
|
|
302
345
|
onClick={() => {
|
|
@@ -310,132 +353,214 @@ export default function PromptPopover({
|
|
|
310
353
|
)}
|
|
311
354
|
</div>
|
|
312
355
|
|
|
313
|
-
|
|
314
|
-
<
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
initialText={initialText}
|
|
325
|
-
initialTextKey={initialTextKey}
|
|
356
|
+
{importEnabled && (
|
|
357
|
+
<input
|
|
358
|
+
ref={pdfInputRef}
|
|
359
|
+
type="file"
|
|
360
|
+
accept=".pdf,application/pdf"
|
|
361
|
+
className="sr-only"
|
|
362
|
+
aria-label={t("editorToolbar.importFile")}
|
|
363
|
+
onChange={(event) => {
|
|
364
|
+
handleFileImport("pdf", event.target.files?.[0]);
|
|
365
|
+
event.target.value = "";
|
|
366
|
+
}}
|
|
326
367
|
/>
|
|
327
|
-
|
|
368
|
+
)}
|
|
369
|
+
{importEnabled && (
|
|
370
|
+
<input
|
|
371
|
+
ref={pptxInputRef}
|
|
372
|
+
type="file"
|
|
373
|
+
accept=".pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
|
374
|
+
className="sr-only"
|
|
375
|
+
aria-label={t("editorToolbar.importFile")}
|
|
376
|
+
onChange={(event) => {
|
|
377
|
+
handleFileImport("pptx", event.target.files?.[0]);
|
|
378
|
+
event.target.value = "";
|
|
379
|
+
}}
|
|
380
|
+
/>
|
|
381
|
+
)}
|
|
328
382
|
|
|
329
|
-
{
|
|
330
|
-
<div
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
event.target.value = "";
|
|
355
|
-
}}
|
|
383
|
+
<div className={importEnabled ? "grid" : undefined}>
|
|
384
|
+
<div
|
|
385
|
+
className={[
|
|
386
|
+
importEnabled ? "col-start-1 row-start-1" : "",
|
|
387
|
+
importMode ? "invisible pointer-events-none" : "",
|
|
388
|
+
]
|
|
389
|
+
.filter(Boolean)
|
|
390
|
+
.join(" ")}
|
|
391
|
+
aria-hidden={importMode ? true : undefined}
|
|
392
|
+
>
|
|
393
|
+
<div className="px-2.5 pb-2.5">
|
|
394
|
+
<PromptComposer
|
|
395
|
+
autoFocus
|
|
396
|
+
attachmentsEnabled
|
|
397
|
+
maxDocumentAttachmentBytes={MAX_REFERENCE_FILE_BYTES}
|
|
398
|
+
documentAttachmentLimitLabel="Slides reference files"
|
|
399
|
+
disabled={
|
|
400
|
+
loading || uploading || submitting || Boolean(importMode)
|
|
401
|
+
}
|
|
402
|
+
placeholder={placeholder}
|
|
403
|
+
onSubmit={handleSubmit}
|
|
404
|
+
onTextChange={setPromptText}
|
|
405
|
+
draftScope={draftScope}
|
|
406
|
+
initialText={initialText}
|
|
407
|
+
initialTextKey={initialTextKey}
|
|
356
408
|
/>
|
|
357
|
-
<Button
|
|
358
|
-
type="button"
|
|
359
|
-
variant="ghost"
|
|
360
|
-
size="sm"
|
|
361
|
-
className="h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground"
|
|
362
|
-
disabled={importingSource !== null || loading || uploading}
|
|
363
|
-
onClick={() => pdfInputRef.current?.click()}
|
|
364
|
-
>
|
|
365
|
-
<IconFileTypePdf className="size-3.5" />
|
|
366
|
-
PDF
|
|
367
|
-
</Button>
|
|
368
|
-
<Button
|
|
369
|
-
type="button"
|
|
370
|
-
variant="ghost"
|
|
371
|
-
size="sm"
|
|
372
|
-
className="h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground"
|
|
373
|
-
disabled={importingSource !== null || loading || uploading}
|
|
374
|
-
onClick={() => setGoogleSlidesInputOpen((current) => !current)}
|
|
375
|
-
>
|
|
376
|
-
<IconBrandGoogle className="size-3.5" />
|
|
377
|
-
{t("home.googleSlidesReferenceTitle")}
|
|
378
|
-
</Button>
|
|
379
|
-
<Button
|
|
380
|
-
type="button"
|
|
381
|
-
variant="ghost"
|
|
382
|
-
size="sm"
|
|
383
|
-
className="h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground"
|
|
384
|
-
disabled={importingSource !== null || loading || uploading}
|
|
385
|
-
onClick={() => pptxInputRef.current?.click()}
|
|
386
|
-
>
|
|
387
|
-
<IconPresentation className="size-3.5" />
|
|
388
|
-
PPT
|
|
389
|
-
</Button>
|
|
390
|
-
{importingSource && (
|
|
391
|
-
<span className="ml-auto text-xs text-muted-foreground">
|
|
392
|
-
{importingLabel}
|
|
393
|
-
</span>
|
|
394
|
-
)}
|
|
395
409
|
</div>
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
410
|
+
|
|
411
|
+
{submitting && (
|
|
412
|
+
<div
|
|
413
|
+
className="flex items-center gap-2 border-t border-border/60 px-4 py-2.5 text-xs text-muted-foreground"
|
|
414
|
+
role="status"
|
|
415
|
+
aria-live="polite"
|
|
416
|
+
>
|
|
417
|
+
<IconLoader2 className="size-3.5 animate-spin" />
|
|
418
|
+
<span>{t("raw.uploading")}</span>
|
|
419
|
+
</div>
|
|
420
|
+
)}
|
|
421
|
+
|
|
422
|
+
{importEnabled && (
|
|
423
|
+
<div className="border-t border-border/60 px-4 pb-3 pt-2.5">
|
|
424
|
+
<div className="flex flex-wrap items-center gap-1.5">
|
|
425
|
+
<span className="mr-1 text-xs text-muted-foreground">
|
|
426
|
+
{importFromCopy}
|
|
427
|
+
</span>
|
|
428
|
+
<Button
|
|
429
|
+
type="button"
|
|
430
|
+
variant="ghost"
|
|
431
|
+
size="sm"
|
|
432
|
+
className="h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground"
|
|
433
|
+
disabled={loading || uploading || submitting}
|
|
434
|
+
onClick={() => chooseImportMode("pdf")}
|
|
435
|
+
>
|
|
436
|
+
<IconFileTypePdf className="size-3.5" />
|
|
437
|
+
PDF
|
|
438
|
+
</Button>
|
|
413
439
|
<Button
|
|
414
440
|
type="button"
|
|
441
|
+
variant="ghost"
|
|
415
442
|
size="sm"
|
|
416
|
-
className="h-
|
|
417
|
-
disabled={
|
|
418
|
-
|
|
419
|
-
importingSource !== null ||
|
|
420
|
-
loading ||
|
|
421
|
-
uploading
|
|
422
|
-
}
|
|
423
|
-
onClick={handleGoogleSlidesImport}
|
|
443
|
+
className="h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground"
|
|
444
|
+
disabled={loading || uploading || submitting}
|
|
445
|
+
onClick={() => chooseImportMode("google-slides")}
|
|
424
446
|
>
|
|
425
|
-
|
|
447
|
+
<IconBrandGoogle className="size-3.5" />
|
|
448
|
+
{t("home.googleSlidesImportLabel")}
|
|
449
|
+
</Button>
|
|
450
|
+
<Button
|
|
451
|
+
type="button"
|
|
452
|
+
variant="ghost"
|
|
453
|
+
size="sm"
|
|
454
|
+
className="h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground"
|
|
455
|
+
disabled={loading || uploading || submitting}
|
|
456
|
+
onClick={() => chooseImportMode("pptx")}
|
|
457
|
+
>
|
|
458
|
+
<IconPresentation className="size-3.5" />
|
|
459
|
+
PPT
|
|
426
460
|
</Button>
|
|
427
461
|
</div>
|
|
428
462
|
</div>
|
|
429
463
|
)}
|
|
464
|
+
|
|
465
|
+
{children}
|
|
466
|
+
|
|
467
|
+
<GoogleDocImportHint
|
|
468
|
+
promptText={promptText}
|
|
469
|
+
onSourceContextChange={setGoogleDocContext}
|
|
470
|
+
/>
|
|
430
471
|
</div>
|
|
431
|
-
)}
|
|
432
472
|
|
|
433
|
-
|
|
473
|
+
{importEnabled && importMode && (
|
|
474
|
+
<div className="col-start-1 row-start-1 flex min-h-full flex-col px-4 pb-4 pt-3">
|
|
475
|
+
<div className="flex items-center gap-2">
|
|
476
|
+
<button
|
|
477
|
+
type="button"
|
|
478
|
+
onClick={returnToPrompt}
|
|
479
|
+
disabled={importingSource !== null}
|
|
480
|
+
className="-ms-1 inline-flex size-7 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50"
|
|
481
|
+
aria-label={
|
|
482
|
+
"Back to prompt" /* i18n-ignore -- local import-flow control label */
|
|
483
|
+
}
|
|
484
|
+
>
|
|
485
|
+
<IconArrowLeft className="size-4" />
|
|
486
|
+
</button>
|
|
487
|
+
<span className="text-sm font-medium text-foreground">
|
|
488
|
+
Import {importModeLabel}
|
|
489
|
+
</span>
|
|
490
|
+
</div>
|
|
434
491
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
492
|
+
<div className="flex flex-1 flex-col justify-center gap-3">
|
|
493
|
+
{importMode === "google-slides" ? (
|
|
494
|
+
<>
|
|
495
|
+
<GoogleDriveConnectionCta />
|
|
496
|
+
<div className="flex gap-2">
|
|
497
|
+
<Input
|
|
498
|
+
autoFocus
|
|
499
|
+
type="url"
|
|
500
|
+
value={googleSlidesUrl}
|
|
501
|
+
placeholder={t("home.googleSlidesReferenceUrl")}
|
|
502
|
+
aria-label={t("home.googleSlidesReferenceUrl")}
|
|
503
|
+
className="h-8 text-xs"
|
|
504
|
+
disabled={importingSource !== null || loading}
|
|
505
|
+
onChange={(event) =>
|
|
506
|
+
setGoogleSlidesUrl(event.target.value)
|
|
507
|
+
}
|
|
508
|
+
onKeyDown={(event) => {
|
|
509
|
+
if (event.key === "Enter") handleGoogleSlidesImport();
|
|
510
|
+
}}
|
|
511
|
+
/>
|
|
512
|
+
<Button
|
|
513
|
+
type="button"
|
|
514
|
+
size="sm"
|
|
515
|
+
className="h-8 shrink-0 px-3 text-xs"
|
|
516
|
+
disabled={
|
|
517
|
+
!googleSlidesUrl.trim() ||
|
|
518
|
+
importingSource !== null ||
|
|
519
|
+
loading
|
|
520
|
+
}
|
|
521
|
+
onClick={handleGoogleSlidesImport}
|
|
522
|
+
>
|
|
523
|
+
Import
|
|
524
|
+
</Button>
|
|
525
|
+
</div>
|
|
526
|
+
</>
|
|
527
|
+
) : (
|
|
528
|
+
<>
|
|
529
|
+
<p className="text-xs text-muted-foreground">
|
|
530
|
+
Choose a {importModeLabel} file to open it as a deck.
|
|
531
|
+
</p>
|
|
532
|
+
<Button
|
|
533
|
+
type="button"
|
|
534
|
+
variant="outline"
|
|
535
|
+
className="w-full justify-center gap-2"
|
|
536
|
+
disabled={importingSource !== null || loading}
|
|
537
|
+
onClick={() => importInputRef.current?.click()}
|
|
538
|
+
>
|
|
539
|
+
<IconUpload className="size-4" />
|
|
540
|
+
Upload {importModeLabel}
|
|
541
|
+
</Button>
|
|
542
|
+
{selectedImportFile && (
|
|
543
|
+
<p className="truncate text-center text-xs text-muted-foreground">
|
|
544
|
+
{selectedImportFile.name}
|
|
545
|
+
</p>
|
|
546
|
+
)}
|
|
547
|
+
</>
|
|
548
|
+
)}
|
|
549
|
+
</div>
|
|
550
|
+
|
|
551
|
+
{importingSource && (
|
|
552
|
+
<div
|
|
553
|
+
className="flex items-center justify-center gap-2 text-xs text-muted-foreground"
|
|
554
|
+
role="status"
|
|
555
|
+
aria-live="polite"
|
|
556
|
+
>
|
|
557
|
+
<IconLoader2 className="size-3.5 animate-spin" />
|
|
558
|
+
<span>{importingLabel}</span>
|
|
559
|
+
</div>
|
|
560
|
+
)}
|
|
561
|
+
</div>
|
|
562
|
+
)}
|
|
563
|
+
</div>
|
|
439
564
|
</div>
|
|
440
565
|
</>
|
|
441
566
|
);
|
|
@@ -193,7 +193,7 @@ export function SlideContextToolbar({
|
|
|
193
193
|
return (
|
|
194
194
|
<div
|
|
195
195
|
className={cn(
|
|
196
|
-
"slide-context-toolbar flex h-10 shrink-0 items-center gap-1 overflow-x-auto whitespace-nowrap
|
|
196
|
+
"slide-context-toolbar flex h-10 shrink-0 items-center gap-1 overflow-x-auto whitespace-nowrap bg-transparent px-2 sm:px-3",
|
|
197
197
|
className,
|
|
198
198
|
)}
|
|
199
199
|
data-slide-context-toolbar="true"
|
|
@@ -150,7 +150,7 @@ function ExcalidrawExitButton(props: { onExit: () => void; label: string }) {
|
|
|
150
150
|
<Button
|
|
151
151
|
variant="ghost"
|
|
152
152
|
size="icon"
|
|
153
|
-
className="absolute right-3 top-3 z-20 h-8 w-8 cursor-pointer border border-border bg-popover/95 shadow-lg
|
|
153
|
+
className="absolute right-3 top-3 z-20 h-8 w-8 cursor-pointer border border-border bg-popover/95 shadow-lg"
|
|
154
154
|
onClick={props.onExit}
|
|
155
155
|
aria-label={props.label}
|
|
156
156
|
>
|
|
@@ -532,6 +532,8 @@ interface SlideEditorProps {
|
|
|
532
532
|
* shell above the slide rail. Selection state lives here, so the toolbar is
|
|
533
533
|
* portaled out rather than lifted. Falls back to rendering in place. */
|
|
534
534
|
contextToolbarSlot?: HTMLElement | null;
|
|
535
|
+
/** Wide editor-shell host for the toolbar's top-row placement. */
|
|
536
|
+
wideContextToolbarSlot?: HTMLElement | null;
|
|
535
537
|
/** Selection-independent actions for the head of the contextual toolbar. */
|
|
536
538
|
contextToolbarLeading?: ReactNode;
|
|
537
539
|
onGenerateImage: () => void;
|
|
@@ -564,8 +566,6 @@ interface SlideEditorProps {
|
|
|
564
566
|
onComment?: (quotedText: string) => void;
|
|
565
567
|
/** Zero-based index of the current slide */
|
|
566
568
|
slideIndex?: number;
|
|
567
|
-
/** Total number of slides in the deck */
|
|
568
|
-
slideCount?: number;
|
|
569
569
|
/** Design system to inject as CSS custom properties on the slide */
|
|
570
570
|
designSystem?: DesignSystemData;
|
|
571
571
|
/** Deck aspect ratio (defaults to 16:9 when omitted) */
|
|
@@ -647,12 +647,17 @@ function SameSlidePresenceIndicator({ users }: { users: CollabUser[] }) {
|
|
|
647
647
|
if (users.length === 0) return null;
|
|
648
648
|
const visible = users.slice(0, 3);
|
|
649
649
|
const overflow = users.length - visible.length;
|
|
650
|
+
const agentIsPresent = users.some(
|
|
651
|
+
(user) => user.email.trim().toLowerCase() === "agent@system",
|
|
652
|
+
);
|
|
650
653
|
const label =
|
|
651
|
-
users.length === 1
|
|
652
|
-
?
|
|
653
|
-
:
|
|
654
|
+
agentIsPresent && users.length === 1
|
|
655
|
+
? "AI editing"
|
|
656
|
+
: users.length === 1
|
|
657
|
+
? `${users[0].name} is here`
|
|
658
|
+
: `${users.length} others here`;
|
|
654
659
|
return (
|
|
655
|
-
<div className="pointer-events-auto flex items-center gap-1.5 rounded-full border border-border bg-popover/95 py-1 pl-1 pr-2.5 text-xs text-popover-foreground shadow-lg
|
|
660
|
+
<div className="pointer-events-auto flex items-center gap-1.5 rounded-full border border-border bg-popover/95 py-1 pl-1 pr-2.5 text-xs text-popover-foreground shadow-lg">
|
|
656
661
|
<div className="flex items-center">
|
|
657
662
|
{visible.map((u) => (
|
|
658
663
|
<SamePresenceAvatar key={u.email} user={u} />
|
|
@@ -993,6 +998,7 @@ export default function SlideEditor({
|
|
|
993
998
|
onUpdateSlide,
|
|
994
999
|
readOnly = false,
|
|
995
1000
|
contextToolbarSlot,
|
|
1001
|
+
wideContextToolbarSlot,
|
|
996
1002
|
contextToolbarLeading,
|
|
997
1003
|
onGenerateImage,
|
|
998
1004
|
onOpenAssetLibrary,
|
|
@@ -1004,7 +1010,6 @@ export default function SlideEditor({
|
|
|
1004
1010
|
onToggleObjectFit,
|
|
1005
1011
|
agentActive,
|
|
1006
1012
|
slideIndex = 0,
|
|
1007
|
-
slideCount = 1,
|
|
1008
1013
|
designSystem,
|
|
1009
1014
|
aspectRatio,
|
|
1010
1015
|
drawMode,
|
|
@@ -4198,6 +4203,27 @@ export default function SlideEditor({
|
|
|
4198
4203
|
// the button's onClick runs, so partial-text formatting would silently
|
|
4199
4204
|
// apply to the whole object.
|
|
4200
4205
|
data-slide-inline-edit-surface="true"
|
|
4206
|
+
data-slide-context-toolbar-placement="row"
|
|
4207
|
+
onPointerDownCapture={preserveRichTextSelection}
|
|
4208
|
+
>
|
|
4209
|
+
<SlideContextToolbar
|
|
4210
|
+
snapshot={selectedStyleSnapshot}
|
|
4211
|
+
background={slide.background}
|
|
4212
|
+
designSystem={designSystem}
|
|
4213
|
+
leading={contextToolbarLeading}
|
|
4214
|
+
onChange={applySelectedStylePatch}
|
|
4215
|
+
onBackgroundChange={applySlideBackground}
|
|
4216
|
+
onArrange={handleArrangeSelected}
|
|
4217
|
+
onToggleList={handleToggleList}
|
|
4218
|
+
/>
|
|
4219
|
+
</div>
|
|
4220
|
+
) : null;
|
|
4221
|
+
|
|
4222
|
+
const wideContextToolbar = !readOnly ? (
|
|
4223
|
+
<div
|
|
4224
|
+
className="shrink-0"
|
|
4225
|
+
data-slide-inline-edit-surface="true"
|
|
4226
|
+
data-slide-context-toolbar-placement="top"
|
|
4201
4227
|
onPointerDownCapture={preserveRichTextSelection}
|
|
4202
4228
|
>
|
|
4203
4229
|
<SlideContextToolbar
|
|
@@ -4209,15 +4235,19 @@ export default function SlideEditor({
|
|
|
4209
4235
|
onBackgroundChange={applySlideBackground}
|
|
4210
4236
|
onArrange={handleArrangeSelected}
|
|
4211
4237
|
onToggleList={handleToggleList}
|
|
4238
|
+
className="slide-context-toolbar--top-row"
|
|
4212
4239
|
/>
|
|
4213
4240
|
</div>
|
|
4214
4241
|
) : null;
|
|
4215
4242
|
|
|
4216
4243
|
return (
|
|
4217
4244
|
<div
|
|
4218
|
-
className="relative flex h-full min-h-0 flex-1 flex-col overflow-hidden"
|
|
4245
|
+
className="relative flex h-full min-h-0 flex-1 flex-col overflow-hidden rounded-l-lg bg-[var(--slides-editor-surface)]"
|
|
4219
4246
|
data-slide-element-selected={slideElementSelected ? "true" : undefined}
|
|
4220
4247
|
>
|
|
4248
|
+
{!readOnly && wideContextToolbarSlot
|
|
4249
|
+
? createPortal(wideContextToolbar, wideContextToolbarSlot)
|
|
4250
|
+
: null}
|
|
4221
4251
|
{contextToolbarSlot
|
|
4222
4252
|
? createPortal(contextToolbar, contextToolbarSlot)
|
|
4223
4253
|
: contextToolbar}
|
|
@@ -4225,7 +4255,7 @@ export default function SlideEditor({
|
|
|
4225
4255
|
<div className="flex min-h-0 flex-1 overflow-hidden">
|
|
4226
4256
|
<div className="min-w-0 flex-1 overflow-hidden">
|
|
4227
4257
|
{slide.excalidrawData ? (
|
|
4228
|
-
<div className="relative h-full bg-
|
|
4258
|
+
<div className="relative h-full bg-[var(--slides-editor-surface)]">
|
|
4229
4259
|
{!readOnly && (
|
|
4230
4260
|
<ExcalidrawExitButton
|
|
4231
4261
|
// JSON.stringify drops `undefined` properties before the patch
|
|
@@ -4245,8 +4275,8 @@ export default function SlideEditor({
|
|
|
4245
4275
|
/>
|
|
4246
4276
|
</div>
|
|
4247
4277
|
) : (
|
|
4248
|
-
<div className="relative h-full bg-
|
|
4249
|
-
<div className="absolute right-3 top-3 z-20 flex h-8 items-center gap-0.5 rounded-md
|
|
4278
|
+
<div className="relative h-full bg-[var(--slides-editor-surface)]">
|
|
4279
|
+
<div className="absolute right-3 top-3 z-20 flex h-8 items-center gap-0.5 rounded-md bg-popover/95 px-1">
|
|
4250
4280
|
<Tooltip>
|
|
4251
4281
|
<TooltipTrigger asChild>
|
|
4252
4282
|
<Button
|
|
@@ -4385,8 +4415,6 @@ export default function SlideEditor({
|
|
|
4385
4415
|
<SpeakerNotesPanel
|
|
4386
4416
|
notes={slide.notes}
|
|
4387
4417
|
onChange={(notes) => onUpdateSlide({ notes })}
|
|
4388
|
-
slideIndex={slideIndex}
|
|
4389
|
-
slideCount={slideCount}
|
|
4390
4418
|
readOnly={readOnly}
|
|
4391
4419
|
/>
|
|
4392
4420
|
|
|
@@ -5,8 +5,6 @@ import { useState, type PointerEvent as ReactPointerEvent } from "react";
|
|
|
5
5
|
interface SpeakerNotesPanelProps {
|
|
6
6
|
notes: string;
|
|
7
7
|
onChange: (notes: string) => void;
|
|
8
|
-
slideIndex: number;
|
|
9
|
-
slideCount: number;
|
|
10
8
|
readOnly?: boolean;
|
|
11
9
|
}
|
|
12
10
|
|
|
@@ -21,16 +19,15 @@ function clampNotesHeight(value: number) {
|
|
|
21
19
|
export function SpeakerNotesPanel({
|
|
22
20
|
notes,
|
|
23
21
|
onChange,
|
|
24
|
-
slideIndex,
|
|
25
|
-
slideCount,
|
|
26
22
|
readOnly = false,
|
|
27
23
|
}: SpeakerNotesPanelProps) {
|
|
28
24
|
const t = useT();
|
|
29
25
|
const [expanded, setExpanded] = useState(() => {
|
|
30
26
|
try {
|
|
31
|
-
return localStorage.getItem("speaker-notes-expanded")
|
|
27
|
+
return localStorage.getItem("speaker-notes-expanded") === "true";
|
|
32
28
|
} catch {
|
|
33
|
-
|
|
29
|
+
// coercion-ok: browser storage is optional; the collapsed state is the default.
|
|
30
|
+
return false;
|
|
34
31
|
}
|
|
35
32
|
});
|
|
36
33
|
const [height, setHeight] = useState(() => {
|
|
@@ -74,7 +71,7 @@ export function SpeakerNotesPanel({
|
|
|
74
71
|
};
|
|
75
72
|
|
|
76
73
|
return (
|
|
77
|
-
<div className="flex-shrink-0
|
|
74
|
+
<div className="flex-shrink-0 bg-[var(--slides-editor-surface)]">
|
|
78
75
|
{expanded && (
|
|
79
76
|
<div
|
|
80
77
|
role="separator"
|
|
@@ -83,7 +80,7 @@ export function SpeakerNotesPanel({
|
|
|
83
80
|
className="group flex h-2 cursor-row-resize items-center justify-center"
|
|
84
81
|
onPointerDown={startResize}
|
|
85
82
|
>
|
|
86
|
-
<div className="h-px w-10 rounded-full bg-
|
|
83
|
+
<div className="h-px w-10 rounded-full bg-muted-foreground/30 transition-colors group-hover:bg-muted-foreground/70" />
|
|
87
84
|
</div>
|
|
88
85
|
)}
|
|
89
86
|
<button
|
|
@@ -91,10 +88,7 @@ export function SpeakerNotesPanel({
|
|
|
91
88
|
className="flex w-full cursor-pointer items-center justify-between px-4 py-1.5"
|
|
92
89
|
>
|
|
93
90
|
<span className="text-[10px] font-medium text-muted-foreground uppercase tracking-wider">
|
|
94
|
-
{t("raw.
|
|
95
|
-
index: slideIndex + 1,
|
|
96
|
-
count: slideCount,
|
|
97
|
-
})}
|
|
91
|
+
{t("raw.speakerNotes")}
|
|
98
92
|
</span>
|
|
99
93
|
{expanded ? (
|
|
100
94
|
<IconChevronDown className="w-3 h-3 text-muted-foreground" />
|