@agent-native/core 0.131.5 → 0.131.7
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 +3 -3
- package/corpus/core/CHANGELOG.md +70 -0
- package/corpus/core/docs/content/agent-native-toolkit.mdx +13 -6
- package/corpus/core/docs/content/cloneable-saas.mdx +5 -5
- package/corpus/core/docs/content/creating-templates.mdx +9 -0
- package/corpus/core/docs/content/deployment.mdx +18 -12
- package/corpus/core/docs/content/doctor.mdx +8 -1
- package/corpus/core/docs/content/drop-in-agent.mdx +1 -1
- package/corpus/core/docs/content/extensions.mdx +18 -18
- package/corpus/core/docs/content/faq.mdx +4 -4
- package/corpus/core/docs/content/key-concepts.mdx +30 -21
- package/corpus/core/docs/content/security.mdx +2 -2
- package/corpus/core/docs/content/template-brain-developers.mdx +4 -1
- package/corpus/core/docs/content/template-mail-developers.mdx +4 -1
- package/corpus/core/docs/content/what-is-agent-native.mdx +6 -6
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/client.ts +449 -66
- package/corpus/core/src/a2a/correlation.ts +31 -0
- package/corpus/core/src/a2a/invoke.ts +4 -2
- package/corpus/core/src/a2a/types.ts +4 -0
- package/corpus/core/src/action.ts +3 -0
- package/corpus/core/src/agent/action-continuation-guidance.ts +2 -1
- package/corpus/core/src/agent/engine/registry.ts +98 -6
- package/corpus/core/src/agent/production-agent.ts +151 -18
- package/corpus/core/src/agent/run-loop-with-resume.ts +190 -3
- package/corpus/core/src/agent/run-manager.ts +117 -41
- package/corpus/core/src/agent/thread-debug-history.ts +86 -0
- package/corpus/core/src/agent/types.ts +3 -1
- package/corpus/core/src/cli/create.ts +11 -1
- package/corpus/core/src/cli/templates-meta.ts +2 -2
- package/corpus/core/src/client/agent-chat-adapter.ts +91 -13
- package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +11 -9
- package/corpus/core/src/client/sse-event-processor.ts +17 -3
- package/corpus/core/src/db/client.ts +57 -17
- package/corpus/core/src/guards/no-env-credentials.ts +2 -0
- package/corpus/core/src/integrations/adapters/slack.ts +8 -3
- package/corpus/core/src/localization/default-messages.ts +44 -0
- package/corpus/core/src/observability/traces.ts +78 -5
- package/corpus/core/src/scripts/call-agent.ts +294 -11
- package/corpus/core/src/scripts/describe-workspace-apps.ts +2 -2
- package/corpus/core/src/secrets/crypto.ts +156 -35
- package/corpus/core/src/secrets/storage.ts +64 -26
- package/corpus/core/src/server/agent-capabilities.ts +1 -1
- package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +113 -7
- package/corpus/core/src/server/agent-chat/context-tools.ts +2 -0
- package/corpus/core/src/server/agent-chat/plugin-options.ts +34 -1
- package/corpus/core/src/server/agent-chat/prompt-resources.ts +1 -1
- package/corpus/core/src/server/agent-chat-plugin.ts +91 -59
- package/corpus/core/src/templates/default/.agents/skills/secrets/SKILL.md +19 -7
- package/corpus/core/src/templates/headless/.agents/skills/secrets/SKILL.md +19 -7
- package/corpus/core/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +18 -7
- package/corpus/core/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +15 -14
- package/corpus/core/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +19 -7
- package/corpus/core/src/vite/client.ts +1 -0
- package/corpus/templates/analytics/.agents/skills/dashboard-ops/SKILL.md +5 -4
- package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +6 -4
- package/corpus/templates/analytics/AGENTS.md +7 -4
- package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +4 -3
- package/corpus/templates/analytics/changelog/2026-07-30-delegated-analytics-questions-now-return-a-useful-current-me.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-30-scheduled-dashboard-emails-complete-every-panel-without-pool.md +6 -0
- package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +28 -1
- package/corpus/templates/analytics/server/jobs/dashboard-report.ts +18 -11
- package/corpus/templates/analytics/server/lib/analytics-connector-catalog.ts +4 -4
- package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +9 -5
- package/corpus/templates/analytics/server/lib/dashboard-panel-query.ts +6 -2
- package/corpus/templates/analytics/server/lib/dashboard-panel-source-resolver.ts +11 -4
- package/corpus/templates/analytics/server/lib/dashboard-report-render.ts +49 -31
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +16 -8
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +9 -3
- package/corpus/templates/analytics/server/lib/production-serverless-runtime.ts +11 -0
- package/corpus/templates/analytics/server/lib/real-data-actions.ts +10 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +3 -2
- package/corpus/templates/analytics/server/plugins/analytics-alert-jobs.ts +2 -1
- package/corpus/templates/analytics/server/plugins/dashboard-report-jobs.ts +2 -1
- package/corpus/templates/analytics/server/plugins/uptime-monitor-jobs.ts +1 -12
- package/corpus/templates/brain/.agents/skills/brain/RUNBOOK.md +54 -6
- package/corpus/templates/brain/.agents/skills/brain/SKILL.md +20 -9
- package/corpus/templates/brain/.agents/skills/ingestion-and-connectors/SKILL.md +33 -1
- package/corpus/templates/brain/AGENTS.md +3 -1
- package/corpus/templates/brain/README.md +4 -1
- package/corpus/templates/brain/actions/_schemas.ts +30 -8
- package/corpus/templates/brain/actions/ask-brain.ts +124 -14
- package/corpus/templates/brain/actions/create-source.ts +18 -2
- package/corpus/templates/brain/actions/enqueue-captures-distillation.ts +8 -123
- package/corpus/templates/brain/actions/enqueue-distillation.ts +6 -127
- package/corpus/templates/brain/actions/import-capture.ts +17 -5
- package/corpus/templates/brain/actions/import-transcript.ts +17 -5
- package/corpus/templates/brain/actions/update-source.ts +25 -5
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +1 -1
- package/corpus/templates/brain/changelog/2026-07-30-blessed-resources-can-feed-cited-company-answers.md +6 -0
- package/corpus/templates/brain/changelog/2026-07-30-the-left-sidebar-no-longer-shows-a-blank-organization-placeh.md +6 -0
- package/corpus/templates/brain/server/lib/brain.ts +49 -19
- package/corpus/templates/brain/server/lib/distillation-queue.ts +147 -0
- package/corpus/templates/brain/server/lib/source-policy.ts +264 -0
- package/corpus/templates/brain/server/plugins/agent-chat.ts +3 -2
- package/corpus/templates/brain/server/routes/api/_agent-native/brain/ingest.post.ts +116 -19
- package/corpus/templates/clips/app/components/meetings/google-oauth-identity-notice.tsx +51 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +4 -0
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +3 -1
- package/corpus/templates/clips/changelog/2026-07-30-google-calendar-warning.md +6 -0
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +72 -8
- package/corpus/templates/content/changelog/2026-07-30-the-slash-command-hint-now-stays-on-only-the-active-empty-li.md +6 -0
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +506 -11
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +148 -17
- package/corpus/templates/design/app/components/design/canvas-interactions/design-canvas-interactions.ts +357 -0
- package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +7 -466
- package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +15 -311
- package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +19 -997
- package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +8 -1216
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +31 -38
- package/corpus/templates/design/package.json +0 -1
- package/corpus/templates/dispatch/AGENTS.md +8 -0
- package/corpus/templates/dispatch/DEVELOPING.md +29 -0
- package/corpus/templates/dispatch/actions/view-screen.ts +34 -2
- package/corpus/templates/dispatch/app/i18n-data.ts +457 -0
- package/corpus/templates/dispatch/changelog/2026-07-30-delegated-dispatch-work-continues-reliably-in-the-background.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-30-find-failed-runs-across-apps.md +6 -0
- package/corpus/templates/dispatch/netlify.toml +3 -0
- package/corpus/templates/plan/actions/get-visual-plan.ts +10 -6
- package/corpus/templates/plan/actions/patch-visual-plan-source.ts +117 -1
- package/corpus/templates/plan/actions/update-visual-plan.ts +56 -14
- package/corpus/templates/plan/app/pages/PlansPage.tsx +1 -1
- package/corpus/templates/plan/changelog/2026-07-30-plan-agents-recover-with-targeted-writes.md +6 -0
- package/corpus/templates/plan/shared/plan-content.ts +35 -0
- package/corpus/templates/slides/.agents/skills/analytics-data-for-decks/SKILL.md +8 -12
- package/corpus/templates/slides/AGENTS.md +4 -4
- package/corpus/templates/slides/actions/create-deck.ts +1 -1
- package/corpus/templates/slides/actions/duplicate-deck.ts +19 -4
- package/corpus/templates/slides/app/components/deck/DeckCard.tsx +2 -10
- package/corpus/templates/slides/app/components/deck/MermaidRenderer.tsx +12 -1
- package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +30 -13
- package/corpus/templates/slides/app/components/editor/DeckEditorSkeleton.tsx +35 -0
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +63 -56
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +21 -76
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +1110 -292
- package/corpus/templates/slides/app/components/editor/SlideOverflowWarning.tsx +53 -0
- package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +235 -18
- package/corpus/templates/slides/app/components/editor/SpeakerNotesPanel.tsx +4 -1
- package/corpus/templates/slides/app/components/editor/canvas-interactions/index.ts +11 -0
- package/corpus/templates/slides/app/components/editor/canvas-interactions/slides-canvas-adapter.ts +129 -0
- package/corpus/templates/slides/app/components/editor/selection-overlay-measurement.ts +70 -0
- package/corpus/templates/slides/app/components/editor/slide-object-interactions.ts +519 -65
- package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +36 -426
- package/corpus/templates/slides/app/components/visual-editor/DrawOverlay.tsx +19 -458
- package/corpus/templates/slides/app/context/DeckContext.tsx +179 -72
- package/corpus/templates/slides/app/global.css +105 -0
- package/corpus/templates/slides/app/i18n/en-US.ts +8 -0
- package/corpus/templates/slides/app/lib/deck-editor-loading.ts +26 -0
- package/corpus/templates/slides/app/lib/mermaid-blocks.ts +27 -0
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +71 -38
- package/corpus/templates/slides/app/pages/Index.tsx +98 -41
- package/corpus/templates/slides/changelog/2026-07-30-deck-loading-no-longer-flashes-an-unavailable-message.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-duplicating-a-deck-from-the-deck-list-now-opens-the-copy-imm.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-layout-overflow-warning-is-readable-and-dismissible.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-new-decks-now-start-with-an-empty-slide-list-when-no-slides-.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-shared-canvas-annotations.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-slide-objects-can-be-moved-as-a-group-copied-and-pasted-with.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-slide-text-editing-and-object-controls-now-match-google-slides.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-style-panel-now-scrolls-with-speaker-notes-open-shows-the-sl.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-30-top-toolbar-controls-now-use-consistent-sizing-with-undo-and.md +6 -0
- package/corpus/templates/slides/netlify.toml +3 -1
- package/corpus/templates/slides/package.json +0 -1
- package/corpus/templates/slides/server/lib/chat-attachments.ts +18 -0
- package/corpus/templates/slides/server/plugins/agent-chat.ts +5 -0
- package/corpus/templates/slides/vite.config.ts +0 -1
- package/corpus/toolkit/CHANGELOG.md +13 -0
- package/corpus/toolkit/README.md +19 -0
- package/corpus/toolkit/agent-native.eject.json +38 -0
- package/corpus/toolkit/package.json +29 -1
- package/corpus/toolkit/src/canvas-annotations/CanvasCommentPins.tsx +861 -0
- package/corpus/toolkit/src/canvas-annotations/DrawOverlay.tsx +1233 -0
- package/corpus/toolkit/src/canvas-annotations/index.ts +15 -0
- package/corpus/toolkit/src/canvas-annotations/types.ts +14 -0
- package/corpus/toolkit/src/canvas-interactions/canvas-interactions.ts +933 -0
- package/corpus/toolkit/src/canvas-interactions/index.ts +67 -0
- package/corpus/toolkit/src/design-tweaks/scrub-input-utils.ts +311 -0
- package/corpus/toolkit/src/design-tweaks/scrub-input.tsx +491 -0
- package/corpus/toolkit/src/design-tweaks/visual-style-controls.tsx +26 -171
- package/corpus/toolkit/src/index.ts +1 -0
- package/dist/a2a/client.d.ts +23 -0
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +309 -44
- package/dist/a2a/client.js.map +1 -1
- package/dist/a2a/correlation.d.ts +1 -0
- package/dist/a2a/correlation.d.ts.map +1 -1
- package/dist/a2a/correlation.js +27 -0
- package/dist/a2a/correlation.js.map +1 -1
- package/dist/a2a/invoke.d.ts.map +1 -1
- package/dist/a2a/invoke.js +4 -2
- package/dist/a2a/invoke.js.map +1 -1
- package/dist/a2a/types.d.ts +4 -0
- package/dist/a2a/types.d.ts.map +1 -1
- package/dist/a2a/types.js.map +1 -1
- package/dist/action.d.ts +3 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js.map +1 -1
- package/dist/agent/action-continuation-guidance.d.ts.map +1 -1
- package/dist/agent/action-continuation-guidance.js +2 -1
- package/dist/agent/action-continuation-guidance.js.map +1 -1
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +82 -8
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/production-agent.d.ts +40 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +113 -15
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-loop-with-resume.d.ts +21 -0
- package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
- package/dist/agent/run-loop-with-resume.js +163 -4
- package/dist/agent/run-loop-with-resume.js.map +1 -1
- package/dist/agent/run-manager.d.ts +16 -9
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +93 -42
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/thread-debug-history.d.ts +10 -0
- package/dist/agent/thread-debug-history.d.ts.map +1 -0
- package/dist/agent/thread-debug-history.js +68 -0
- package/dist/agent/thread-debug-history.js.map +1 -0
- package/dist/agent/types.d.ts +3 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +6 -1
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/templates-meta.js +2 -2
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +76 -13
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
- package/dist/client/resources/McpIntegrationDialog.js +1 -1
- package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +12 -3
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +48 -17
- package/dist/db/client.js.map +1 -1
- package/dist/guards/no-env-credentials.d.ts.map +1 -1
- package/dist/guards/no-env-credentials.js +2 -0
- package/dist/guards/no-env-credentials.js.map +1 -1
- package/dist/integrations/adapters/slack.js +7 -3
- package/dist/integrations/adapters/slack.js.map +1 -1
- package/dist/localization/default-messages.d.ts +43 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +43 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/observability/traces.d.ts +3 -1
- package/dist/observability/traces.d.ts.map +1 -1
- package/dist/observability/traces.js +73 -4
- package/dist/observability/traces.js.map +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +12 -12
- package/dist/provider-api/actions/provider-api.d.ts +13 -13
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/scripts/call-agent.d.ts.map +1 -1
- package/dist/scripts/call-agent.js +237 -12
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/scripts/describe-workspace-apps.js +2 -2
- package/dist/scripts/describe-workspace-apps.js.map +1 -1
- package/dist/secrets/crypto.d.ts +36 -21
- package/dist/secrets/crypto.d.ts.map +1 -1
- package/dist/secrets/crypto.js +134 -33
- package/dist/secrets/crypto.js.map +1 -1
- package/dist/secrets/storage.d.ts +6 -6
- package/dist/secrets/storage.d.ts.map +1 -1
- package/dist/secrets/storage.js +43 -26
- package/dist/secrets/storage.js.map +1 -1
- package/dist/server/agent-capabilities.js +1 -1
- package/dist/server/agent-capabilities.js.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.d.ts +17 -3
- package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.js +94 -3
- package/dist/server/agent-chat/action-filters-a2a.js.map +1 -1
- package/dist/server/agent-chat/context-tools.d.ts.map +1 -1
- package/dist/server/agent-chat/context-tools.js +2 -0
- package/dist/server/agent-chat/context-tools.js.map +1 -1
- package/dist/server/agent-chat/plugin-options.d.ts +23 -0
- package/dist/server/agent-chat/plugin-options.d.ts.map +1 -1
- package/dist/server/agent-chat/plugin-options.js +4 -1
- package/dist/server/agent-chat/plugin-options.js.map +1 -1
- package/dist/server/agent-chat/prompt-resources.js +1 -1
- package/dist/server/agent-chat/prompt-resources.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +2 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +79 -56
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/templates/default/.agents/skills/secrets/SKILL.md +19 -7
- package/dist/templates/headless/.agents/skills/secrets/SKILL.md +19 -7
- package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +18 -7
- package/dist/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +15 -14
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +19 -7
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +1 -0
- package/dist/vite/client.js.map +1 -1
- package/docs/content/agent-native-toolkit.mdx +13 -6
- package/docs/content/cloneable-saas.mdx +5 -5
- package/docs/content/creating-templates.mdx +9 -0
- package/docs/content/deployment.mdx +18 -12
- package/docs/content/doctor.mdx +8 -1
- package/docs/content/drop-in-agent.mdx +1 -1
- package/docs/content/extensions.mdx +18 -18
- package/docs/content/faq.mdx +4 -4
- package/docs/content/key-concepts.mdx +30 -21
- package/docs/content/security.mdx +2 -2
- package/docs/content/template-brain-developers.mdx +4 -1
- package/docs/content/template-mail-developers.mdx +4 -1
- package/docs/content/what-is-agent-native.mdx +6 -6
- package/package.json +3 -3
- package/src/a2a/client.ts +449 -66
- package/src/a2a/correlation.ts +31 -0
- package/src/a2a/invoke.ts +4 -2
- package/src/a2a/types.ts +4 -0
- package/src/action.ts +3 -0
- package/src/agent/action-continuation-guidance.ts +2 -1
- package/src/agent/engine/registry.ts +98 -6
- package/src/agent/production-agent.ts +151 -18
- package/src/agent/run-loop-with-resume.ts +190 -3
- package/src/agent/run-manager.ts +117 -41
- package/src/agent/thread-debug-history.ts +86 -0
- package/src/agent/types.ts +3 -1
- package/src/cli/create.ts +11 -1
- package/src/cli/templates-meta.ts +2 -2
- package/src/client/agent-chat-adapter.ts +91 -13
- package/src/client/resources/McpIntegrationDialog.tsx +11 -9
- package/src/client/sse-event-processor.ts +17 -3
- package/src/db/client.ts +57 -17
- package/src/guards/no-env-credentials.ts +2 -0
- package/src/integrations/adapters/slack.ts +8 -3
- package/src/localization/default-messages.ts +44 -0
- package/src/observability/traces.ts +78 -5
- package/src/scripts/call-agent.ts +294 -11
- package/src/scripts/describe-workspace-apps.ts +2 -2
- package/src/secrets/crypto.ts +156 -35
- package/src/secrets/storage.ts +64 -26
- package/src/server/agent-capabilities.ts +1 -1
- package/src/server/agent-chat/action-filters-a2a.ts +113 -7
- package/src/server/agent-chat/context-tools.ts +2 -0
- package/src/server/agent-chat/plugin-options.ts +34 -1
- package/src/server/agent-chat/prompt-resources.ts +1 -1
- package/src/server/agent-chat-plugin.ts +91 -59
- package/src/templates/default/.agents/skills/secrets/SKILL.md +19 -7
- package/src/templates/headless/.agents/skills/secrets/SKILL.md +19 -7
- package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +18 -7
- package/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +15 -14
- package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +19 -7
- package/src/vite/client.ts +1 -0
|
@@ -1,436 +1,46 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { sendToAgentChatAndConfirm } from "@agent-native/core/client/agent-chat";
|
|
2
2
|
import { useT } from "@agent-native/core/client/i18n";
|
|
3
|
-
import { IconMessage, IconSend, IconX } from "@tabler/icons-react";
|
|
4
|
-
import { useEffect, useRef, useState } from "react";
|
|
5
|
-
|
|
6
|
-
import { Button } from "@/components/ui/button";
|
|
7
|
-
import { Textarea } from "@/components/ui/textarea";
|
|
8
3
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} from "
|
|
13
|
-
import { cn } from "@/lib/utils";
|
|
14
|
-
|
|
15
|
-
export interface CanvasPin {
|
|
16
|
-
id: string;
|
|
17
|
-
/** Position as a percentage of the canvas (so it survives resize/zoom) */
|
|
18
|
-
xPct: number;
|
|
19
|
-
yPct: number;
|
|
20
|
-
/** Optional CSS selector of the element under the click, for context */
|
|
21
|
-
targetSelector?: string;
|
|
22
|
-
/** Optional snippet of text content the user clicked near */
|
|
23
|
-
targetText?: string;
|
|
24
|
-
/** Pending comment text the user is composing */
|
|
25
|
-
draft?: string;
|
|
26
|
-
/** Submitted state — pin disappears once the agent acknowledges */
|
|
27
|
-
submitted?: boolean;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const POPOVER_WIDTH = 288; // tailwind w-72
|
|
31
|
-
const POPOVER_HEIGHT_ESTIMATE = 200;
|
|
32
|
-
const POPOVER_GAP = 12;
|
|
33
|
-
const VIEWPORT_MARGIN = 16;
|
|
34
|
-
|
|
35
|
-
/** Right-anchored sidebar inset (e.g. the agent sidebar) so we don't slide the
|
|
36
|
-
* composer underneath it. Mirrors the logic Pinpoint's toolbar uses. */
|
|
37
|
-
function getRightSidebarInset(): number {
|
|
38
|
-
if (typeof window === "undefined" || typeof document === "undefined")
|
|
39
|
-
return 0;
|
|
40
|
-
let inset = 0;
|
|
41
|
-
for (const panel of document.querySelectorAll<HTMLElement>(
|
|
42
|
-
".agent-sidebar-panel",
|
|
43
|
-
)) {
|
|
44
|
-
const style = window.getComputedStyle(panel);
|
|
45
|
-
if (
|
|
46
|
-
style.display === "none" ||
|
|
47
|
-
style.visibility === "hidden" ||
|
|
48
|
-
panel.getAttribute("aria-hidden") === "true"
|
|
49
|
-
) {
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
const r = panel.getBoundingClientRect();
|
|
53
|
-
const anchoredRight =
|
|
54
|
-
r.width > 0 &&
|
|
55
|
-
r.right >= window.innerWidth - 1 &&
|
|
56
|
-
r.left < window.innerWidth - 1;
|
|
57
|
-
if (!anchoredRight) continue;
|
|
58
|
-
inset = Math.max(inset, Math.ceil(window.innerWidth - r.left));
|
|
59
|
-
}
|
|
60
|
-
return inset;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/** Compute popover offset relative to the pin anchor so the composer (and its
|
|
64
|
-
* Send button) stays inside the visible viewport — even when the right side is
|
|
65
|
-
* occluded by the agent sidebar. Without this the Send button drifts off the
|
|
66
|
-
* right edge for pins dropped near the right of the slide and clicks land on
|
|
67
|
-
* nothing. */
|
|
68
|
-
function computePopoverOffset(pinX: number, pinY: number) {
|
|
69
|
-
if (typeof window === "undefined") {
|
|
70
|
-
return { left: POPOVER_GAP, top: 4 };
|
|
71
|
-
}
|
|
72
|
-
const safeRight =
|
|
73
|
-
window.innerWidth - getRightSidebarInset() - VIEWPORT_MARGIN;
|
|
74
|
-
const safeBottom = window.innerHeight - VIEWPORT_MARGIN;
|
|
4
|
+
CanvasCommentPins as ToolkitCanvasCommentPins,
|
|
5
|
+
type CanvasCommentPinsProps as ToolkitCanvasCommentPinsProps,
|
|
6
|
+
} from "@agent-native/toolkit/canvas-annotations";
|
|
7
|
+
import { toast } from "sonner";
|
|
75
8
|
|
|
76
|
-
|
|
77
|
-
if (pinX + POPOVER_GAP + POPOVER_WIDTH > safeRight) {
|
|
78
|
-
left = -POPOVER_WIDTH - POPOVER_GAP;
|
|
79
|
-
}
|
|
80
|
-
// After flipping, the popover's right edge could still spill into the
|
|
81
|
-
// sidebar if the pin sits close to it. Slide further left so the whole
|
|
82
|
-
// composer (including the Send button) stays inside the safe area.
|
|
83
|
-
if (pinX + left + POPOVER_WIDTH > safeRight) {
|
|
84
|
-
left = safeRight - pinX - POPOVER_WIDTH;
|
|
85
|
-
}
|
|
86
|
-
if (pinX + left < VIEWPORT_MARGIN) {
|
|
87
|
-
left = VIEWPORT_MARGIN - pinX;
|
|
88
|
-
}
|
|
9
|
+
export type { CanvasPin } from "@agent-native/toolkit/canvas-annotations";
|
|
89
10
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (pinY + top < VIEWPORT_MARGIN) {
|
|
95
|
-
top = VIEWPORT_MARGIN - pinY;
|
|
96
|
-
}
|
|
11
|
+
export type CanvasCommentPinsProps = Omit<
|
|
12
|
+
ToolkitCanvasCommentPinsProps,
|
|
13
|
+
"translate" | "sendToAgent" | "onSendError"
|
|
14
|
+
>;
|
|
97
15
|
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
interface CanvasCommentPinsProps {
|
|
102
|
-
/** Whether the pin tool is active. When true, clicks drop pins. */
|
|
103
|
-
active: boolean;
|
|
104
|
-
/** Disable / exit the pin mode (called on Escape, after submit, etc.) */
|
|
105
|
-
onClose: () => void;
|
|
106
|
-
/**
|
|
107
|
-
* Selector for the canvas surface (e.g. `.slide-content`). Pins are anchored
|
|
108
|
-
* to this element's bounding rect; clicks outside are ignored.
|
|
109
|
-
*/
|
|
110
|
-
canvasSelector: string;
|
|
111
|
-
/** Stable identifier for the current view (slide id / design id) — used in
|
|
112
|
-
* the agent prompt and as a pin namespace key. */
|
|
113
|
-
contextId: string;
|
|
114
|
-
/** Human-readable label for the context (slide title, slide index, design
|
|
115
|
-
* title) used in the agent prompt. */
|
|
116
|
-
contextLabel?: string;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Click-to-comment pins anchored to the canvas.
|
|
121
|
-
*
|
|
122
|
-
* Mirrors claude.ai/design's "inline comments" feature — the most-praised
|
|
123
|
-
* interaction pattern of that tool. A user clicks anywhere on the canvas to
|
|
124
|
-
* drop a pin, types a one-line instruction, and the pin's position + nearby
|
|
125
|
-
* element selector + instruction is sent to the agent. The pin disappears
|
|
126
|
-
* once submitted; the agent's reply lands in the chat sidebar where it can
|
|
127
|
-
* make targeted edits.
|
|
128
|
-
*
|
|
129
|
-
* Why pins (vs text-anchored comments):
|
|
130
|
-
* The existing slide_comments table anchors comments to text selections via
|
|
131
|
-
* TipTap. That's good for prose review — but Rochkind also wants to point
|
|
132
|
-
* to images, charts, and whitespace. Pins handle those cases without
|
|
133
|
-
* requiring a text selection.
|
|
134
|
-
*/
|
|
135
|
-
export function CanvasCommentPins({
|
|
136
|
-
active,
|
|
137
|
-
onClose,
|
|
138
|
-
canvasSelector,
|
|
139
|
-
contextId,
|
|
140
|
-
contextLabel,
|
|
141
|
-
}: CanvasCommentPinsProps) {
|
|
16
|
+
export function CanvasCommentPins(props: CanvasCommentPinsProps) {
|
|
142
17
|
const t = useT();
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
() => () => {
|
|
152
|
-
for (const timer of removalTimersRef.current) clearTimeout(timer);
|
|
153
|
-
removalTimersRef.current.clear();
|
|
154
|
-
},
|
|
155
|
-
[],
|
|
156
|
-
);
|
|
157
|
-
|
|
158
|
-
// Reset pins when the context (slide) changes — they're scoped to one view.
|
|
159
|
-
useEffect(() => {
|
|
160
|
-
setPins([]);
|
|
161
|
-
setActivePinId(null);
|
|
162
|
-
}, [contextId]);
|
|
163
|
-
|
|
164
|
-
// Find the canvas container the pins overlay. The canvas can take a few
|
|
165
|
-
// frames to land in the DOM after a slide change — retry until we find
|
|
166
|
-
// it so the click handler isn't permanently stuck on a stale (or null)
|
|
167
|
-
// ref when the user navigates between slides with pin mode active.
|
|
168
|
-
useEffect(() => {
|
|
169
|
-
if (!active) return;
|
|
170
|
-
let cancelled = false;
|
|
171
|
-
let attempts = 0;
|
|
172
|
-
const findCanvas = () => {
|
|
173
|
-
if (cancelled) return;
|
|
174
|
-
const el = document.querySelector(canvasSelector) as HTMLElement | null;
|
|
175
|
-
if (el) {
|
|
176
|
-
containerRef.current = el;
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
if (attempts++ < 30) {
|
|
180
|
-
setTimeout(findCanvas, 50);
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
findCanvas();
|
|
184
|
-
return () => {
|
|
185
|
-
cancelled = true;
|
|
186
|
-
};
|
|
187
|
-
}, [active, canvasSelector, contextId]);
|
|
188
|
-
|
|
189
|
-
// Click handler — drops a pin where the user clicks the canvas
|
|
190
|
-
useEffect(() => {
|
|
191
|
-
if (!active) return;
|
|
192
|
-
const onClick = (e: MouseEvent) => {
|
|
193
|
-
const canvas = containerRef.current;
|
|
194
|
-
if (!canvas) return;
|
|
195
|
-
const target = e.target as HTMLElement;
|
|
196
|
-
|
|
197
|
-
// Ignore clicks on UI chrome (the pin popovers themselves)
|
|
198
|
-
if (target.closest("[data-pin-popover]")) return;
|
|
199
|
-
if (!canvas.contains(target)) return;
|
|
200
|
-
|
|
201
|
-
const rect = canvas.getBoundingClientRect();
|
|
202
|
-
const xPct = ((e.clientX - rect.left) / rect.width) * 100;
|
|
203
|
-
const yPct = ((e.clientY - rect.top) / rect.height) * 100;
|
|
204
|
-
|
|
205
|
-
// Build a best-effort selector for the target element (data-builder-id
|
|
206
|
-
// is stamped by SlideEditor for slides, similar markers exist in design)
|
|
207
|
-
let targetSelector: string | undefined;
|
|
208
|
-
const builderId = target
|
|
209
|
-
.closest("[data-builder-id]")
|
|
210
|
-
?.getAttribute("data-builder-id");
|
|
211
|
-
if (builderId) targetSelector = `[data-builder-id="${builderId}"]`;
|
|
212
|
-
|
|
213
|
-
const targetText = target.textContent?.trim().slice(0, 80) || undefined;
|
|
214
|
-
|
|
215
|
-
const newPin: CanvasPin = {
|
|
216
|
-
id: crypto.randomUUID(),
|
|
217
|
-
xPct,
|
|
218
|
-
yPct,
|
|
219
|
-
targetSelector,
|
|
220
|
-
targetText,
|
|
221
|
-
draft: "",
|
|
222
|
-
};
|
|
223
|
-
setPins((prev) => [...prev, newPin]);
|
|
224
|
-
setActivePinId(newPin.id);
|
|
225
|
-
e.stopPropagation();
|
|
226
|
-
e.preventDefault();
|
|
227
|
-
};
|
|
228
|
-
window.addEventListener("click", onClick, { capture: true });
|
|
229
|
-
return () =>
|
|
230
|
-
window.removeEventListener("click", onClick, { capture: true });
|
|
231
|
-
}, [active]);
|
|
232
|
-
|
|
233
|
-
// Escape closes pin mode
|
|
234
|
-
useEffect(() => {
|
|
235
|
-
if (!active) return;
|
|
236
|
-
const onKey = (e: KeyboardEvent) => {
|
|
237
|
-
if (e.key === "Escape") {
|
|
238
|
-
onClose();
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
window.addEventListener("keydown", onKey);
|
|
242
|
-
return () => window.removeEventListener("keydown", onKey);
|
|
243
|
-
}, [active, onClose]);
|
|
244
|
-
|
|
245
|
-
const updatePin = (id: string, updates: Partial<CanvasPin>) => {
|
|
246
|
-
setPins((prev) =>
|
|
247
|
-
prev.map((p) => (p.id === id ? { ...p, ...updates } : p)),
|
|
248
|
-
);
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
const removePin = (id: string) => {
|
|
252
|
-
setPins((prev) => prev.filter((p) => p.id !== id));
|
|
253
|
-
if (activePinId === id) setActivePinId(null);
|
|
18
|
+
const keyMap: Record<string, string> = {
|
|
19
|
+
"visualEditor.clickToDropCommentPin": "raw.pinDropHint",
|
|
20
|
+
"visualEditor.escToExit": "raw.escExit",
|
|
21
|
+
"visualEditor.editDesign": "raw.editSlide",
|
|
22
|
+
"visualEditor.tellAgentWhatToChange": "raw.tellAgentChange",
|
|
23
|
+
"visualEditor.send": "raw.sendToAgent",
|
|
24
|
+
"visualEditor.comment": "comments.comment",
|
|
25
|
+
"visualEditor.commentSent": "raw.sentToAgent",
|
|
254
26
|
};
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
removePin(pin.id);
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
const lines = [
|
|
263
|
-
`[Comment pin on ${contextLabel || contextId}]`,
|
|
264
|
-
`Position: ${pin.xPct.toFixed(1)}% from left, ${pin.yPct.toFixed(1)}% from top`,
|
|
265
|
-
];
|
|
266
|
-
if (pin.targetSelector) lines.push(`Element: ${pin.targetSelector}`);
|
|
267
|
-
if (pin.targetText) lines.push(`Nearby text: "${pin.targetText}"`);
|
|
268
|
-
lines.push("");
|
|
269
|
-
lines.push(text);
|
|
270
|
-
try {
|
|
271
|
-
// Use `sendToAgentChat` (not the shared `agentChat.submit`) so the
|
|
272
|
-
// request routes correctly when slides is embedded in Builder/Frame
|
|
273
|
-
// (the Builder parent ignores `agentNative.submitChat` — the wrapped
|
|
274
|
-
// helper falls back to posting to self in that case) and so the agent
|
|
275
|
-
// sidebar is reliably opened via the `agent-panel:open` custom event
|
|
276
|
-
// even if the user has it collapsed.
|
|
277
|
-
sendToAgentChat({
|
|
278
|
-
message: lines.join("\n"),
|
|
279
|
-
submit: true,
|
|
280
|
-
openSidebar: true,
|
|
281
|
-
});
|
|
282
|
-
} catch (err) {
|
|
283
|
-
console.error("[CanvasCommentPins] failed to send to agent:", err);
|
|
284
|
-
}
|
|
285
|
-
updatePin(pin.id, { submitted: true });
|
|
286
|
-
// Keep the acknowledgement visible just long enough to register, without
|
|
287
|
-
// making a routine submit feel delayed.
|
|
288
|
-
const timer = setTimeout(() => {
|
|
289
|
-
removalTimersRef.current.delete(timer);
|
|
290
|
-
removePin(pin.id);
|
|
291
|
-
}, 220);
|
|
292
|
-
removalTimersRef.current.add(timer);
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
if (!active && pins.length === 0) return null;
|
|
296
|
-
|
|
297
|
-
// Render pins as portaled overlays positioned on top of the canvas
|
|
298
|
-
const canvas = containerRef.current;
|
|
299
|
-
if (!canvas) return null;
|
|
300
|
-
const rect = canvas.getBoundingClientRect();
|
|
301
|
-
|
|
27
|
+
const translate: ToolkitCanvasCommentPinsProps["translate"] = (
|
|
28
|
+
key,
|
|
29
|
+
options,
|
|
30
|
+
) => t(keyMap[key] ?? key, options);
|
|
302
31
|
return (
|
|
303
|
-
|
|
304
|
-
{
|
|
305
|
-
{
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
</span>
|
|
317
|
-
</div>
|
|
318
|
-
)}
|
|
319
|
-
|
|
320
|
-
{/* Pin overlays */}
|
|
321
|
-
{pins.map((pin) => {
|
|
322
|
-
const left = rect.left + (pin.xPct / 100) * rect.width;
|
|
323
|
-
const top = rect.top + (pin.yPct / 100) * rect.height;
|
|
324
|
-
const isActive = activePinId === pin.id;
|
|
325
|
-
return (
|
|
326
|
-
<div
|
|
327
|
-
key={pin.id}
|
|
328
|
-
data-pin-popover
|
|
329
|
-
data-pin-id={pin.id}
|
|
330
|
-
className={cn(
|
|
331
|
-
"fixed z-[55]",
|
|
332
|
-
pin.submitted &&
|
|
333
|
-
"-translate-y-2 opacity-0 transition-[transform,opacity] duration-200 ease-out motion-reduce:translate-y-0 motion-reduce:duration-150",
|
|
334
|
-
)}
|
|
335
|
-
style={{ left, top }}
|
|
336
|
-
>
|
|
337
|
-
{/* Pin marker. The tooltip is suppressed while the composer is
|
|
338
|
-
* open: the textarea already shows the same draft text, and a
|
|
339
|
-
* shadcn TooltipContent (z-[250], no `pointer-events: none`) was
|
|
340
|
-
* intercepting Send-button clicks for pins near the top of the
|
|
341
|
-
* slide where Radix auto-flips the tooltip below the trigger and
|
|
342
|
-
* onto the composer. */}
|
|
343
|
-
<Tooltip open={isActive ? false : undefined}>
|
|
344
|
-
<TooltipTrigger asChild>
|
|
345
|
-
<button
|
|
346
|
-
onClick={() => setActivePinId(pin.id)}
|
|
347
|
-
className={cn(
|
|
348
|
-
"absolute -translate-x-1/2 -translate-y-full -mt-1 flex items-center justify-center w-7 h-7 rounded-full rounded-bl-none shadow-lg cursor-pointer",
|
|
349
|
-
"bg-[#609FF8] text-black hover:scale-110 transition-transform",
|
|
350
|
-
)}
|
|
351
|
-
>
|
|
352
|
-
<IconMessage className="w-3.5 h-3.5" />
|
|
353
|
-
</button>
|
|
354
|
-
</TooltipTrigger>
|
|
355
|
-
<TooltipContent className="pointer-events-none">
|
|
356
|
-
{pin.draft || "Comment"}
|
|
357
|
-
</TooltipContent>
|
|
358
|
-
</Tooltip>
|
|
359
|
-
|
|
360
|
-
{/* Inline composer. z-[260] keeps it above the shadcn floating-UI
|
|
361
|
-
* tier (z-[250] — Tooltip, Popover, Dialog overlay, etc.) so a
|
|
362
|
-
* stray tooltip that pops over the pin can't swallow Send clicks. */}
|
|
363
|
-
{isActive && !pin.submitted && (
|
|
364
|
-
<div
|
|
365
|
-
data-pin-popover
|
|
366
|
-
className="absolute z-[260] w-72 rounded-lg border border-border bg-popover shadow-xl p-2"
|
|
367
|
-
style={(() => {
|
|
368
|
-
const off = computePopoverOffset(left, top);
|
|
369
|
-
return { left: off.left, top: off.top };
|
|
370
|
-
})()}
|
|
371
|
-
>
|
|
372
|
-
<p className="mb-2 text-xs font-semibold text-foreground">
|
|
373
|
-
{t("raw.editSlide")}
|
|
374
|
-
</p>
|
|
375
|
-
<Textarea
|
|
376
|
-
autoFocus
|
|
377
|
-
value={pin.draft || ""}
|
|
378
|
-
onChange={(e) => updatePin(pin.id, { draft: e.target.value })}
|
|
379
|
-
onKeyDown={(e) => {
|
|
380
|
-
// Backspace / Delete must stay inside the textarea — the
|
|
381
|
-
// global DeckEditor handler treats them as "delete current
|
|
382
|
-
// slide" when the canvas has focus, and any focus race
|
|
383
|
-
// (e.g. autoFocus not yet landed, popover unmount during
|
|
384
|
-
// submit) would otherwise blow away the slide the user is
|
|
385
|
-
// commenting on. Stop at the source.
|
|
386
|
-
e.stopPropagation();
|
|
387
|
-
if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
|
|
388
|
-
e.preventDefault();
|
|
389
|
-
submitPin(pin);
|
|
390
|
-
}
|
|
391
|
-
if (e.key === "Escape") {
|
|
392
|
-
e.preventDefault();
|
|
393
|
-
removePin(pin.id);
|
|
394
|
-
}
|
|
395
|
-
}}
|
|
396
|
-
placeholder={t("raw.tellAgentChange")}
|
|
397
|
-
className="resize-none text-xs min-h-[60px]"
|
|
398
|
-
/>
|
|
399
|
-
{pin.targetText && (
|
|
400
|
-
<div className="text-[10px] text-muted-foreground mt-1 italic line-clamp-1">
|
|
401
|
-
near "{pin.targetText}"
|
|
402
|
-
</div>
|
|
403
|
-
)}
|
|
404
|
-
<div className="flex items-center justify-between mt-2">
|
|
405
|
-
<span className="text-[10px] text-muted-foreground">
|
|
406
|
-
{/Mac|iPhone|iPad/.test(navigator.userAgent) ? "⌘" : "Ctrl"}
|
|
407
|
-
+Enter to submit
|
|
408
|
-
</span>
|
|
409
|
-
<div className="flex gap-1">
|
|
410
|
-
<Button
|
|
411
|
-
size="sm"
|
|
412
|
-
variant="ghost"
|
|
413
|
-
className="h-6 px-2 text-[10px] cursor-pointer"
|
|
414
|
-
onClick={() => removePin(pin.id)}
|
|
415
|
-
>
|
|
416
|
-
<IconX className="w-3 h-3" />
|
|
417
|
-
</Button>
|
|
418
|
-
<Button
|
|
419
|
-
size="sm"
|
|
420
|
-
className="h-6 gap-1 px-2 text-[10px] cursor-pointer"
|
|
421
|
-
onClick={() => submitPin(pin)}
|
|
422
|
-
disabled={!(pin.draft || "").trim()}
|
|
423
|
-
>
|
|
424
|
-
<IconSend className="w-3 h-3" />
|
|
425
|
-
Send
|
|
426
|
-
</Button>
|
|
427
|
-
</div>
|
|
428
|
-
</div>
|
|
429
|
-
</div>
|
|
430
|
-
)}
|
|
431
|
-
</div>
|
|
432
|
-
);
|
|
433
|
-
})}
|
|
434
|
-
</>
|
|
32
|
+
<ToolkitCanvasCommentPins
|
|
33
|
+
{...props}
|
|
34
|
+
translate={translate}
|
|
35
|
+
allowQueue={false}
|
|
36
|
+
showAnchorDetails={false}
|
|
37
|
+
showSubmitShortcut={false}
|
|
38
|
+
sendToAgent={async (input) =>
|
|
39
|
+
(await sendToAgentChatAndConfirm(input)).delivered
|
|
40
|
+
}
|
|
41
|
+
onSendError={() =>
|
|
42
|
+
toast.error(translate("deckEditor.failedToSubmitPrompt"))
|
|
43
|
+
}
|
|
44
|
+
/>
|
|
435
45
|
);
|
|
436
46
|
}
|