@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
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
IconBrandGoogle,
|
|
14
14
|
IconPlugConnected,
|
|
15
15
|
} from "@tabler/icons-react";
|
|
16
|
-
import { useRef, useState } from "react";
|
|
16
|
+
import { forwardRef, useImperativeHandle, useRef, useState } from "react";
|
|
17
17
|
import { toast } from "sonner";
|
|
18
18
|
|
|
19
19
|
import { Button } from "@/components/ui/button";
|
|
@@ -48,282 +48,319 @@ interface ExportMenuProps {
|
|
|
48
48
|
onExportGoogleSlides?: () => Promise<GoogleSlidesExportResult>;
|
|
49
49
|
onShareLink?: () => void;
|
|
50
50
|
onShareTeam?: () => void;
|
|
51
|
+
/** Render the export actions inside an existing dropdown menu. */
|
|
52
|
+
inline?: boolean;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
export
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
onExportGoogleSlides,
|
|
60
|
-
onShareLink,
|
|
61
|
-
onShareTeam,
|
|
62
|
-
}: ExportMenuProps) {
|
|
63
|
-
const t = useT();
|
|
64
|
-
const [googleSlidesImportOpen, setGoogleSlidesImportOpen] = useState(false);
|
|
65
|
-
const googleSlidesImportTarget = useRef<Window | null>(null);
|
|
66
|
-
const triggerBlobDownload = (blob: Blob, filename: string) => {
|
|
67
|
-
const url = URL.createObjectURL(blob);
|
|
68
|
-
const a = document.createElement("a");
|
|
69
|
-
a.href = url;
|
|
70
|
-
a.download = filename;
|
|
71
|
-
a.rel = "noopener";
|
|
72
|
-
document.body.appendChild(a);
|
|
73
|
-
a.click();
|
|
74
|
-
a.remove();
|
|
75
|
-
window.setTimeout(() => URL.revokeObjectURL(url), 60_000);
|
|
76
|
-
};
|
|
55
|
+
export interface ExportMenuHandle {
|
|
56
|
+
connectGoogle: () => Promise<void>;
|
|
57
|
+
exportGoogleSlides: () => Promise<void>;
|
|
58
|
+
exportHtml: () => Promise<void>;
|
|
59
|
+
exportPptx: () => Promise<void>;
|
|
60
|
+
}
|
|
77
61
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
62
|
+
export const ExportMenu = forwardRef<ExportMenuHandle, ExportMenuProps>(
|
|
63
|
+
function ExportMenu(
|
|
64
|
+
{
|
|
65
|
+
deckId,
|
|
66
|
+
deckTitle,
|
|
67
|
+
onDuplicate,
|
|
68
|
+
onExportPdf,
|
|
69
|
+
onExportPptx,
|
|
70
|
+
onExportGoogleSlides,
|
|
71
|
+
onShareLink,
|
|
72
|
+
onShareTeam,
|
|
73
|
+
inline = false,
|
|
74
|
+
},
|
|
75
|
+
ref,
|
|
76
|
+
) {
|
|
77
|
+
const t = useT();
|
|
78
|
+
const [googleSlidesImportOpen, setGoogleSlidesImportOpen] = useState(false);
|
|
79
|
+
const googleSlidesImportTarget = useRef<Window | null>(null);
|
|
80
|
+
const triggerBlobDownload = (blob: Blob, filename: string) => {
|
|
81
|
+
const url = URL.createObjectURL(blob);
|
|
82
|
+
const a = document.createElement("a");
|
|
83
|
+
a.href = url;
|
|
84
|
+
a.download = filename;
|
|
85
|
+
a.rel = "noopener";
|
|
86
|
+
document.body.appendChild(a);
|
|
87
|
+
a.click();
|
|
88
|
+
a.remove();
|
|
89
|
+
window.setTimeout(() => URL.revokeObjectURL(url), 60_000);
|
|
90
|
+
};
|
|
86
91
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
const filenameFromDisposition = (
|
|
93
|
+
value: string | null,
|
|
94
|
+
fallbackExt: string,
|
|
95
|
+
) => {
|
|
96
|
+
const match = value?.match(/filename="?([^"]+)"?/i);
|
|
97
|
+
const fallback = deckTitle.replace(/[^a-zA-Z0-9_-]/g, "-") || "deck";
|
|
98
|
+
return match?.[1] ?? `${fallback}${fallbackExt}`;
|
|
99
|
+
};
|
|
95
100
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
? err.message
|
|
105
|
-
: t("editorExport.exportPptxError"),
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
};
|
|
101
|
+
const readErrorMessage = async (res: Response, fallback: string) => {
|
|
102
|
+
try {
|
|
103
|
+
const data = await res.json();
|
|
104
|
+
return data.error || data.message || fallback;
|
|
105
|
+
} catch {
|
|
106
|
+
return fallback;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
if (target) target.location.href = result.url;
|
|
121
|
-
toast.success(t("editorExport.googleSlidesCreated"), {
|
|
122
|
-
description: t("editorExport.googleSlidesCreatedHint"),
|
|
110
|
+
const handleExportPptx = async () => {
|
|
111
|
+
try {
|
|
112
|
+
await onExportPptx();
|
|
113
|
+
} catch (err) {
|
|
114
|
+
console.error("Export failed:", err);
|
|
115
|
+
toast.error(t("editorExport.exportFailed"), {
|
|
116
|
+
description:
|
|
117
|
+
err instanceof Error
|
|
118
|
+
? err.message
|
|
119
|
+
: t("editorExport.exportPptxError"),
|
|
123
120
|
});
|
|
124
|
-
return;
|
|
125
121
|
}
|
|
126
|
-
|
|
127
|
-
setGoogleSlidesImportOpen(true);
|
|
128
|
-
// The deck did not reach Drive. Saying "success" here is why users read
|
|
129
|
-
// the .pptx download as the intended result and never learn that their
|
|
130
|
-
// Google account is unconnected or that Drive rejected the upload.
|
|
131
|
-
toast.warning(t("editorExport.googleSlidesDownloaded"), {
|
|
132
|
-
description: `${result.reason} ${t("editorExport.googleSlidesImportHint")}`,
|
|
133
|
-
});
|
|
134
|
-
} catch (err) {
|
|
135
|
-
googleSlidesImportTarget.current = null;
|
|
136
|
-
target?.close();
|
|
137
|
-
console.error("Export failed:", err);
|
|
138
|
-
toast.error(t("editorExport.exportFailed"), {
|
|
139
|
-
description:
|
|
140
|
-
err instanceof Error
|
|
141
|
-
? err.message
|
|
142
|
-
: t("editorExport.exportGoogleSlidesError"),
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
};
|
|
122
|
+
};
|
|
146
123
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
124
|
+
const handleExportGoogleSlides = async () => {
|
|
125
|
+
if (!onExportGoogleSlides) return;
|
|
126
|
+
// Opened up-front: browsers only honour window.open() inside the click
|
|
127
|
+
// gesture, and building the PPTX is async.
|
|
128
|
+
const target = window.open("", "_blank");
|
|
129
|
+
googleSlidesImportTarget.current = target;
|
|
130
|
+
try {
|
|
131
|
+
const result = await onExportGoogleSlides();
|
|
132
|
+
if (result.url !== null) {
|
|
133
|
+
googleSlidesImportTarget.current = null;
|
|
134
|
+
if (target) target.location.href = result.url;
|
|
135
|
+
toast.success(t("editorExport.googleSlidesCreated"), {
|
|
136
|
+
description: t("editorExport.googleSlidesCreatedHint"),
|
|
137
|
+
});
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
if (target) target.location.href = GOOGLE_SLIDES_IMPORT_URL;
|
|
141
|
+
setGoogleSlidesImportOpen(true);
|
|
142
|
+
// The deck did not reach Drive. Saying "success" here is why users read
|
|
143
|
+
// the .pptx download as the intended result and never learn that their
|
|
144
|
+
// Google account is unconnected or that Drive rejected the upload.
|
|
145
|
+
toast.warning(t("editorExport.googleSlidesDownloaded"), {
|
|
146
|
+
description: `${result.reason} ${t("editorExport.googleSlidesImportHint")}`,
|
|
147
|
+
});
|
|
148
|
+
} catch (err) {
|
|
149
|
+
googleSlidesImportTarget.current = null;
|
|
150
|
+
target?.close();
|
|
151
|
+
console.error("Export failed:", err);
|
|
152
|
+
toast.error(t("editorExport.exportFailed"), {
|
|
153
|
+
description:
|
|
154
|
+
err instanceof Error
|
|
155
|
+
? err.message
|
|
156
|
+
: t("editorExport.exportGoogleSlidesError"),
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
};
|
|
156
160
|
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
161
|
+
const handleConnectGoogle = async () => {
|
|
162
|
+
const authUrl = new URL(
|
|
163
|
+
agentNativePath("/_agent-native/google-docs/auth-url"),
|
|
164
|
+
window.location.origin,
|
|
165
|
+
);
|
|
166
|
+
authUrl.searchParams.set(
|
|
167
|
+
"return",
|
|
168
|
+
window.location.pathname + window.location.search,
|
|
169
|
+
);
|
|
168
170
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
);
|
|
171
|
+
const popup = window.open(
|
|
172
|
+
"",
|
|
173
|
+
"google-docs-oauth",
|
|
174
|
+
"popup,width=520,height=720",
|
|
175
|
+
);
|
|
176
|
+
if (!popup) {
|
|
177
|
+
toast.error(t("editorExport.exportFailed"), {
|
|
178
|
+
description: t("editorExport.exportGoogleSlidesError"),
|
|
179
|
+
});
|
|
180
|
+
return;
|
|
180
181
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
|
|
183
|
+
try {
|
|
184
|
+
const response = await fetch(authUrl.toString(), {
|
|
185
|
+
credentials: "same-origin",
|
|
186
|
+
});
|
|
187
|
+
if (!response.ok) {
|
|
188
|
+
throw new Error(
|
|
189
|
+
await readErrorMessage(
|
|
190
|
+
response,
|
|
191
|
+
t("editorExport.exportGoogleSlidesError"),
|
|
192
|
+
),
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
const data = (await response.json()) as { url?: unknown };
|
|
196
|
+
if (typeof data.url !== "string") {
|
|
197
|
+
throw new Error(t("editorExport.exportGoogleSlidesError"));
|
|
198
|
+
}
|
|
199
|
+
popup.location.href = data.url;
|
|
200
|
+
} catch (err) {
|
|
201
|
+
popup?.close();
|
|
202
|
+
console.error("Google connection failed:", err);
|
|
203
|
+
toast.error(t("editorExport.exportFailed"), {
|
|
204
|
+
description:
|
|
205
|
+
err instanceof Error
|
|
206
|
+
? err.message
|
|
207
|
+
: t("editorExport.exportGoogleSlidesError"),
|
|
208
|
+
});
|
|
184
209
|
}
|
|
185
|
-
|
|
186
|
-
} catch (err) {
|
|
187
|
-
popup?.close();
|
|
188
|
-
console.error("Google connection failed:", err);
|
|
189
|
-
toast.error(t("editorExport.exportFailed"), {
|
|
190
|
-
description:
|
|
191
|
-
err instanceof Error
|
|
192
|
-
? err.message
|
|
193
|
-
: t("editorExport.exportGoogleSlidesError"),
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
};
|
|
210
|
+
};
|
|
197
211
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
212
|
+
const handleExportHtml = async () => {
|
|
213
|
+
try {
|
|
214
|
+
const res = await fetch(`${appBasePath()}/api/exports/html`, {
|
|
215
|
+
method: "POST",
|
|
216
|
+
headers: { "Content-Type": "application/json" },
|
|
217
|
+
body: JSON.stringify({ deckId }),
|
|
218
|
+
});
|
|
219
|
+
if (!res.ok) {
|
|
220
|
+
throw new Error(
|
|
221
|
+
await readErrorMessage(res, t("editorExport.htmlFailed")),
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
const blob = await res.blob();
|
|
225
|
+
const filename = filenameFromDisposition(
|
|
226
|
+
res.headers.get("content-disposition"),
|
|
227
|
+
".html",
|
|
208
228
|
);
|
|
229
|
+
triggerBlobDownload(blob, filename);
|
|
230
|
+
} catch (err) {
|
|
231
|
+
console.error("Export failed:", err);
|
|
232
|
+
toast.error(t("editorExport.exportFailed"), {
|
|
233
|
+
description:
|
|
234
|
+
err instanceof Error
|
|
235
|
+
? err.message
|
|
236
|
+
: t("editorExport.exportHtmlError"),
|
|
237
|
+
});
|
|
209
238
|
}
|
|
210
|
-
|
|
211
|
-
const filename = filenameFromDisposition(
|
|
212
|
-
res.headers.get("content-disposition"),
|
|
213
|
-
".html",
|
|
214
|
-
);
|
|
215
|
-
triggerBlobDownload(blob, filename);
|
|
216
|
-
} catch (err) {
|
|
217
|
-
console.error("Export failed:", err);
|
|
218
|
-
toast.error(t("editorExport.exportFailed"), {
|
|
219
|
-
description:
|
|
220
|
-
err instanceof Error
|
|
221
|
-
? err.message
|
|
222
|
-
: t("editorExport.exportHtmlError"),
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
};
|
|
239
|
+
};
|
|
226
240
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
{
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
<DropdownMenuSeparator />
|
|
253
|
-
<DropdownMenuItem
|
|
254
|
-
onClick={handleExportHtml}
|
|
255
|
-
className="cursor-pointer"
|
|
256
|
-
>
|
|
257
|
-
<IconCode className="w-4 h-4 mr-2" />
|
|
258
|
-
{t("editorExport.downloadHtml")}
|
|
259
|
-
</DropdownMenuItem>
|
|
260
|
-
<DropdownMenuItem onClick={onExportPdf} className="cursor-pointer">
|
|
261
|
-
<IconFileTypePdf className="w-4 h-4 mr-2" />
|
|
262
|
-
{t("editorExport.exportPdf")}
|
|
263
|
-
</DropdownMenuItem>
|
|
264
|
-
<DropdownMenuItem
|
|
265
|
-
onClick={handleExportPptx}
|
|
266
|
-
className="cursor-pointer"
|
|
267
|
-
>
|
|
268
|
-
<IconDownload className="w-4 h-4 mr-2" />
|
|
269
|
-
{t("editorExport.exportPptx")}
|
|
241
|
+
useImperativeHandle(
|
|
242
|
+
ref,
|
|
243
|
+
() => ({
|
|
244
|
+
connectGoogle: handleConnectGoogle,
|
|
245
|
+
exportGoogleSlides: handleExportGoogleSlides,
|
|
246
|
+
exportHtml: handleExportHtml,
|
|
247
|
+
exportPptx: handleExportPptx,
|
|
248
|
+
}),
|
|
249
|
+
[
|
|
250
|
+
handleConnectGoogle,
|
|
251
|
+
handleExportGoogleSlides,
|
|
252
|
+
handleExportHtml,
|
|
253
|
+
handleExportPptx,
|
|
254
|
+
],
|
|
255
|
+
);
|
|
256
|
+
|
|
257
|
+
const menuContent = (
|
|
258
|
+
<>
|
|
259
|
+
<DropdownMenuLabel className="text-[11px] text-muted-foreground">
|
|
260
|
+
{t("editorExport.exportAndDuplicate")}
|
|
261
|
+
</DropdownMenuLabel>
|
|
262
|
+
{onShareTeam && (
|
|
263
|
+
<DropdownMenuItem onClick={onShareTeam} className="cursor-pointer">
|
|
264
|
+
<IconShare2 className="w-4 h-4 mr-2" />
|
|
265
|
+
{t("editorExport.shareWithTeam")}
|
|
270
266
|
</DropdownMenuItem>
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
>
|
|
277
|
-
<IconPlugConnected className="w-4 h-4 mr-2" />
|
|
278
|
-
{t("editorExport.connectGoogle")}
|
|
279
|
-
</DropdownMenuItem>
|
|
280
|
-
<DropdownMenuItem
|
|
281
|
-
onClick={handleExportGoogleSlides}
|
|
282
|
-
className="cursor-pointer"
|
|
283
|
-
>
|
|
284
|
-
<IconBrandGoogle className="w-4 h-4 mr-2" />
|
|
285
|
-
{t("editorExport.openInGoogleSlides")}
|
|
286
|
-
</DropdownMenuItem>
|
|
287
|
-
</>
|
|
288
|
-
)}
|
|
289
|
-
<DropdownMenuSeparator />
|
|
290
|
-
<DropdownMenuItem onClick={onDuplicate} className="cursor-pointer">
|
|
291
|
-
<IconCopy className="w-4 h-4 mr-2" />
|
|
292
|
-
{t("editorExport.duplicateDeck")}
|
|
267
|
+
)}
|
|
268
|
+
{onShareLink && (
|
|
269
|
+
<DropdownMenuItem onClick={onShareLink} className="cursor-pointer">
|
|
270
|
+
<IconShare2 className="w-4 h-4 mr-2" />
|
|
271
|
+
{t("editorExport.publicShareLink")}
|
|
293
272
|
</DropdownMenuItem>
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
<
|
|
301
|
-
<
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
<
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
}}
|
|
273
|
+
)}
|
|
274
|
+
<DropdownMenuSeparator />
|
|
275
|
+
<DropdownMenuItem onClick={handleExportHtml} className="cursor-pointer">
|
|
276
|
+
<IconCode className="w-4 h-4 mr-2" />
|
|
277
|
+
{t("editorExport.downloadHtml")}
|
|
278
|
+
</DropdownMenuItem>
|
|
279
|
+
<DropdownMenuItem onClick={onExportPdf} className="cursor-pointer">
|
|
280
|
+
<IconFileTypePdf className="w-4 h-4 mr-2" />
|
|
281
|
+
{t("editorExport.exportPdf")}
|
|
282
|
+
</DropdownMenuItem>
|
|
283
|
+
<DropdownMenuItem onClick={handleExportPptx} className="cursor-pointer">
|
|
284
|
+
<IconDownload className="w-4 h-4 mr-2" />
|
|
285
|
+
{t("editorExport.exportPptx")}
|
|
286
|
+
</DropdownMenuItem>
|
|
287
|
+
{onExportGoogleSlides && (
|
|
288
|
+
<>
|
|
289
|
+
<DropdownMenuItem
|
|
290
|
+
onClick={handleConnectGoogle}
|
|
291
|
+
className="cursor-pointer"
|
|
292
|
+
>
|
|
293
|
+
<IconPlugConnected className="w-4 h-4 mr-2" />
|
|
294
|
+
{t("editorExport.connectGoogle")}
|
|
295
|
+
</DropdownMenuItem>
|
|
296
|
+
<DropdownMenuItem
|
|
297
|
+
onClick={handleExportGoogleSlides}
|
|
298
|
+
className="cursor-pointer"
|
|
321
299
|
>
|
|
300
|
+
<IconBrandGoogle className="w-4 h-4 mr-2" />
|
|
322
301
|
{t("editorExport.openInGoogleSlides")}
|
|
323
|
-
</
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
302
|
+
</DropdownMenuItem>
|
|
303
|
+
</>
|
|
304
|
+
)}
|
|
305
|
+
<DropdownMenuSeparator />
|
|
306
|
+
<DropdownMenuItem onClick={onDuplicate} className="cursor-pointer">
|
|
307
|
+
<IconCopy className="w-4 h-4 mr-2" />
|
|
308
|
+
{t("editorExport.duplicateDeck")}
|
|
309
|
+
</DropdownMenuItem>
|
|
310
|
+
</>
|
|
311
|
+
);
|
|
312
|
+
|
|
313
|
+
return (
|
|
314
|
+
<>
|
|
315
|
+
{inline ? (
|
|
316
|
+
menuContent
|
|
317
|
+
) : (
|
|
318
|
+
<DropdownMenu>
|
|
319
|
+
<DropdownMenuTrigger asChild>
|
|
320
|
+
<button className="flex items-center gap-1.5 px-2.5 py-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-accent text-xs cursor-pointer whitespace-nowrap">
|
|
321
|
+
<IconUpload className="w-3.5 h-3.5" />
|
|
322
|
+
<span className="hidden md:inline">
|
|
323
|
+
{t("editorExport.export")}
|
|
324
|
+
</span>
|
|
325
|
+
</button>
|
|
326
|
+
</DropdownMenuTrigger>
|
|
327
|
+
<DropdownMenuContent align="end" className="w-52">
|
|
328
|
+
{menuContent}
|
|
329
|
+
</DropdownMenuContent>
|
|
330
|
+
</DropdownMenu>
|
|
331
|
+
)}
|
|
332
|
+
<Dialog
|
|
333
|
+
open={googleSlidesImportOpen}
|
|
334
|
+
onOpenChange={setGoogleSlidesImportOpen}
|
|
335
|
+
>
|
|
336
|
+
<DialogContent>
|
|
337
|
+
<DialogHeader>
|
|
338
|
+
<DialogTitle>
|
|
339
|
+
{t("editorExport.googleSlidesDownloaded")}
|
|
340
|
+
</DialogTitle>
|
|
341
|
+
<DialogDescription>
|
|
342
|
+
{t("editorExport.googleSlidesImportHint")}
|
|
343
|
+
</DialogDescription>
|
|
344
|
+
</DialogHeader>
|
|
345
|
+
<DialogFooter>
|
|
346
|
+
<Button
|
|
347
|
+
type="button"
|
|
348
|
+
onClick={() => {
|
|
349
|
+
const target = googleSlidesImportTarget.current;
|
|
350
|
+
if (target && !target.closed) {
|
|
351
|
+
target.focus?.();
|
|
352
|
+
} else {
|
|
353
|
+
window.open(GOOGLE_SLIDES_IMPORT_URL, "_blank");
|
|
354
|
+
}
|
|
355
|
+
setGoogleSlidesImportOpen(false);
|
|
356
|
+
}}
|
|
357
|
+
>
|
|
358
|
+
{t("editorExport.openInGoogleSlides")}
|
|
359
|
+
</Button>
|
|
360
|
+
</DialogFooter>
|
|
361
|
+
</DialogContent>
|
|
362
|
+
</Dialog>
|
|
363
|
+
</>
|
|
364
|
+
);
|
|
365
|
+
},
|
|
366
|
+
);
|
|
@@ -69,7 +69,7 @@ export default function GeneratingSlidePreview({
|
|
|
69
69
|
<span className="size-1.5 rounded-full bg-primary" aria-hidden="true" />
|
|
70
70
|
{t("raw.aiEditing")}
|
|
71
71
|
</div>
|
|
72
|
-
<div className="absolute right-2 top-2 rounded-full bg-background/80 p-1.5 text-muted-foreground shadow-sm
|
|
72
|
+
<div className="absolute right-2 top-2 rounded-full bg-background/80 p-1.5 text-muted-foreground shadow-sm">
|
|
73
73
|
<IconLoader2 className="size-3.5 animate-spin" aria-hidden="true" />
|
|
74
74
|
</div>
|
|
75
75
|
</div>
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
IconBrandGoogleDrive,
|
|
6
6
|
IconLoader2,
|
|
7
7
|
IconPlugConnected,
|
|
8
|
+
IconX,
|
|
8
9
|
} from "@tabler/icons-react";
|
|
9
10
|
import { useCallback, useEffect, useState } from "react";
|
|
10
11
|
|
|
@@ -65,6 +66,7 @@ export function GoogleDriveConnectionCta({
|
|
|
65
66
|
const [loading, setLoading] = useState(true);
|
|
66
67
|
const [connecting, setConnecting] = useState(false);
|
|
67
68
|
const [error, setError] = useState<string | null>(null);
|
|
69
|
+
const [dismissed, setDismissed] = useState(false);
|
|
68
70
|
|
|
69
71
|
const refreshStatus =
|
|
70
72
|
useCallback(async (): Promise<GoogleDocsStatus | null> => {
|
|
@@ -165,7 +167,9 @@ export function GoogleDriveConnectionCta({
|
|
|
165
167
|
}
|
|
166
168
|
}, [connecting, onConnected, refreshStatus, requiresUrlImportAccess]);
|
|
167
169
|
|
|
168
|
-
if (loading || (status?.connected && !needsReconnect))
|
|
170
|
+
if (dismissed || loading || (status?.connected && !needsReconnect)) {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
169
173
|
|
|
170
174
|
const displayStatus = status ?? { configured: false, connected: false };
|
|
171
175
|
|
|
@@ -208,6 +212,14 @@ export function GoogleDriveConnectionCta({
|
|
|
208
212
|
: t("editorExport.connectGoogle")}
|
|
209
213
|
</Button>
|
|
210
214
|
)}
|
|
215
|
+
<button
|
|
216
|
+
type="button"
|
|
217
|
+
onClick={() => setDismissed(true)}
|
|
218
|
+
className="inline-flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
219
|
+
aria-label={t("comments.close")}
|
|
220
|
+
>
|
|
221
|
+
<IconX className="size-3.5" />
|
|
222
|
+
</button>
|
|
211
223
|
</div>
|
|
212
224
|
);
|
|
213
225
|
}
|