@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
|
@@ -21,6 +21,11 @@ export function useGeneratingSlidePreview({
|
|
|
21
21
|
const [content, setContent] = useState<string | null>(null);
|
|
22
22
|
const activeCallIdRef = useRef<string | null>(null);
|
|
23
23
|
const previousSlideCountRef = useRef(slideCount);
|
|
24
|
+
// Latest parsed value awaiting a flush; setContent fires at most once per frame
|
|
25
|
+
// and always reads this ref, so a burst of deltas within one frame collapses
|
|
26
|
+
// to a single render carrying the newest value instead of the stale one.
|
|
27
|
+
const pendingContentRef = useRef<string | null>(null);
|
|
28
|
+
const rafIdRef = useRef<number | null>(null);
|
|
24
29
|
|
|
25
30
|
useEffect(() => {
|
|
26
31
|
if (slideCount !== previousSlideCountRef.current) {
|
|
@@ -37,6 +42,18 @@ export function useGeneratingSlidePreview({
|
|
|
37
42
|
return;
|
|
38
43
|
}
|
|
39
44
|
|
|
45
|
+
const flush = () => {
|
|
46
|
+
rafIdRef.current = null;
|
|
47
|
+
setContent(pendingContentRef.current);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const scheduleFlush = (value: string | null) => {
|
|
51
|
+
pendingContentRef.current = value;
|
|
52
|
+
if (rafIdRef.current === null) {
|
|
53
|
+
rafIdRef.current = requestAnimationFrame(flush);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
40
57
|
const handleToolInput = (event: Event) => {
|
|
41
58
|
const detail = (event as CustomEvent<ToolInputEventDetail>).detail;
|
|
42
59
|
if (detail?.tool !== "add-slide") return;
|
|
@@ -47,7 +64,7 @@ export function useGeneratingSlidePreview({
|
|
|
47
64
|
if (detail.phase === "start") {
|
|
48
65
|
if (detail.id && activeCallIdRef.current === detail.id) return;
|
|
49
66
|
activeCallIdRef.current = detail.id ?? null;
|
|
50
|
-
|
|
67
|
+
scheduleFlush(null);
|
|
51
68
|
return;
|
|
52
69
|
}
|
|
53
70
|
|
|
@@ -60,13 +77,18 @@ export function useGeneratingSlidePreview({
|
|
|
60
77
|
}
|
|
61
78
|
if (detail.id) activeCallIdRef.current = detail.id;
|
|
62
79
|
if (parsed.content !== undefined) {
|
|
63
|
-
|
|
80
|
+
scheduleFlush(parsed.content || null);
|
|
64
81
|
}
|
|
65
82
|
};
|
|
66
83
|
|
|
67
84
|
window.addEventListener("agent-native:tool-input", handleToolInput);
|
|
68
|
-
return () =>
|
|
85
|
+
return () => {
|
|
69
86
|
window.removeEventListener("agent-native:tool-input", handleToolInput);
|
|
87
|
+
if (rafIdRef.current !== null) {
|
|
88
|
+
cancelAnimationFrame(rafIdRef.current);
|
|
89
|
+
rafIdRef.current = null;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
70
92
|
}, [deckId, generating]);
|
|
71
93
|
|
|
72
94
|
return content;
|
|
@@ -659,6 +659,7 @@ const messages = {
|
|
|
659
659
|
deckCount_other: "decks",
|
|
660
660
|
createDeckOrVisual: "Create a presentation",
|
|
661
661
|
noMineDecks: "No decks created by you yet.",
|
|
662
|
+
noDecksMatchSearch: "No decks match your search.",
|
|
662
663
|
deleteDeckTitle: "Delete Deck?",
|
|
663
664
|
deleteDeckDescription:
|
|
664
665
|
"This will permanently delete this deck and all its slides. This action cannot be undone.",
|
|
@@ -689,6 +690,7 @@ const messages = {
|
|
|
689
690
|
"Keep the default design system and reference deck unless you remove them. Search for another deck, import a file, or continue when you're ready.",
|
|
690
691
|
chooseAnotherDeck: "Choose another deck",
|
|
691
692
|
noMatchingDecks: "No matching decks found.",
|
|
693
|
+
googleSlidesImportLabel: "Slides",
|
|
692
694
|
googleSlidesReferenceTitle: "Google Slides",
|
|
693
695
|
googleSlidesReferenceConnect:
|
|
694
696
|
"Connect Google Drive to import a Slides deck.",
|
|
@@ -91,6 +91,30 @@ async function loadReferenceDeckGenerationContext(
|
|
|
91
91
|
].join("\n");
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
export function isSourceImprovementRequest(
|
|
95
|
+
prompt: string,
|
|
96
|
+
files: UploadedFile[],
|
|
97
|
+
): boolean {
|
|
98
|
+
const hasSourceDeck = files.some((file) =>
|
|
99
|
+
/\.(pptx|pdf)$/i.test(file.originalName),
|
|
100
|
+
);
|
|
101
|
+
if (!hasSourceDeck) return false;
|
|
102
|
+
|
|
103
|
+
const normalized = prompt.toLowerCase();
|
|
104
|
+
const asksToImprove =
|
|
105
|
+
/\b(restyl\w*|redesign\w*|rebrand\w*|revamp\w*|rework\w*|moderni[sz]\w*|refresh\w*|polish\w*|improv\w*|updat\w*|revis\w*|edit\w*)\b/.test(
|
|
106
|
+
normalized,
|
|
107
|
+
) ||
|
|
108
|
+
/\bmake\b[\s\S]{0,40}\b(better|modern|professional|polished|prett\w*)\b/.test(
|
|
109
|
+
normalized,
|
|
110
|
+
);
|
|
111
|
+
// A source deck attachment is the object being improved even when the
|
|
112
|
+
// prompt uses an implicit phrase such as "make this prettier". Requiring a
|
|
113
|
+
// source noun here silently falls back to reference-only generation and can
|
|
114
|
+
// discard the uploaded deck's slide IDs and content.
|
|
115
|
+
return asksToImprove;
|
|
116
|
+
}
|
|
117
|
+
|
|
94
118
|
function describeUploadedFilesForAgent(
|
|
95
119
|
files: UploadedFile[],
|
|
96
120
|
deckId: string,
|
|
@@ -103,25 +127,26 @@ function describeUploadedFilesForAgent(
|
|
|
103
127
|
`- ${file.originalName} (${file.type}, ${(file.size / 1024).toFixed(1)}KB) at path: ${file.path}${file.url ? `; embeddable URL: ${file.url}` : ""}`,
|
|
104
128
|
)
|
|
105
129
|
.join("\n");
|
|
106
|
-
const sourceFile = importedSourceDeck?.file;
|
|
107
130
|
return [
|
|
108
131
|
"",
|
|
109
132
|
importedSourceDeck
|
|
110
|
-
? `The user uploaded ${files.length} file(s). The ${
|
|
111
|
-
: `The user
|
|
133
|
+
? `The user uploaded ${files.length} file(s). The ${importedSourceDeck.file.originalName} source deck has already been imported into target deck ${deckId} with ${importedSourceDeck.slideCount} source slide(s); do not import it again.`
|
|
134
|
+
: `The user attached ${files.length} file(s) as reference material for this new deck. Attachments are context for the agent by default; do not import or append their slides to target deck ${deckId} merely because they were attached.`,
|
|
112
135
|
fileList,
|
|
113
136
|
"",
|
|
114
137
|
"File handling rules:",
|
|
115
138
|
importedSourceDeck
|
|
116
|
-
? "- The imported source deck is
|
|
117
|
-
: `- PPTX files: call \`import-
|
|
139
|
+
? "- The imported source deck is canonical. Preserve its slide count, order, IDs, factual copy, notes, imagery, charts, tables, diagrams, and freeform objects while improving styling. For a deck-wide restyle, use one patch-deck call with requireAllSourceSlides=true; use update-slide only for a targeted one-slide edit. Do not rebuild it with add-slide."
|
|
140
|
+
: `- PDF, PPTX, and DOCX files: call \`import-file --filePath \"<path>\" --format auto\` (without \`importIntoDeck\`) when you need their text or structure. Use the returned material as reference while creating new slides with \`add-slide\`.`,
|
|
118
141
|
importedSourceDeck
|
|
119
142
|
? "- For a PDF source, keep the original full-page image in every slide and add restrained design-system chrome around it without obscuring source content. Never OCR-reconstruct a source-faithful page from extracted text."
|
|
120
|
-
:
|
|
143
|
+
: "- Do not pass `importIntoDeck: true` for an attached file unless the user explicitly asks to import or preserve the source pages in the current deck. An attached reference is not an instruction to replace or seed the deck.",
|
|
121
144
|
"- Text-like files: use the uploaded-text-file blocks already included in the prompt; do not call import-file for them.",
|
|
122
145
|
'- Image files with an embeddable URL are mandatory assets: if the user specified where to use one (e.g. "on the first and last slide"), embed it there with `<img src="...">` exactly as requested. Do not omit a requested image and continue silently — if it truly cannot be placed, say why in your final chat response.',
|
|
123
146
|
"- Image files without a URL are visual/reference assets only; do not claim to have processed a PPTX/PDF/DOCX unless the relevant import action succeeds.",
|
|
124
|
-
|
|
147
|
+
importedSourceDeck
|
|
148
|
+
? "- Before your final response, verify the same source slide IDs and count with get-deck after the restyle. If source fidelity is partial or images were skipped, report the exact warning instead of claiming success."
|
|
149
|
+
: "- Before your final response, verify every uploaded file above was either used as reference or placed as explicitly requested. If any file's content or requested placement is missing from the deck, say so explicitly instead of reporting success.",
|
|
125
150
|
].join("\n");
|
|
126
151
|
}
|
|
127
152
|
|
|
@@ -179,7 +204,7 @@ export interface StartDeckGenerationOptions {
|
|
|
179
204
|
files: UploadedFile[],
|
|
180
205
|
failure: DeckPersistenceResult,
|
|
181
206
|
) => void;
|
|
182
|
-
onSetupFailure
|
|
207
|
+
onSetupFailure?: (
|
|
183
208
|
prompt: string,
|
|
184
209
|
files: UploadedFile[],
|
|
185
210
|
failure: unknown,
|
|
@@ -248,15 +273,17 @@ export async function startDeckGeneration({
|
|
|
248
273
|
}
|
|
249
274
|
|
|
250
275
|
let importedSourceDeck: ImportedSourceDeck | null = null;
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
276
|
+
if (isSourceImprovementRequest(prompt, filesForGeneration)) {
|
|
277
|
+
try {
|
|
278
|
+
importedSourceDeck = await importUploadedDeckIntoDeck(
|
|
279
|
+
filesForGeneration,
|
|
280
|
+
deckId,
|
|
281
|
+
);
|
|
282
|
+
} catch (error) {
|
|
283
|
+
deleteDeck(deckId);
|
|
284
|
+
onSetupFailure?.(prompt, filesForGeneration, error);
|
|
285
|
+
return "failed";
|
|
286
|
+
}
|
|
260
287
|
}
|
|
261
288
|
|
|
262
289
|
onPromptClosed();
|
|
@@ -324,19 +351,21 @@ export async function startDeckGeneration({
|
|
|
324
351
|
"Source-preserving improvement mode:",
|
|
325
352
|
`- The target deck already contains ${importedSourceDeck.slideCount} imported source slides. Treat those slides as the user's complete source, not as inspiration for a new deck.`,
|
|
326
353
|
"- Keep the exact source slide count, order, IDs, factual meaning, notes, images, charts, tables, diagrams, and freeform objects unless the user explicitly asks to change one of them.",
|
|
327
|
-
"- Read
|
|
328
|
-
"- Do not call
|
|
329
|
-
|
|
354
|
+
"- Read get-deck once before editing to obtain every existing slide ID and source HTML, load the linked design system with get-design-system, then make a deck-wide restyle with one patch-deck call using requireAllSourceSlides=true and one patch-slide operation with fields.content for every source slide ID. Do not split a full-deck restyle into arbitrary batches or fall back to one-by-one update-slide calls; use update-slide only for a targeted one-slide edit. Keep every original image source and enough original factual copy for each slide; for PDF slides, use restrained design-system chrome around the page without obscuring it.",
|
|
355
|
+
"- Do not call add-slide, delete slides, reorder slides, or replace source images with generic cards. Do not claim success until get-deck verifies the same slide IDs and count after the edits.",
|
|
356
|
+
'- After the patch succeeds, verify with get-deck using compact: "true" so only slide IDs, count, and previews are returned. Do not report an initial or partial pass, and do not leave any source slides for a later run.',
|
|
357
|
+
"- If get-deck reports partial source fidelity or skipped images, stop and report the exact warning instead of claiming a reliable restyle.",
|
|
330
358
|
].join("\n")
|
|
331
359
|
: "";
|
|
332
360
|
const sourceModeInstructions = importedSourceDeck
|
|
333
361
|
? [
|
|
334
362
|
"The request is an in-place visual improvement of an imported source deck. Make a coherent style pass across every existing slide while preserving all source content and media.",
|
|
335
|
-
"Do not use the new-deck add-slide workflow for this source-preserving request.",
|
|
336
|
-
]
|
|
363
|
+
"Do not use the new-deck add-slide workflow for this source-preserving request. Finish every source slide in this run; if patch-deck rejects incomplete coverage, continue with the returned missing IDs instead of reporting success with a partial deck.",
|
|
364
|
+
].join("\n")
|
|
337
365
|
: [
|
|
366
|
+
"This is a new deck. Keep it empty until generation begins; attached reference files must not seed it with imported slides.",
|
|
338
367
|
"Start a `manage-progress` run so progress appears in the app header. Add the first slide as soon as it is ready, then continue one slide at a time so the editor visibly fills in.",
|
|
339
|
-
`After reading any requested or
|
|
368
|
+
`After reading any requested or attached reference material, but before adding the first slide, choose a concise, specific deck title from the user's request and source material. Never use the deck id, run id, file id, or another opaque alphanumeric token as the title. Call \`patch-deck\` with \`deckId: \"${deckId}\"\` and \`operations: [{ \"op\": \"patch-deck-fields\", \"fields\": { \"title\": \"<generated title>\" } }]\`. Include only \`title\` in \`fields\`; omit all other optional fields. Never leave a generated deck named \"Untitled Deck\" or another placeholder.`,
|
|
340
369
|
"If the user asks for a standalone visual, diagram, hero, one-pager, poster, or a couple of visuals, create only the requested one/few polished visual slides. Do not pad the result into a full presentation.",
|
|
341
370
|
"If the request is for a presentation or deck and does not explicitly ask for one slide, infer a coherent multi-slide outline from the scope and keep adding slides until that outline is complete. Do not stop after the first slide just because the prompt has few explicit instructions.",
|
|
342
371
|
`Add slides ONE AT A TIME using the \`add-slide\` action with --deckId=${deckId}. Wait for each \`add-slide\` result before calling it again; do not batch or parallelize slide writes.`,
|
|
@@ -48,7 +48,10 @@ export function readRecentReferences(
|
|
|
48
48
|
const parsed: unknown = JSON.parse(raw);
|
|
49
49
|
if (!Array.isArray(parsed)) return { items: [], readable: false };
|
|
50
50
|
return {
|
|
51
|
-
items: parsed
|
|
51
|
+
items: parsed
|
|
52
|
+
.filter(isRecentReference)
|
|
53
|
+
.sort((first, second) => second.lastUsedAt - first.lastUsedAt)
|
|
54
|
+
.slice(0, MAX_RECENT_REFERENCES),
|
|
52
55
|
readable: true,
|
|
53
56
|
};
|
|
54
57
|
} catch {
|
|
@@ -56,6 +59,25 @@ export function readRecentReferences(
|
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
61
|
|
|
62
|
+
export function forgetRecentReference(
|
|
63
|
+
kind: RecentReferenceKind,
|
|
64
|
+
storage:
|
|
65
|
+
| Pick<Storage, "getItem" | "setItem">
|
|
66
|
+
| null
|
|
67
|
+
| undefined = typeof window === "undefined" ? null : window.localStorage,
|
|
68
|
+
): RecentReferencesResult {
|
|
69
|
+
const current = readRecentReferences(storage);
|
|
70
|
+
if (!storage || !current.readable) return current;
|
|
71
|
+
|
|
72
|
+
const next = current.items.filter((item) => item.kind !== kind);
|
|
73
|
+
try {
|
|
74
|
+
storage.setItem(RECENT_REFERENCES_STORAGE_KEY, JSON.stringify(next));
|
|
75
|
+
return { items: next, readable: true };
|
|
76
|
+
} catch {
|
|
77
|
+
return { items: current.items, readable: false };
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
59
81
|
export function rememberRecentReference(
|
|
60
82
|
reference: Omit<RecentReference, "lastUsedAt">,
|
|
61
83
|
storage:
|
|
@@ -9,6 +9,35 @@ export interface AnimationTarget {
|
|
|
9
9
|
elementPath?: number[];
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
export interface ResolvedAnimationTarget<
|
|
13
|
+
T extends AnimationTarget = AnimationTarget,
|
|
14
|
+
> {
|
|
15
|
+
target: T;
|
|
16
|
+
element: Element;
|
|
17
|
+
key: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type AnimationTargetResolutionIssueCode =
|
|
21
|
+
| "missing-target"
|
|
22
|
+
| "duplicate-target";
|
|
23
|
+
|
|
24
|
+
export interface AnimationTargetResolutionIssue<
|
|
25
|
+
T extends AnimationTarget = AnimationTarget,
|
|
26
|
+
> {
|
|
27
|
+
animationIndex: number;
|
|
28
|
+
code: AnimationTargetResolutionIssueCode;
|
|
29
|
+
target: T;
|
|
30
|
+
key?: string;
|
|
31
|
+
preview?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface AnimationTargetResolution<
|
|
35
|
+
T extends AnimationTarget = AnimationTarget,
|
|
36
|
+
> {
|
|
37
|
+
resolved: ResolvedAnimationTarget<T>[] | null;
|
|
38
|
+
issue: AnimationTargetResolutionIssue<T> | null;
|
|
39
|
+
}
|
|
40
|
+
|
|
12
41
|
const INLINE_TAGS = new Set([
|
|
13
42
|
"a",
|
|
14
43
|
"abbr",
|
|
@@ -192,15 +221,87 @@ export function resolveSlideAnimationElement(
|
|
|
192
221
|
root: Element,
|
|
193
222
|
target: AnimationTarget,
|
|
194
223
|
): Element | null {
|
|
195
|
-
if (Array.isArray(target.elementPath)
|
|
196
|
-
|
|
197
|
-
|
|
224
|
+
if (Array.isArray(target.elementPath)) {
|
|
225
|
+
// A supplied path is the identity of the target. Falling back to a
|
|
226
|
+
// legacy index after it goes stale can animate a different element while
|
|
227
|
+
// leaving the intended element visible.
|
|
228
|
+
return target.elementPath.length > 0
|
|
229
|
+
? resolveElementPath(root, target.elementPath)
|
|
230
|
+
: null;
|
|
198
231
|
}
|
|
199
232
|
|
|
200
233
|
const legacyContainer = findLegacyAnimationContainer(root);
|
|
201
234
|
return legacyContainer?.children.item(target.elementIndex) ?? null;
|
|
202
235
|
}
|
|
203
236
|
|
|
237
|
+
/**
|
|
238
|
+
* Resolve an ordered animation list as one validated unit. A null result
|
|
239
|
+
* means the list cannot be rendered faithfully - a missing or duplicate
|
|
240
|
+
* target must not become a phantom click step in the presentation player.
|
|
241
|
+
*/
|
|
242
|
+
export function resolveSlideAnimationTargets<T extends AnimationTarget>(
|
|
243
|
+
root: Element,
|
|
244
|
+
targets: readonly T[],
|
|
245
|
+
): ResolvedAnimationTarget<T>[] | null {
|
|
246
|
+
return resolveSlideAnimationTargetsWithDiagnostics(root, targets).resolved;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export function resolveSlideAnimationTargetsWithDiagnostics<
|
|
250
|
+
T extends AnimationTarget,
|
|
251
|
+
>(root: Element, targets: readonly T[]): AnimationTargetResolution<T> {
|
|
252
|
+
const seen = new Set<string>();
|
|
253
|
+
const resolved: ResolvedAnimationTarget<T>[] = [];
|
|
254
|
+
|
|
255
|
+
for (const [animationIndex, target] of targets.entries()) {
|
|
256
|
+
const element = resolveSlideAnimationElement(root, target);
|
|
257
|
+
if (!element) {
|
|
258
|
+
return {
|
|
259
|
+
resolved: null,
|
|
260
|
+
issue: {
|
|
261
|
+
animationIndex,
|
|
262
|
+
code: "missing-target",
|
|
263
|
+
target,
|
|
264
|
+
},
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
const path = getElementPath(root, element);
|
|
268
|
+
if (!path) {
|
|
269
|
+
return {
|
|
270
|
+
resolved: null,
|
|
271
|
+
issue: {
|
|
272
|
+
animationIndex,
|
|
273
|
+
code: "missing-target",
|
|
274
|
+
target,
|
|
275
|
+
preview: getElementPreview(
|
|
276
|
+
element,
|
|
277
|
+
`Element ${target.elementIndex + 1}`,
|
|
278
|
+
),
|
|
279
|
+
},
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
const key = animationElementKey(path);
|
|
283
|
+
if (seen.has(key)) {
|
|
284
|
+
return {
|
|
285
|
+
resolved: null,
|
|
286
|
+
issue: {
|
|
287
|
+
animationIndex,
|
|
288
|
+
code: "duplicate-target",
|
|
289
|
+
target,
|
|
290
|
+
key,
|
|
291
|
+
preview: getElementPreview(
|
|
292
|
+
element,
|
|
293
|
+
`Element ${target.elementIndex + 1}`,
|
|
294
|
+
),
|
|
295
|
+
},
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
seen.add(key);
|
|
299
|
+
resolved.push({ target, element, key });
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
return { resolved, issue: null };
|
|
303
|
+
}
|
|
304
|
+
|
|
204
305
|
export function getSlideAnimationTargetKey(
|
|
205
306
|
html: string,
|
|
206
307
|
target: AnimationTarget,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
emailToColor,
|
|
6
6
|
emailToName,
|
|
7
7
|
} from "@agent-native/core/client/collab";
|
|
8
|
-
import { useSession
|
|
8
|
+
import { useSession } from "@agent-native/core/client/hooks";
|
|
9
9
|
import { useT } from "@agent-native/core/client/i18n";
|
|
10
10
|
import { useOrg } from "@agent-native/core/client/org";
|
|
11
11
|
import {
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
useSlideComments,
|
|
55
55
|
type CommentThread,
|
|
56
56
|
} from "@/hooks/use-slide-comments";
|
|
57
|
-
import { getAspectRatioDims
|
|
57
|
+
import { getAspectRatioDims } from "@/lib/aspect-ratios";
|
|
58
58
|
import {
|
|
59
59
|
deckAccessCheckKey,
|
|
60
60
|
shouldShowDeckEditorSkeleton,
|
|
@@ -187,6 +187,8 @@ export default function DeckEditor() {
|
|
|
187
187
|
);
|
|
188
188
|
const [contextToolbarSlot, setContextToolbarSlot] =
|
|
189
189
|
useState<HTMLDivElement | null>(null);
|
|
190
|
+
const [wideContextToolbarSlot, setWideContextToolbarSlot] =
|
|
191
|
+
useState<HTMLDivElement | null>(null);
|
|
190
192
|
const [retryingMissingDeck, setRetryingMissingDeck] = useState(false);
|
|
191
193
|
const [checkedDeckAccessKey, setCheckedDeckAccessKey] = useState<
|
|
192
194
|
string | null
|
|
@@ -238,9 +240,6 @@ export default function DeckEditor() {
|
|
|
238
240
|
const [pendingComment, setPendingComment] = useState<{
|
|
239
241
|
quotedText: string;
|
|
240
242
|
} | null>(null);
|
|
241
|
-
const imageGenButtonRef = useRef<HTMLButtonElement>(null);
|
|
242
|
-
const assetsButtonRef = useRef<HTMLButtonElement>(null);
|
|
243
|
-
|
|
244
243
|
// Track which image src to replace
|
|
245
244
|
const [replaceImageSrc, setReplaceImageSrc] = useState<string | null>(null);
|
|
246
245
|
|
|
@@ -1016,7 +1015,7 @@ export default function DeckEditor() {
|
|
|
1016
1015
|
|
|
1017
1016
|
return (
|
|
1018
1017
|
<div
|
|
1019
|
-
className="flex h-full min-h-0 flex-1 flex-col overflow-hidden bg-background"
|
|
1018
|
+
className="deck-editor-shell flex h-full min-h-0 flex-1 flex-col overflow-hidden rounded-l-lg bg-background"
|
|
1020
1019
|
onDragOver={editorDragOver}
|
|
1021
1020
|
onDrop={editorDrop}
|
|
1022
1021
|
>
|
|
@@ -1035,16 +1034,10 @@ export default function DeckEditor() {
|
|
|
1035
1034
|
setReplaceImageSrc(null);
|
|
1036
1035
|
setAssetLibraryOpen(true);
|
|
1037
1036
|
}}
|
|
1038
|
-
imageGenButtonRef={imageGenButtonRef}
|
|
1039
|
-
assetsButtonRef={assetsButtonRef}
|
|
1040
|
-
historyOpen={historyOpen}
|
|
1041
1037
|
onShowHistory={() => setHistoryOpen(!historyOpen)}
|
|
1042
1038
|
historyButtonRef={historyButtonRef}
|
|
1043
1039
|
currentSlide={currentSlide}
|
|
1044
|
-
|
|
1045
|
-
const targetId = slideIdOverride ?? currentSlide?.id;
|
|
1046
|
-
if (targetId) updateSlide(id, targetId, updates);
|
|
1047
|
-
}}
|
|
1040
|
+
onWideContextToolbarSlotChange={setWideContextToolbarSlot}
|
|
1048
1041
|
activeUsers={slideActiveUsers.filter((u) => u.email !== session?.email)}
|
|
1049
1042
|
agentPresent={agentPresent}
|
|
1050
1043
|
agentActive={agentActive}
|
|
@@ -1118,19 +1111,6 @@ export default function DeckEditor() {
|
|
|
1118
1111
|
}
|
|
1119
1112
|
return exportDeckToGoogleSlides(deck.title, slides, deck.aspectRatio);
|
|
1120
1113
|
}}
|
|
1121
|
-
aspectRatio={deck.aspectRatio}
|
|
1122
|
-
onSetAspectRatio={(ratio: AspectRatio) => {
|
|
1123
|
-
const previous = deck.aspectRatio;
|
|
1124
|
-
// Optimistic UI: update local cache immediately so canvas resizes.
|
|
1125
|
-
updateDeck(id, { aspectRatio: ratio });
|
|
1126
|
-
callAction("update-deck-aspect-ratio", {
|
|
1127
|
-
deckId: id,
|
|
1128
|
-
aspectRatio: ratio,
|
|
1129
|
-
}).catch((err) => {
|
|
1130
|
-
console.error("Failed to set aspect ratio:", err);
|
|
1131
|
-
updateDeck(id, { aspectRatio: previous });
|
|
1132
|
-
});
|
|
1133
|
-
}}
|
|
1134
1114
|
currentSlideId={currentSlide?.id}
|
|
1135
1115
|
addSlideGenerating={addSlideGenerating}
|
|
1136
1116
|
onAddSlideGeneratingChange={setAddSlideGenerating}
|
|
@@ -1142,9 +1122,13 @@ export default function DeckEditor() {
|
|
|
1142
1122
|
|
|
1143
1123
|
{/* Full-width host for the slide's contextual style toolbar: it spans the
|
|
1144
1124
|
* slide rail as well as the canvas, matching the deck toolbar above it. */}
|
|
1145
|
-
<div
|
|
1125
|
+
<div
|
|
1126
|
+
ref={setContextToolbarSlot}
|
|
1127
|
+
data-context-toolbar-host="narrow"
|
|
1128
|
+
className="deck-editor-context-toolbar-host deck-editor-context-toolbar-host--narrow shrink-0"
|
|
1129
|
+
/>
|
|
1146
1130
|
|
|
1147
|
-
<div className="relative flex min-h-0 flex-1 overflow-hidden">
|
|
1131
|
+
<div className="deck-editor-workspace relative flex min-h-0 flex-1 overflow-hidden rounded-l-lg bg-background">
|
|
1148
1132
|
{sidebarOpen && (
|
|
1149
1133
|
<>
|
|
1150
1134
|
<div
|
|
@@ -1204,7 +1188,7 @@ export default function DeckEditor() {
|
|
|
1204
1188
|
)}
|
|
1205
1189
|
|
|
1206
1190
|
{generatingSlideSelected && generatingSlideVisible && (
|
|
1207
|
-
<div className="flex min-h-0 flex-1 overflow-auto bg-
|
|
1191
|
+
<div className="flex min-h-0 flex-1 overflow-auto bg-[var(--slides-editor-surface)] p-4 md:p-8">
|
|
1208
1192
|
<div className="m-auto w-full max-w-6xl">
|
|
1209
1193
|
<GeneratingSlidePreview
|
|
1210
1194
|
content={streamedGeneratingSlideContent}
|
|
@@ -1220,7 +1204,7 @@ export default function DeckEditor() {
|
|
|
1220
1204
|
generatingSlideVisible &&
|
|
1221
1205
|
deck.slides.length === 0 &&
|
|
1222
1206
|
!showQuestionFlow && (
|
|
1223
|
-
<div className="flex min-h-0 flex-1 overflow-auto bg-
|
|
1207
|
+
<div className="flex min-h-0 flex-1 overflow-auto bg-[var(--slides-editor-surface)] p-4 md:p-8">
|
|
1224
1208
|
<div className="m-auto w-full max-w-6xl">
|
|
1225
1209
|
<GeneratingSlidePreview
|
|
1226
1210
|
content={streamedGeneratingSlideContent}
|
|
@@ -1238,6 +1222,7 @@ export default function DeckEditor() {
|
|
|
1238
1222
|
deckId={id}
|
|
1239
1223
|
readOnly={!canEdit}
|
|
1240
1224
|
contextToolbarSlot={contextToolbarSlot}
|
|
1225
|
+
wideContextToolbarSlot={wideContextToolbarSlot}
|
|
1241
1226
|
contextToolbarLeading={
|
|
1242
1227
|
canEdit ? (
|
|
1243
1228
|
<EditorActionCluster
|
|
@@ -1287,7 +1272,6 @@ export default function DeckEditor() {
|
|
|
1287
1272
|
onDropImageUrl={dropImageUrlOnSlide}
|
|
1288
1273
|
onToggleObjectFit={toggleObjectFit}
|
|
1289
1274
|
slideIndex={currentIndex >= 0 ? currentIndex : 0}
|
|
1290
|
-
slideCount={deck.slides.length}
|
|
1291
1275
|
designSystem={designSystem}
|
|
1292
1276
|
aspectRatio={deck.aspectRatio}
|
|
1293
1277
|
collabUser={
|
|
@@ -1376,7 +1360,7 @@ export default function DeckEditor() {
|
|
|
1376
1360
|
<ImageGenPanel
|
|
1377
1361
|
open={imageGenOpen}
|
|
1378
1362
|
onOpenChange={setImageGenOpen}
|
|
1379
|
-
anchorRef={
|
|
1363
|
+
anchorRef={historyButtonRef}
|
|
1380
1364
|
referenceImageUrls={imageStyleReferenceUrls}
|
|
1381
1365
|
slideContext={
|
|
1382
1366
|
currentSlide
|
|
@@ -1394,7 +1378,7 @@ export default function DeckEditor() {
|
|
|
1394
1378
|
<AssetLibraryPanel
|
|
1395
1379
|
open={assetLibraryOpen}
|
|
1396
1380
|
onOpenChange={setAssetLibraryOpen}
|
|
1397
|
-
anchorRef={
|
|
1381
|
+
anchorRef={historyButtonRef}
|
|
1398
1382
|
onSelectAsset={
|
|
1399
1383
|
replaceImageSrc
|
|
1400
1384
|
? (newUrl) => {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "@agent-native/toolkit/app-shell";
|
|
7
7
|
import {
|
|
8
8
|
IconAlertTriangle,
|
|
9
|
-
|
|
9
|
+
IconComponents,
|
|
10
10
|
IconPlus,
|
|
11
11
|
IconRefresh,
|
|
12
12
|
} from "@tabler/icons-react";
|
|
@@ -349,7 +349,7 @@ function EmptyState({ onCreateNew }: { onCreateNew: () => void }) {
|
|
|
349
349
|
return (
|
|
350
350
|
<div className="flex flex-col items-center justify-center min-h-[60vh] text-center">
|
|
351
351
|
<div className="w-16 h-16 rounded-2xl bg-gradient-to-br from-[#609FF8]/20 to-[#4080E0]/20 border border-[#609FF8]/20 flex items-center justify-center mb-6">
|
|
352
|
-
<
|
|
352
|
+
<IconComponents className="w-7 h-7 text-primary" />
|
|
353
353
|
</div>
|
|
354
354
|
<h2 className="text-xl font-semibold text-foreground mb-2">
|
|
355
355
|
{t("designSystems.emptyTitle")}
|