@agent-native/core 0.100.2 → 0.101.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +2 -2
- package/corpus/core/CHANGELOG.md +65 -0
- package/corpus/core/docs/content/locales/ar-SA/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/ar-SA/template-plan.mdx +7 -0
- package/corpus/core/docs/content/locales/de-DE/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/de-DE/template-plan.mdx +7 -0
- package/corpus/core/docs/content/locales/es-ES/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/es-ES/template-plan.mdx +14 -0
- package/corpus/core/docs/content/locales/fr-FR/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/fr-FR/template-plan.mdx +7 -0
- package/corpus/core/docs/content/locales/hi-IN/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/hi-IN/template-plan.mdx +7 -0
- package/corpus/core/docs/content/locales/ja-JP/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/ja-JP/template-plan.mdx +7 -0
- package/corpus/core/docs/content/locales/ko-KR/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/ko-KR/template-plan.mdx +7 -0
- package/corpus/core/docs/content/locales/pt-BR/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/pt-BR/template-plan.mdx +14 -0
- package/corpus/core/docs/content/locales/zh-CN/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/zh-CN/template-plan.mdx +7 -0
- package/corpus/core/docs/content/locales/zh-TW/pr-visual-recap.mdx +48 -30
- package/corpus/core/docs/content/locales/zh-TW/template-plan.mdx +7 -0
- package/corpus/core/docs/content/pr-visual-recap.mdx +50 -32
- package/corpus/core/docs/content/template-plan.mdx +14 -0
- package/corpus/core/docs/content/toolkit-comments-review.mdx +16 -2
- package/corpus/core/package.json +4 -1
- package/corpus/core/src/a2a/index.ts +2 -1
- package/corpus/core/src/a2a/server.ts +34 -9
- package/corpus/core/src/agent/production-agent.ts +56 -10
- package/corpus/core/src/cli/create.ts +47 -19
- package/corpus/core/src/cli/pr-visual-recap-workflow.ts +2 -3
- package/corpus/core/src/cli/recap.ts +3 -4932
- package/corpus/core/src/cli/skills-content/visual-plan-skill.ts +6 -4
- package/corpus/core/src/cli/skills-content/visual-recap-skill.ts +7 -1
- package/corpus/core/src/client/AgentPanel.tsx +19 -17
- package/corpus/core/src/client/analytics.ts +8 -1
- package/corpus/core/src/client/chat/markdown-renderer.tsx +54 -8
- package/corpus/core/src/client/chat/message-components.tsx +8 -2
- package/corpus/core/src/client/clipboard.ts +28 -1
- package/corpus/core/src/client/guided-questions.tsx +4 -0
- package/corpus/core/src/client/i18n.tsx +2 -1
- package/corpus/core/src/client/index.ts +4 -0
- package/corpus/core/src/client/review/ReviewCommentComposer.tsx +108 -0
- package/corpus/core/src/client/review/ReviewThreadPanel.tsx +482 -150
- package/corpus/core/src/client/review/index.ts +8 -0
- package/corpus/core/src/client/review/use-review.ts +35 -1
- package/corpus/core/src/client/use-agent-chat-context.ts +3 -2
- package/corpus/core/src/review/actions/create-review-comment.ts +2 -1
- package/corpus/core/src/review/actions/get-review-feedback.ts +6 -11
- package/corpus/core/src/review/actions/list-review-comments.ts +38 -4
- package/corpus/core/src/review/actions/reply-review-comment.ts +33 -22
- package/corpus/core/src/review/actions/resolve-review-thread.ts +29 -2
- package/corpus/core/src/review/actions/send-review-thread-to-agent.ts +62 -0
- package/corpus/core/src/review/identity.ts +101 -0
- package/corpus/core/src/review/index.ts +14 -0
- package/corpus/core/src/review/store.ts +315 -8
- package/corpus/core/src/review/types.ts +4 -0
- package/corpus/core/src/server/action-discovery.ts +4 -0
- package/corpus/core/src/server/action-routes.ts +125 -4
- package/corpus/core/src/server/agent-chat/plugin-options.ts +16 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +1 -0
- package/corpus/core/src/server/index.ts +8 -0
- package/corpus/core/src/vite/action-types-plugin.ts +4 -0
- package/corpus/templates/analytics/changelog/2026-07-14-daily-dashboard-email-captures-authenticate-with-a-sessi.md +6 -0
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +156 -3
- package/corpus/templates/assets/app/components/generation/GenerationResults.tsx +402 -142
- package/corpus/templates/assets/app/i18n/zh-TW.ts +1 -0
- package/corpus/templates/assets/app/i18n-data.ts +1 -0
- package/corpus/templates/assets/app/routes/library.tsx +187 -48
- package/corpus/templates/assets/changelog/2026-07-13-merged-the-candidates-panel-into-the-library-as-a-drafts-tab.md +6 -0
- package/corpus/templates/chat/app/lib/agent-page.tsx +40 -0
- package/corpus/templates/chat/app/routes/agent.tsx +5 -3
- package/corpus/templates/chat/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +6 -0
- package/corpus/templates/clips/.agents/skills/ai-video-tools/SKILL.md +5 -0
- package/corpus/templates/clips/AGENTS.md +4 -0
- package/corpus/templates/clips/actions/get-feature-flags.ts +30 -0
- package/corpus/templates/clips/actions/lib/transcript-preview.ts +48 -0
- package/corpus/templates/clips/actions/request-transcript.ts +41 -1
- package/corpus/templates/clips/actions/view-screen.ts +5 -9
- package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -1
- package/corpus/templates/clips/app/components/player/video-player.tsx +39 -1
- package/corpus/templates/clips/app/hooks/use-desktop-promo.ts +6 -12
- package/corpus/templates/clips/app/hooks/use-mse-video-source.ts +146 -0
- package/corpus/templates/clips/app/lib/capture-install-options.ts +21 -0
- package/corpus/templates/clips/app/lib/fmp4.ts +271 -0
- package/corpus/templates/clips/app/lib/mse-video-loader.ts +585 -0
- package/corpus/templates/clips/app/routes/_app.dictate.tsx +0 -4
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +5 -13
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +2 -37
- package/corpus/templates/clips/app/routes/download.tsx +3 -2
- package/corpus/templates/clips/changelog/2026-07-10-shared-clips-now-start-playing-instantly-instead-of-showing-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-14-clips-now-distinguishes-transcript-previews-from-incomplete-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-14-desktop-app-prompts-stay-hidden-after-you-download-the-insta.md +6 -0
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +5 -0
- package/corpus/templates/clips/desktop/src/overlays/recording-pill.tsx +10 -0
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +4 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen/custom_capture.rs +2518 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen/live_upload.rs +353 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +558 -67
- package/corpus/templates/clips/desktop/src-tauri/src/recording_indicator.rs +11 -1
- package/corpus/templates/clips/desktop/src-tauri/src/remote_flags.rs +188 -0
- package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +1 -1
- package/corpus/templates/clips/server/lib/post-finalize-dispatch.ts +1 -0
- package/corpus/templates/clips/server/plugins/agent-chat.ts +5 -0
- package/corpus/templates/clips/server/routes/api/_agent-native-background/post-finalize-worker.post.ts +5 -1
- package/corpus/templates/clips/shared/feature-flags.ts +41 -0
- package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +3 -0
- package/corpus/templates/design/.agents/skills/design-review-feedback/SKILL.md +42 -0
- package/corpus/templates/design/AGENTS.md +6 -0
- package/corpus/templates/design/README.md +1 -0
- package/corpus/templates/design/actions/navigate.ts +4 -4
- package/corpus/templates/design/actions/view-screen.ts +116 -2
- package/corpus/templates/design/agent-native.app-skill.json +5 -0
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +52 -59
- package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +13 -9
- package/corpus/templates/design/app/components/design/EditPanel.tsx +79 -11
- package/corpus/templates/design/app/components/design/LayersPanel.tsx +78 -65
- package/corpus/templates/design/app/components/design/ReviewCommentsPanel.tsx +161 -0
- package/corpus/templates/design/app/components/design/ReviewStatusControl.tsx +96 -0
- package/corpus/templates/design/app/components/design/bridge/hit-test.bridge.ts +166 -0
- package/corpus/templates/design/app/components/layout/Layout.tsx +1 -0
- package/corpus/templates/design/app/components/visual-editor/ReviewCanvasPins.tsx +1077 -0
- package/corpus/templates/design/app/components/visual-editor/index.ts +1 -0
- package/corpus/templates/design/app/components/visual-editor/review-canvas-state.ts +42 -0
- package/corpus/templates/design/app/hooks/use-design-systems.ts +2 -2
- package/corpus/templates/design/app/hooks/use-navigation-state.ts +9 -6
- package/corpus/templates/design/app/hooks/use-question-flow.ts +7 -1
- package/corpus/templates/design/app/i18n/ar-SA.ts +56 -1
- package/corpus/templates/design/app/i18n/de-DE.ts +57 -1
- package/corpus/templates/design/app/i18n/en-US.ts +56 -1
- package/corpus/templates/design/app/i18n/es-ES.ts +56 -1
- package/corpus/templates/design/app/i18n/fr-FR.ts +57 -1
- package/corpus/templates/design/app/i18n/hi-IN.ts +56 -1
- package/corpus/templates/design/app/i18n/ja-JP.ts +56 -1
- package/corpus/templates/design/app/i18n/ko-KR.ts +56 -1
- package/corpus/templates/design/app/i18n/pt-BR.ts +57 -1
- package/corpus/templates/design/app/i18n/zh-CN.ts +56 -1
- package/corpus/templates/design/app/i18n/zh-TW.ts +51 -0
- package/corpus/templates/design/app/pages/Present.tsx +172 -14
- package/corpus/templates/design/app/pages/design-editor/overview-camera.ts +23 -0
- package/corpus/templates/design/app/pages/design-editor/tool-state.ts +10 -0
- package/corpus/templates/design/app/pages/present-review-state.ts +18 -0
- package/corpus/templates/design/app/public-routes.ts +8 -0
- package/corpus/templates/design/app/root.tsx +7 -6
- package/corpus/templates/design/changelog/2026-07-13-dragged-design-assets-now-appear-at-the-visible-drop-locatio.md +6 -0
- package/corpus/templates/design/changelog/2026-07-13-reviewers-can-pin-comments-on-shared-designs-and-apply-verif.md +6 -0
- package/corpus/templates/design/server/plugins/agent-chat.ts +10 -0
- package/corpus/templates/design/server/plugins/auth.ts +7 -5
- package/corpus/templates/design/server/plugins/review.ts +9 -0
- package/corpus/templates/design/shared/review-anchor.ts +83 -0
- package/corpus/templates/design/shared/review-summary.ts +25 -0
- package/corpus/templates/forms/.agents/skills/form-publishing/SKILL.md +2 -0
- package/corpus/templates/forms/AGENTS.md +4 -0
- package/corpus/templates/forms/actions/create-form.ts +2 -1
- package/corpus/templates/forms/actions/update-form.ts +5 -2
- package/corpus/templates/forms/app/i18n/ar-SA.ts +3 -0
- package/corpus/templates/forms/app/i18n/de-DE.ts +3 -0
- package/corpus/templates/forms/app/i18n/en-US.ts +3 -0
- package/corpus/templates/forms/app/i18n/es-ES.ts +3 -0
- package/corpus/templates/forms/app/i18n/fr-FR.ts +3 -0
- package/corpus/templates/forms/app/i18n/hi-IN.ts +3 -0
- package/corpus/templates/forms/app/i18n/ja-JP.ts +3 -0
- package/corpus/templates/forms/app/i18n/ko-KR.ts +3 -0
- package/corpus/templates/forms/app/i18n/pt-BR.ts +3 -0
- package/corpus/templates/forms/app/i18n/zh-CN.ts +3 -0
- package/corpus/templates/forms/app/i18n/zh-TW.ts +3 -0
- package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +19 -0
- package/corpus/templates/forms/changelog/2026-07-14-fixed-the-ask-forms-loading-input-appearing-above-the-welcom.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-14-form-social-previews-now-show-the-form-title-description-and.md +6 -0
- package/corpus/templates/forms/changelog/2026-07-14-forms-can-email-the-form-owner-when-new-responses-arrive.md +6 -0
- package/corpus/templates/forms/server/handlers/submissions.ts +17 -0
- package/corpus/templates/forms/server/lib/form-og-image.ts +64 -6
- package/corpus/templates/forms/server/lib/public-form-ssr.ts +6 -2
- package/corpus/templates/forms/server/lib/response-email.ts +65 -0
- package/corpus/templates/forms/server/plugins/agent-chat.ts +1 -0
- package/corpus/templates/forms/server/routes/api/forms/og/[...slug]/og.png.get.ts +184 -0
- package/corpus/templates/forms/shared/types.ts +2 -0
- package/corpus/templates/plan/.agents/skills/visual-plan/SKILL.md +6 -4
- package/corpus/templates/plan/.agents/skills/visual-recap/SKILL.md +7 -1
- package/dist/a2a/index.d.ts +2 -1
- package/dist/a2a/index.d.ts.map +1 -1
- package/dist/a2a/index.js +1 -1
- package/dist/a2a/index.js.map +1 -1
- package/dist/a2a/server.d.ts +25 -0
- package/dist/a2a/server.d.ts.map +1 -1
- package/dist/a2a/server.js +30 -6
- package/dist/a2a/server.js.map +1 -1
- package/dist/agent/production-agent.d.ts +2 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +37 -12
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/cli/create.d.ts +5 -3
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +44 -19
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.d.ts +2 -2
- package/dist/cli/pr-visual-recap-workflow.d.ts.map +1 -1
- package/dist/cli/pr-visual-recap-workflow.js +2 -2
- package/dist/cli/pr-visual-recap-workflow.js.map +1 -1
- package/dist/cli/recap.d.ts +3 -562
- package/dist/cli/recap.d.ts.map +1 -1
- package/dist/cli/recap.js +3 -3875
- package/dist/cli/recap.js.map +1 -1
- package/dist/cli/skills-content/visual-plan-skill.d.ts +1 -1
- package/dist/cli/skills-content/visual-plan-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/visual-plan-skill.js +6 -4
- package/dist/cli/skills-content/visual-plan-skill.js.map +1 -1
- package/dist/cli/skills-content/visual-recap-skill.d.ts +1 -1
- package/dist/cli/skills-content/visual-recap-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/visual-recap-skill.js +7 -1
- package/dist/cli/skills-content/visual-recap-skill.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +3 -3
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/analytics.d.ts +5 -0
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +3 -1
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/chat/markdown-renderer.d.ts +1 -0
- package/dist/client/chat/markdown-renderer.d.ts.map +1 -1
- package/dist/client/chat/markdown-renderer.js +36 -1
- package/dist/client/chat/markdown-renderer.js.map +1 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +5 -2
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/clipboard.d.ts +3 -1
- package/dist/client/clipboard.d.ts.map +1 -1
- package/dist/client/clipboard.js +24 -1
- package/dist/client/clipboard.js.map +1 -1
- package/dist/client/guided-questions.d.ts +3 -1
- package/dist/client/guided-questions.d.ts.map +1 -1
- package/dist/client/guided-questions.js +2 -1
- package/dist/client/guided-questions.js.map +1 -1
- package/dist/client/i18n.d.ts.map +1 -1
- package/dist/client/i18n.js +3 -1
- package/dist/client/i18n.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/review/ReviewCommentComposer.d.ts +18 -0
- package/dist/client/review/ReviewCommentComposer.d.ts.map +1 -0
- package/dist/client/review/ReviewCommentComposer.js +30 -0
- package/dist/client/review/ReviewCommentComposer.js.map +1 -0
- package/dist/client/review/ReviewThreadPanel.d.ts +28 -1
- package/dist/client/review/ReviewThreadPanel.d.ts.map +1 -1
- package/dist/client/review/ReviewThreadPanel.js +151 -39
- package/dist/client/review/ReviewThreadPanel.js.map +1 -1
- package/dist/client/review/index.d.ts +3 -2
- package/dist/client/review/index.d.ts.map +1 -1
- package/dist/client/review/index.js +2 -1
- package/dist/client/review/index.js.map +1 -1
- package/dist/client/review/use-review.d.ts +23 -0
- package/dist/client/review/use-review.d.ts.map +1 -1
- package/dist/client/review/use-review.js +3 -0
- package/dist/client/review/use-review.js.map +1 -1
- package/dist/client/use-agent-chat-context.d.ts +1 -1
- package/dist/client/use-agent-chat-context.d.ts.map +1 -1
- package/dist/client/use-agent-chat-context.js +4 -2
- package/dist/client/use-agent-chat-context.js.map +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/awareness.d.ts.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +5 -5
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/review/actions/create-review-comment.js +2 -1
- package/dist/review/actions/create-review-comment.js.map +1 -1
- package/dist/review/actions/get-review-feedback.js +6 -11
- package/dist/review/actions/get-review-feedback.js.map +1 -1
- package/dist/review/actions/list-review-comments.d.ts +1 -0
- package/dist/review/actions/list-review-comments.js +25 -4
- package/dist/review/actions/list-review-comments.js.map +1 -1
- package/dist/review/actions/reply-review-comment.js +12 -5
- package/dist/review/actions/reply-review-comment.js.map +1 -1
- package/dist/review/actions/resolve-review-thread.d.ts +3 -0
- package/dist/review/actions/resolve-review-thread.js +20 -3
- package/dist/review/actions/resolve-review-thread.js.map +1 -1
- package/dist/review/actions/send-review-thread-to-agent.d.ts +17 -0
- package/dist/review/actions/send-review-thread-to-agent.d.ts.map +1 -0
- package/dist/review/actions/send-review-thread-to-agent.js +49 -0
- package/dist/review/actions/send-review-thread-to-agent.js.map +1 -0
- package/dist/review/identity.d.ts +6 -0
- package/dist/review/identity.d.ts.map +1 -0
- package/dist/review/identity.js +68 -0
- package/dist/review/identity.js.map +1 -0
- package/dist/review/index.d.ts +3 -1
- package/dist/review/index.d.ts.map +1 -1
- package/dist/review/index.js +2 -1
- package/dist/review/index.js.map +1 -1
- package/dist/review/store.d.ts +36 -0
- package/dist/review/store.d.ts.map +1 -1
- package/dist/review/store.js +223 -8
- package/dist/review/store.js.map +1 -1
- package/dist/review/types.d.ts +4 -0
- package/dist/review/types.d.ts.map +1 -1
- package/dist/review/types.js.map +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +4 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/action-routes.d.ts +45 -0
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +71 -5
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-chat/plugin-options.d.ts +16 -0
- package/dist/server/agent-chat/plugin-options.d.ts.map +1 -1
- package/dist/server/agent-chat/plugin-options.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +1 -0
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/index.d.ts +3 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +1 -1
- package/dist/vite/action-types-plugin.d.ts.map +1 -1
- package/dist/vite/action-types-plugin.js +4 -0
- package/dist/vite/action-types-plugin.js.map +1 -1
- package/docs/content/locales/ar-SA/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/ar-SA/template-plan.mdx +7 -0
- package/docs/content/locales/de-DE/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/de-DE/template-plan.mdx +7 -0
- package/docs/content/locales/es-ES/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/es-ES/template-plan.mdx +14 -0
- package/docs/content/locales/fr-FR/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/fr-FR/template-plan.mdx +7 -0
- package/docs/content/locales/hi-IN/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/hi-IN/template-plan.mdx +7 -0
- package/docs/content/locales/ja-JP/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/ja-JP/template-plan.mdx +7 -0
- package/docs/content/locales/ko-KR/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/ko-KR/template-plan.mdx +7 -0
- package/docs/content/locales/pt-BR/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/pt-BR/template-plan.mdx +14 -0
- package/docs/content/locales/zh-CN/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/zh-CN/template-plan.mdx +7 -0
- package/docs/content/locales/zh-TW/pr-visual-recap.mdx +48 -30
- package/docs/content/locales/zh-TW/template-plan.mdx +7 -0
- package/docs/content/pr-visual-recap.mdx +50 -32
- package/docs/content/template-plan.mdx +14 -0
- package/docs/content/toolkit-comments-review.mdx +16 -2
- package/package.json +4 -1
- package/corpus/templates/forms/server/routes/api/forms/og/[slug]/og.png.get.ts +0 -45
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReviewThreadPanel,
|
|
3
|
+
type ReviewThread,
|
|
4
|
+
useT,
|
|
5
|
+
} from "@agent-native/core/client";
|
|
6
|
+
import type { ReviewComment } from "@agent-native/core/review";
|
|
7
|
+
import { IconSend } from "@tabler/icons-react";
|
|
8
|
+
import { useState } from "react";
|
|
9
|
+
|
|
10
|
+
import { Button } from "@/components/ui/button";
|
|
11
|
+
import { Spinner } from "@/components/ui/spinner";
|
|
12
|
+
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
|
13
|
+
import { cn } from "@/lib/utils";
|
|
14
|
+
|
|
15
|
+
export interface ReviewCommentsPanelProps {
|
|
16
|
+
designId: string;
|
|
17
|
+
activeFileId?: string | null;
|
|
18
|
+
canComment: boolean;
|
|
19
|
+
/** Caller-derived editor capability for resolving threads. */
|
|
20
|
+
canResolve?: boolean;
|
|
21
|
+
/** Caller authorization for deleting a specific root comment. */
|
|
22
|
+
canDeleteComment?: (comment: ReviewComment, thread: ReviewThread) => boolean;
|
|
23
|
+
showComposer?: boolean;
|
|
24
|
+
signInHref?: string;
|
|
25
|
+
onSelectThread?: (thread: ReviewThread) => void;
|
|
26
|
+
canDispatchToAgent?: boolean;
|
|
27
|
+
sendingThreadId?: string | null;
|
|
28
|
+
onDispatchCommentToAgent?: (comment: ReviewComment) => void;
|
|
29
|
+
onSendThreadToAgent?: (thread: ReviewThread) => void;
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function ReviewCommentsPanel({
|
|
34
|
+
designId,
|
|
35
|
+
activeFileId,
|
|
36
|
+
canComment,
|
|
37
|
+
canResolve,
|
|
38
|
+
canDeleteComment,
|
|
39
|
+
showComposer = true,
|
|
40
|
+
signInHref,
|
|
41
|
+
onSelectThread,
|
|
42
|
+
canDispatchToAgent = false,
|
|
43
|
+
sendingThreadId,
|
|
44
|
+
onDispatchCommentToAgent,
|
|
45
|
+
onSendThreadToAgent,
|
|
46
|
+
className,
|
|
47
|
+
}: ReviewCommentsPanelProps) {
|
|
48
|
+
const t = useT();
|
|
49
|
+
const [scope, setScope] = useState<"screen" | "all">("screen");
|
|
50
|
+
const targetId = scope === "screen" ? activeFileId : undefined;
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<div
|
|
54
|
+
data-review-comments-panel
|
|
55
|
+
className={cn("flex min-h-0 flex-1 flex-col", className)}
|
|
56
|
+
>
|
|
57
|
+
<div className="shrink-0 border-b border-border px-3 py-2">
|
|
58
|
+
<Tabs
|
|
59
|
+
value={scope}
|
|
60
|
+
onValueChange={(value) => setScope(value as "screen" | "all")}
|
|
61
|
+
className="w-full"
|
|
62
|
+
>
|
|
63
|
+
<TabsList className="grid h-8 w-full grid-cols-2 rounded-md bg-muted p-0.5">
|
|
64
|
+
<TabsTrigger value="screen" className="h-7 px-2 text-xs">
|
|
65
|
+
{t("review.thisScreen")}
|
|
66
|
+
</TabsTrigger>
|
|
67
|
+
<TabsTrigger value="all" className="h-7 px-2 text-xs">
|
|
68
|
+
{t("review.allScreens")}
|
|
69
|
+
</TabsTrigger>
|
|
70
|
+
</TabsList>
|
|
71
|
+
</Tabs>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
{!canComment && signInHref ? (
|
|
75
|
+
<Button
|
|
76
|
+
asChild
|
|
77
|
+
variant="outline"
|
|
78
|
+
size="sm"
|
|
79
|
+
className="mx-3 mt-3 h-8 shrink-0"
|
|
80
|
+
>
|
|
81
|
+
<a href={signInHref}>{t("review.signInToComment")}</a>
|
|
82
|
+
</Button>
|
|
83
|
+
) : null}
|
|
84
|
+
|
|
85
|
+
<div className="min-h-0 flex-1 overflow-y-auto">
|
|
86
|
+
<ReviewThreadPanel
|
|
87
|
+
resourceType="design"
|
|
88
|
+
resourceId={designId}
|
|
89
|
+
targetId={targetId}
|
|
90
|
+
title={t("review.panelTitle")}
|
|
91
|
+
placeholder={t("review.placeholder")}
|
|
92
|
+
emptyState={t("review.emptyState")}
|
|
93
|
+
loadingLabel={t("review.loading")}
|
|
94
|
+
replyLabel={t("review.reply")}
|
|
95
|
+
replyPlaceholder={t("review.replyPlaceholder")}
|
|
96
|
+
cancelReplyLabel={t("review.cancelReply")}
|
|
97
|
+
resolveLabel={t("review.resolve")}
|
|
98
|
+
deleteLabel={t("review.deleteComment")}
|
|
99
|
+
moreActionsLabel={t("review.moreActions")}
|
|
100
|
+
resolvedLabel={t("review.resolved")}
|
|
101
|
+
reviewerLabel={t("review.reviewer")}
|
|
102
|
+
includeResolved
|
|
103
|
+
showHeader={false}
|
|
104
|
+
variant="plain"
|
|
105
|
+
showComposer={canComment && showComposer}
|
|
106
|
+
canReply={canComment}
|
|
107
|
+
canResolve={canResolve ?? canDispatchToAgent}
|
|
108
|
+
canDeleteComment={canDeleteComment}
|
|
109
|
+
showComposerTargetPicker={canComment && showComposer}
|
|
110
|
+
composerCommentLabel={t("review.commentMode")}
|
|
111
|
+
composerAgentLabel={t("review.sendToAgent")}
|
|
112
|
+
onCommentCreated={(comment) => {
|
|
113
|
+
if (comment.resolutionTarget === "agent") {
|
|
114
|
+
onDispatchCommentToAgent?.(comment);
|
|
115
|
+
}
|
|
116
|
+
}}
|
|
117
|
+
onSelectThread={onSelectThread}
|
|
118
|
+
renderThreadActions={
|
|
119
|
+
canDispatchToAgent && onSendThreadToAgent
|
|
120
|
+
? (thread) => {
|
|
121
|
+
if (thread.root.status !== "open") return null;
|
|
122
|
+
const alreadyQueued =
|
|
123
|
+
thread.root.resolutionTarget !== "human" &&
|
|
124
|
+
!thread.root.consumedAt;
|
|
125
|
+
if (alreadyQueued) return null;
|
|
126
|
+
const sending = sendingThreadId === thread.root.threadId;
|
|
127
|
+
const dispatchPending = Boolean(sendingThreadId);
|
|
128
|
+
return (
|
|
129
|
+
<Button
|
|
130
|
+
type="button"
|
|
131
|
+
variant="outline"
|
|
132
|
+
size="sm"
|
|
133
|
+
className="h-7 gap-1.5 px-2 text-xs"
|
|
134
|
+
disabled={dispatchPending}
|
|
135
|
+
aria-busy={sending}
|
|
136
|
+
aria-label={t("review.sendToAgent")}
|
|
137
|
+
onClick={(event) => {
|
|
138
|
+
event.stopPropagation();
|
|
139
|
+
onSendThreadToAgent(thread);
|
|
140
|
+
}}
|
|
141
|
+
>
|
|
142
|
+
{sending ? (
|
|
143
|
+
<Spinner className="size-3.5" />
|
|
144
|
+
) : (
|
|
145
|
+
<IconSend className="size-3.5" />
|
|
146
|
+
)}
|
|
147
|
+
<span className="hidden @xs/review:inline">
|
|
148
|
+
{sending
|
|
149
|
+
? t("review.sendingToAgent")
|
|
150
|
+
: t("review.sendToAgent")}
|
|
151
|
+
</span>
|
|
152
|
+
</Button>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
: undefined
|
|
156
|
+
}
|
|
157
|
+
/>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
);
|
|
161
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ReviewStatusBadge,
|
|
3
|
+
useSetReviewStatus,
|
|
4
|
+
useT,
|
|
5
|
+
} from "@agent-native/core/client";
|
|
6
|
+
import type { ReviewStatus } from "@agent-native/core/review";
|
|
7
|
+
import { IconChevronDown } from "@tabler/icons-react";
|
|
8
|
+
import { toast } from "sonner";
|
|
9
|
+
|
|
10
|
+
import { Button } from "@/components/ui/button";
|
|
11
|
+
import {
|
|
12
|
+
DropdownMenu,
|
|
13
|
+
DropdownMenuContent,
|
|
14
|
+
DropdownMenuItem,
|
|
15
|
+
DropdownMenuTrigger,
|
|
16
|
+
} from "@/components/ui/dropdown-menu";
|
|
17
|
+
|
|
18
|
+
const REVIEW_STATUSES: ReviewStatus[] = [
|
|
19
|
+
"draft",
|
|
20
|
+
"in_review",
|
|
21
|
+
"approved",
|
|
22
|
+
"changes_requested",
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
export interface ReviewStatusControlProps {
|
|
26
|
+
designId: string;
|
|
27
|
+
status?: ReviewStatus | null;
|
|
28
|
+
/** Explicit caller-derived capability. Pass true only for the owner. */
|
|
29
|
+
editable?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function ReviewStatusControl({
|
|
33
|
+
designId,
|
|
34
|
+
status,
|
|
35
|
+
editable = false,
|
|
36
|
+
}: ReviewStatusControlProps) {
|
|
37
|
+
const t = useT();
|
|
38
|
+
const setStatus = useSetReviewStatus();
|
|
39
|
+
const currentStatus = status ?? "draft";
|
|
40
|
+
const label = (value: ReviewStatus) => t(`review.status.${value}`);
|
|
41
|
+
const compactBadgeClassName =
|
|
42
|
+
"max-w-[8.5rem] truncate px-1.5 py-0 text-[11px] leading-5";
|
|
43
|
+
|
|
44
|
+
if (!editable) {
|
|
45
|
+
return (
|
|
46
|
+
<ReviewStatusBadge
|
|
47
|
+
status={currentStatus}
|
|
48
|
+
className={compactBadgeClassName}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<DropdownMenu>
|
|
55
|
+
<DropdownMenuTrigger asChild>
|
|
56
|
+
<Button
|
|
57
|
+
type="button"
|
|
58
|
+
variant="ghost"
|
|
59
|
+
size="sm"
|
|
60
|
+
className="h-7 min-w-0 max-w-full gap-0.5 rounded-full px-0.5 text-xs hover:bg-accent"
|
|
61
|
+
disabled={setStatus.isPending}
|
|
62
|
+
aria-label={t("review.status.change")}
|
|
63
|
+
>
|
|
64
|
+
<ReviewStatusBadge
|
|
65
|
+
status={currentStatus}
|
|
66
|
+
className={compactBadgeClassName}
|
|
67
|
+
/>
|
|
68
|
+
<IconChevronDown className="size-3 shrink-0 text-muted-foreground" />
|
|
69
|
+
</Button>
|
|
70
|
+
</DropdownMenuTrigger>
|
|
71
|
+
<DropdownMenuContent align="end" className="w-44">
|
|
72
|
+
{REVIEW_STATUSES.map((nextStatus) => (
|
|
73
|
+
<DropdownMenuItem
|
|
74
|
+
key={nextStatus}
|
|
75
|
+
disabled={setStatus.isPending}
|
|
76
|
+
onSelect={() => {
|
|
77
|
+
if (nextStatus === currentStatus || setStatus.isPending) return;
|
|
78
|
+
setStatus.mutate(
|
|
79
|
+
{
|
|
80
|
+
resourceType: "design",
|
|
81
|
+
resourceId: designId,
|
|
82
|
+
status: nextStatus,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
onError: () => toast.error(t("review.status.saveFailed")),
|
|
86
|
+
},
|
|
87
|
+
);
|
|
88
|
+
}}
|
|
89
|
+
>
|
|
90
|
+
{label(nextStatus)}
|
|
91
|
+
</DropdownMenuItem>
|
|
92
|
+
))}
|
|
93
|
+
</DropdownMenuContent>
|
|
94
|
+
</DropdownMenu>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
@@ -733,9 +733,175 @@
|
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
735
|
|
|
736
|
+
function reviewAnchorElementAtPoint(
|
|
737
|
+
clientX: number,
|
|
738
|
+
clientY: number,
|
|
739
|
+
): Element | null {
|
|
740
|
+
var element = elementFromEditorPoint(clientX, clientY);
|
|
741
|
+
if (!element) return null;
|
|
742
|
+
return element.closest(
|
|
743
|
+
"[data-agent-native-node-id],[data-code-layer-id],[data-layer-id],[data-builder-id],[id]",
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
function reviewNodeElements(nodeIds: string[]): Record<string, Element> {
|
|
748
|
+
var wanted: Record<string, boolean> = {};
|
|
749
|
+
var found: Record<string, Element> = {};
|
|
750
|
+
for (var index = 0; index < nodeIds.length; index += 1) {
|
|
751
|
+
var nodeId = nodeIds[index];
|
|
752
|
+
if (nodeId) wanted[nodeId] = true;
|
|
753
|
+
}
|
|
754
|
+
var candidates = document.querySelectorAll(
|
|
755
|
+
"[data-agent-native-node-id],[data-code-layer-id],[data-layer-id],[data-builder-id],[id]",
|
|
756
|
+
);
|
|
757
|
+
for (
|
|
758
|
+
var candidateIndex = 0;
|
|
759
|
+
candidateIndex < candidates.length;
|
|
760
|
+
candidateIndex += 1
|
|
761
|
+
) {
|
|
762
|
+
var candidate = candidates[candidateIndex];
|
|
763
|
+
var candidateId = getNodeId(candidate);
|
|
764
|
+
if (candidateId && wanted[candidateId] && !found[candidateId]) {
|
|
765
|
+
found[candidateId] = candidate;
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
return found;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
function postReviewLayout(): void {
|
|
772
|
+
try {
|
|
773
|
+
(window.parent as Window).postMessage(
|
|
774
|
+
{ type: "agent-native:review-layout" },
|
|
775
|
+
"*",
|
|
776
|
+
);
|
|
777
|
+
} catch (_err) {}
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
var reviewLayoutFrame = 0;
|
|
781
|
+
function scheduleReviewLayout(): void {
|
|
782
|
+
if (reviewLayoutFrame) return;
|
|
783
|
+
reviewLayoutFrame = window.requestAnimationFrame(function () {
|
|
784
|
+
reviewLayoutFrame = 0;
|
|
785
|
+
postReviewLayout();
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
window.addEventListener("scroll", scheduleReviewLayout, true);
|
|
790
|
+
window.addEventListener("resize", scheduleReviewLayout);
|
|
791
|
+
if (document.readyState === "loading") {
|
|
792
|
+
document.addEventListener("DOMContentLoaded", scheduleReviewLayout, {
|
|
793
|
+
once: true,
|
|
794
|
+
});
|
|
795
|
+
} else {
|
|
796
|
+
scheduleReviewLayout();
|
|
797
|
+
}
|
|
798
|
+
|
|
736
799
|
window.addEventListener("message", function (e: MessageEvent) {
|
|
737
800
|
if (e.source !== window.parent) return;
|
|
738
801
|
if (!e.data) return;
|
|
802
|
+
if (e.data.type === "agent-native:review-anchor-at-point") {
|
|
803
|
+
var reviewPointCorrelationId: string = e.data.correlationId;
|
|
804
|
+
var reviewPointX: number = Number(e.data.x);
|
|
805
|
+
var reviewPointY: number = Number(e.data.y);
|
|
806
|
+
if (!reviewPointCorrelationId) return;
|
|
807
|
+
var reviewPointElement = reviewAnchorElementAtPoint(
|
|
808
|
+
reviewPointX,
|
|
809
|
+
reviewPointY,
|
|
810
|
+
);
|
|
811
|
+
try {
|
|
812
|
+
(window.parent as Window).postMessage(
|
|
813
|
+
{
|
|
814
|
+
type: "agent-native:review-anchor-at-point-result",
|
|
815
|
+
correlationId: reviewPointCorrelationId,
|
|
816
|
+
nodeId: reviewPointElement
|
|
817
|
+
? getNodeId(reviewPointElement) || undefined
|
|
818
|
+
: undefined,
|
|
819
|
+
layerName:
|
|
820
|
+
reviewPointElement?.getAttribute(
|
|
821
|
+
"data-agent-native-layer-name",
|
|
822
|
+
) || undefined,
|
|
823
|
+
tagName: reviewPointElement?.tagName?.toLowerCase() || undefined,
|
|
824
|
+
},
|
|
825
|
+
"*",
|
|
826
|
+
);
|
|
827
|
+
} catch (_err) {}
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
830
|
+
if (e.data.type === "agent-native:review-node-rects") {
|
|
831
|
+
var reviewRectsCorrelationId: string = e.data.correlationId;
|
|
832
|
+
var rawReviewNodeIds: unknown = e.data.nodeIds;
|
|
833
|
+
if (!reviewRectsCorrelationId || !Array.isArray(rawReviewNodeIds)) return;
|
|
834
|
+
var reviewNodeIds = rawReviewNodeIds
|
|
835
|
+
.filter(function (value): value is string {
|
|
836
|
+
return typeof value === "string" && value.length > 0;
|
|
837
|
+
})
|
|
838
|
+
.slice(0, 500);
|
|
839
|
+
var reviewElements = reviewNodeElements(reviewNodeIds);
|
|
840
|
+
var reviewRects: Record<
|
|
841
|
+
string,
|
|
842
|
+
{ left: number; top: number; width: number; height: number }
|
|
843
|
+
> = {};
|
|
844
|
+
for (
|
|
845
|
+
var reviewIndex = 0;
|
|
846
|
+
reviewIndex < reviewNodeIds.length;
|
|
847
|
+
reviewIndex += 1
|
|
848
|
+
) {
|
|
849
|
+
var reviewNodeId = reviewNodeIds[reviewIndex];
|
|
850
|
+
var reviewElement = reviewElements[reviewNodeId];
|
|
851
|
+
if (!reviewElement) continue;
|
|
852
|
+
var reviewRect = reviewElement.getBoundingClientRect();
|
|
853
|
+
reviewRects[reviewNodeId] = {
|
|
854
|
+
left: reviewRect.left,
|
|
855
|
+
top: reviewRect.top,
|
|
856
|
+
width: reviewRect.width,
|
|
857
|
+
height: reviewRect.height,
|
|
858
|
+
};
|
|
859
|
+
}
|
|
860
|
+
try {
|
|
861
|
+
(window.parent as Window).postMessage(
|
|
862
|
+
{
|
|
863
|
+
type: "agent-native:review-node-rects-result",
|
|
864
|
+
correlationId: reviewRectsCorrelationId,
|
|
865
|
+
rects: reviewRects,
|
|
866
|
+
viewportWidth: window.innerWidth,
|
|
867
|
+
viewportHeight: window.innerHeight,
|
|
868
|
+
},
|
|
869
|
+
"*",
|
|
870
|
+
);
|
|
871
|
+
} catch (_err) {}
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
874
|
+
if (e.data.type === "agent-native:review-focus") {
|
|
875
|
+
var reviewFocusCorrelationId: string = e.data.correlationId;
|
|
876
|
+
var reviewFocusNodeId: string = String(e.data.nodeId || "");
|
|
877
|
+
if (!reviewFocusCorrelationId || !reviewFocusNodeId) return;
|
|
878
|
+
var reviewFocusElement = reviewNodeElements([reviewFocusNodeId])[
|
|
879
|
+
reviewFocusNodeId
|
|
880
|
+
] as HTMLElement | undefined;
|
|
881
|
+
if (reviewFocusElement) {
|
|
882
|
+
reviewFocusElement.scrollIntoView({
|
|
883
|
+
block: "center",
|
|
884
|
+
inline: "center",
|
|
885
|
+
});
|
|
886
|
+
var previousReviewBoxShadow = reviewFocusElement.style.boxShadow;
|
|
887
|
+
reviewFocusElement.style.boxShadow =
|
|
888
|
+
"0 0 0 2px var(--design-editor-accent-color, #2563eb)";
|
|
889
|
+
window.setTimeout(function () {
|
|
890
|
+
reviewFocusElement!.style.boxShadow = previousReviewBoxShadow;
|
|
891
|
+
}, 700);
|
|
892
|
+
}
|
|
893
|
+
try {
|
|
894
|
+
(window.parent as Window).postMessage(
|
|
895
|
+
{
|
|
896
|
+
type: "agent-native:review-focus-result",
|
|
897
|
+
correlationId: reviewFocusCorrelationId,
|
|
898
|
+
focused: Boolean(reviewFocusElement),
|
|
899
|
+
},
|
|
900
|
+
"*",
|
|
901
|
+
);
|
|
902
|
+
} catch (_err) {}
|
|
903
|
+
return;
|
|
904
|
+
}
|
|
739
905
|
if (e.data.type === "agent-native:hit-test-preview-clear") {
|
|
740
906
|
hideInsertionGuide();
|
|
741
907
|
return;
|
|
@@ -81,6 +81,7 @@ export function Layout({ children }: LayoutProps) {
|
|
|
81
81
|
? `show-questions:${designScope.id}`
|
|
82
82
|
: "show-questions";
|
|
83
83
|
const { questions: pendingDesignQuestions } = useGuidedQuestionFlow({
|
|
84
|
+
enabled: hasSession,
|
|
84
85
|
stateKey: designQuestionStateKey,
|
|
85
86
|
queryKey: [designQuestionStateKey],
|
|
86
87
|
browserTabId,
|