@agent-native/core 0.79.12 → 0.79.16
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 +25 -0
- package/corpus/core/docs/content/locales/zh-TW/a2a-protocol.md +68 -68
- package/corpus/core/docs/content/locales/zh-TW/actions.md +82 -82
- package/corpus/core/docs/content/locales/zh-TW/agent-mentions.md +22 -22
- package/corpus/core/docs/content/locales/zh-TW/agent-surfaces.md +82 -82
- package/corpus/core/docs/content/locales/zh-TW/agent-teams.md +29 -29
- package/corpus/core/docs/content/locales/zh-TW/agent-web-surfaces.md +11 -11
- package/corpus/core/docs/content/locales/zh-TW/audit-log.md +16 -16
- package/corpus/core/docs/content/locales/zh-TW/authentication.md +32 -32
- package/corpus/core/docs/content/locales/zh-TW/automations.md +32 -32
- package/corpus/core/docs/content/locales/zh-TW/blueprint-installer.md +19 -19
- package/corpus/core/docs/content/locales/zh-TW/cli-adapters.md +17 -17
- package/corpus/core/docs/content/locales/zh-TW/client.md +62 -62
- package/corpus/core/docs/content/locales/zh-TW/cloneable-saas.md +32 -32
- package/corpus/core/docs/content/locales/zh-TW/code-agents-ui.md +91 -91
- package/corpus/core/docs/content/locales/zh-TW/components.md +51 -51
- package/corpus/core/docs/content/locales/zh-TW/context-awareness.md +66 -66
- package/corpus/core/docs/content/locales/zh-TW/creating-templates.md +39 -39
- package/corpus/core/docs/content/locales/zh-TW/cross-app-sso.md +29 -29
- package/corpus/core/docs/content/locales/zh-TW/database.md +21 -21
- package/corpus/core/docs/content/locales/zh-TW/deployment.md +37 -37
- package/corpus/core/docs/content/locales/zh-TW/dispatch.md +43 -43
- package/corpus/core/docs/content/locales/zh-TW/drop-in-agent.md +34 -34
- package/corpus/core/docs/content/locales/zh-TW/durable-resume.md +18 -18
- package/corpus/core/docs/content/locales/zh-TW/embedding-sdk.md +73 -73
- package/corpus/core/docs/content/locales/zh-TW/evals.md +16 -16
- package/corpus/core/docs/content/locales/zh-TW/extensions.md +81 -81
- package/corpus/core/docs/content/locales/zh-TW/external-agents.md +146 -146
- package/corpus/core/docs/content/locales/zh-TW/faq.md +43 -43
- package/corpus/core/docs/content/locales/zh-TW/file-uploads.md +11 -11
- package/corpus/core/docs/content/locales/zh-TW/frames.md +33 -33
- package/corpus/core/docs/content/locales/zh-TW/getting-started.md +28 -28
- package/corpus/core/docs/content/locales/zh-TW/harness-agents.md +78 -78
- package/corpus/core/docs/content/locales/zh-TW/human-approval.md +27 -27
- package/corpus/core/docs/content/locales/zh-TW/internationalization.md +19 -19
- package/corpus/core/docs/content/locales/zh-TW/key-concepts.md +68 -68
- package/corpus/core/docs/content/locales/zh-TW/local-file-mode.md +50 -50
- package/corpus/core/docs/content/locales/zh-TW/mcp-apps.md +38 -38
- package/corpus/core/docs/content/locales/zh-TW/mcp-clients.md +67 -67
- package/corpus/core/docs/content/locales/zh-TW/mcp-protocol.md +50 -50
- package/corpus/core/docs/content/locales/zh-TW/messaging.md +99 -99
- package/corpus/core/docs/content/locales/zh-TW/migration-workbench.md +6 -6
- package/corpus/core/docs/content/locales/zh-TW/multi-app-workspace.md +39 -39
- package/corpus/core/docs/content/locales/zh-TW/multi-tenancy.md +7 -7
- package/corpus/core/docs/content/locales/zh-TW/native-chat-ui.md +38 -38
- package/corpus/core/docs/content/locales/zh-TW/notifications.md +23 -23
- package/corpus/core/docs/content/locales/zh-TW/observability.md +49 -49
- package/corpus/core/docs/content/locales/zh-TW/observational-memory.md +23 -23
- package/corpus/core/docs/content/locales/zh-TW/onboarding.md +40 -40
- package/corpus/core/docs/content/locales/zh-TW/plan-plugin.md +37 -37
- package/corpus/core/docs/content/locales/zh-TW/pr-visual-recap.md +72 -72
- package/corpus/core/docs/content/locales/zh-TW/processors.md +17 -17
- package/corpus/core/docs/content/locales/zh-TW/progress.md +15 -15
- package/corpus/core/docs/content/locales/zh-TW/pure-agent-apps.md +10 -10
- package/corpus/core/docs/content/locales/zh-TW/real-time-collaboration.md +103 -103
- package/corpus/core/docs/content/locales/zh-TW/recurring-jobs.md +19 -19
- package/corpus/core/docs/content/locales/zh-TW/routing.md +9 -9
- package/corpus/core/docs/content/locales/zh-TW/sandbox-adapters.md +48 -48
- package/corpus/core/docs/content/locales/zh-TW/security.md +49 -49
- package/corpus/core/docs/content/locales/zh-TW/server.md +47 -47
- package/corpus/core/docs/content/locales/zh-TW/sharing.md +22 -22
- package/corpus/core/docs/content/locales/zh-TW/skills-guide.md +46 -46
- package/corpus/core/docs/content/locales/zh-TW/template-analytics.md +40 -40
- package/corpus/core/docs/content/locales/zh-TW/template-assets.md +69 -69
- package/corpus/core/docs/content/locales/zh-TW/template-brain.md +81 -81
- package/corpus/core/docs/content/locales/zh-TW/template-calendar.md +40 -40
- package/corpus/core/docs/content/locales/zh-TW/template-chat.md +27 -27
- package/corpus/core/docs/content/locales/zh-TW/template-clips.md +85 -85
- package/corpus/core/docs/content/locales/zh-TW/template-content.md +65 -66
- package/corpus/core/docs/content/locales/zh-TW/template-design.md +29 -29
- package/corpus/core/docs/content/locales/zh-TW/template-dispatch.md +51 -51
- package/corpus/core/docs/content/locales/zh-TW/template-forms.md +25 -25
- package/corpus/core/docs/content/locales/zh-TW/template-mail.md +71 -71
- package/corpus/core/docs/content/locales/zh-TW/template-plan.md +92 -92
- package/corpus/core/docs/content/locales/zh-TW/template-slides.md +52 -52
- package/corpus/core/docs/content/locales/zh-TW/template-videos.md +30 -30
- package/corpus/core/docs/content/locales/zh-TW/tracking.md +29 -29
- package/corpus/core/docs/content/locales/zh-TW/using-your-agent.md +18 -18
- package/corpus/core/docs/content/locales/zh-TW/voice-input.md +19 -19
- package/corpus/core/docs/content/locales/zh-TW/what-is-agent-native.md +61 -61
- package/corpus/core/docs/content/locales/zh-TW/workspace-connections.md +41 -41
- package/corpus/core/docs/content/locales/zh-TW/workspace-management.md +27 -27
- package/corpus/core/docs/content/locales/zh-TW/workspace.md +58 -58
- package/corpus/core/docs/content/locales/zh-TW/writing-agent-instructions.md +41 -41
- package/corpus/core/docs/content/template-clips.md +48 -2
- package/corpus/core/package.json +2 -1
- package/corpus/core/src/client/AgentPanel.tsx +29 -6
- package/corpus/core/src/deploy/build.ts +432 -42
- package/corpus/core/src/deploy/route-discovery.ts +1 -1
- package/corpus/core/src/server/edge.ts +50 -0
- package/corpus/core/src/styles/agent-native.css +123 -0
- package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +44 -44
- package/corpus/core/src/vite/client.ts +1 -0
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +5 -3
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +69 -70
- package/corpus/templates/analytics/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/assets/app/components/layout/Layout.tsx +3 -3
- package/corpus/templates/assets/app/i18n/zh-TW.ts +82 -82
- package/corpus/templates/assets/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/brain/app/components/layout/Layout.tsx +6 -4
- package/corpus/templates/brain/app/i18n/zh-TW.ts +90 -90
- package/corpus/templates/brain/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +1 -1
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +1 -1
- package/corpus/templates/calendar/app/i18n/zh-TW.ts +57 -57
- package/corpus/templates/calendar/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/calendar/server/lib/booking-og-fonts.ts +20 -6
- package/corpus/templates/calendar/server/lib/booking-og-image.ts +17 -9
- package/corpus/templates/chat/app/components/layout/Layout.tsx +5 -3
- package/corpus/templates/chat/app/i18n/zh-TW.ts +3 -3
- package/corpus/templates/chat/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/clips/AGENTS.md +6 -0
- package/corpus/templates/clips/actions/delete-recording-permanent.ts +7 -1
- package/corpus/templates/clips/actions/get-recording-player-data.ts +44 -2
- package/corpus/templates/clips/actions/navigate.ts +2 -0
- package/corpus/templates/clips/actions/save-bug-report-context.ts +173 -0
- package/corpus/templates/clips/actions/view-screen.ts +58 -7
- package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +9 -3
- package/corpus/templates/clips/app/hooks/use-navigation-state.ts +17 -0
- package/corpus/templates/clips/app/i18n/ar-SA.ts +31 -0
- package/corpus/templates/clips/app/i18n/de-DE.ts +32 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +32 -0
- package/corpus/templates/clips/app/i18n/es-ES.ts +32 -0
- package/corpus/templates/clips/app/i18n/fr-FR.ts +32 -0
- package/corpus/templates/clips/app/i18n/hi-IN.ts +32 -0
- package/corpus/templates/clips/app/i18n/ja-JP.ts +31 -0
- package/corpus/templates/clips/app/i18n/ko-KR.ts +32 -0
- package/corpus/templates/clips/app/i18n/pt-BR.ts +32 -0
- package/corpus/templates/clips/app/i18n/zh-CN.ts +30 -0
- package/corpus/templates/clips/app/i18n/zh-TW.ts +461 -451
- package/corpus/templates/clips/app/routes/bug-report.done.tsx +126 -0
- package/corpus/templates/clips/app/routes/bug-report.tsx +222 -0
- package/corpus/templates/clips/app/routes/record.tsx +104 -12
- package/corpus/templates/clips/changelog/2026-06-26-brief-network-blips-no-longer-block-recording-or-wrongly-pro.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-bug-report-recordings-can-keep-redacted-host-app-context-wit.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-bug-report-widgets-can-launch-clips-recordings-from-embedded.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-desktop-recording-keeps-connected-users-out-of-the-storage-s.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-if-a-recording-can-t-be-uploaded-the-chrome-extension-now-sa.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/clips/chrome-extension/public/manifest.json +9 -2
- package/corpus/templates/clips/chrome-extension/src/background.ts +43 -0
- package/corpus/templates/clips/chrome-extension/src/offscreen.ts +111 -6
- package/corpus/templates/clips/chrome-extension/src/popup.ts +18 -7
- package/corpus/templates/clips/desktop/src/app.tsx +53 -19
- package/corpus/templates/clips/server/db/schema.ts +26 -0
- package/corpus/templates/clips/server/lib/public-agent-context.ts +51 -0
- package/corpus/templates/clips/server/plugins/auth.ts +1 -0
- package/corpus/templates/clips/server/plugins/db.ts +28 -0
- package/corpus/templates/clips/server/routes/api/agent-context.json.get.ts +4 -1
- package/corpus/templates/clips/shared/bug-report.ts +161 -0
- package/corpus/templates/content/app/components/layout/Layout.tsx +10 -8
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +1 -1
- package/corpus/templates/content/app/i18n/zh-TW.ts +67 -66
- package/corpus/templates/content/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/design/app/components/layout/Layout.tsx +3 -3
- package/corpus/templates/design/app/i18n/zh-TW.ts +44 -44
- package/corpus/templates/design/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/dispatch/app/i18n/zh-TW.ts +5 -4
- package/corpus/templates/dispatch/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/forms/app/components/layout/Layout.tsx +4 -2
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +1 -1
- package/corpus/templates/forms/app/i18n/zh-TW.ts +48 -48
- package/corpus/templates/forms/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +3 -3
- package/corpus/templates/macros/app/i18n/zh-TW.ts +5 -5
- package/corpus/templates/macros/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/mail/app/i18n/zh-TW.ts +83 -83
- package/corpus/templates/mail/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/plan/app/components/layout/Layout.tsx +5 -3
- package/corpus/templates/plan/app/i18n/zh-TW.ts +69 -69
- package/corpus/templates/plan/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/slides/app/components/layout/Layout.tsx +3 -3
- package/corpus/templates/slides/app/i18n/zh-TW.ts +64 -64
- package/corpus/templates/slides/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/templates/videos/app/components/layout/Layout.tsx +2 -2
- package/corpus/templates/videos/app/i18n/zh-TW.ts +54 -54
- package/corpus/templates/videos/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +16 -6
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/collab/routes.d.ts +2 -2
- package/dist/deploy/build.d.ts +3 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +372 -37
- package/dist/deploy/build.js.map +1 -1
- package/dist/deploy/route-discovery.d.ts +1 -1
- package/dist/deploy/route-discovery.js +1 -1
- package/dist/deploy/route-discovery.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +5 -5
- package/dist/resources/handlers.d.ts +3 -3
- package/dist/server/agent-engine-api-key-route.d.ts +2 -2
- package/dist/server/edge.d.ts +11 -0
- package/dist/server/edge.d.ts.map +1 -0
- package/dist/server/edge.js +11 -0
- package/dist/server/edge.js.map +1 -0
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/styles/agent-native.css +123 -0
- package/dist/templates/default/app/i18n/zh-TW.ts +44 -44
- 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/locales/zh-TW/a2a-protocol.md +68 -68
- package/docs/content/locales/zh-TW/actions.md +82 -82
- package/docs/content/locales/zh-TW/agent-mentions.md +22 -22
- package/docs/content/locales/zh-TW/agent-surfaces.md +82 -82
- package/docs/content/locales/zh-TW/agent-teams.md +29 -29
- package/docs/content/locales/zh-TW/agent-web-surfaces.md +11 -11
- package/docs/content/locales/zh-TW/audit-log.md +16 -16
- package/docs/content/locales/zh-TW/authentication.md +32 -32
- package/docs/content/locales/zh-TW/automations.md +32 -32
- package/docs/content/locales/zh-TW/blueprint-installer.md +19 -19
- package/docs/content/locales/zh-TW/cli-adapters.md +17 -17
- package/docs/content/locales/zh-TW/client.md +62 -62
- package/docs/content/locales/zh-TW/cloneable-saas.md +32 -32
- package/docs/content/locales/zh-TW/code-agents-ui.md +91 -91
- package/docs/content/locales/zh-TW/components.md +51 -51
- package/docs/content/locales/zh-TW/context-awareness.md +66 -66
- package/docs/content/locales/zh-TW/creating-templates.md +39 -39
- package/docs/content/locales/zh-TW/cross-app-sso.md +29 -29
- package/docs/content/locales/zh-TW/database.md +21 -21
- package/docs/content/locales/zh-TW/deployment.md +37 -37
- package/docs/content/locales/zh-TW/dispatch.md +43 -43
- package/docs/content/locales/zh-TW/drop-in-agent.md +34 -34
- package/docs/content/locales/zh-TW/durable-resume.md +18 -18
- package/docs/content/locales/zh-TW/embedding-sdk.md +73 -73
- package/docs/content/locales/zh-TW/evals.md +16 -16
- package/docs/content/locales/zh-TW/extensions.md +81 -81
- package/docs/content/locales/zh-TW/external-agents.md +146 -146
- package/docs/content/locales/zh-TW/faq.md +43 -43
- package/docs/content/locales/zh-TW/file-uploads.md +11 -11
- package/docs/content/locales/zh-TW/frames.md +33 -33
- package/docs/content/locales/zh-TW/getting-started.md +28 -28
- package/docs/content/locales/zh-TW/harness-agents.md +78 -78
- package/docs/content/locales/zh-TW/human-approval.md +27 -27
- package/docs/content/locales/zh-TW/internationalization.md +19 -19
- package/docs/content/locales/zh-TW/key-concepts.md +68 -68
- package/docs/content/locales/zh-TW/local-file-mode.md +50 -50
- package/docs/content/locales/zh-TW/mcp-apps.md +38 -38
- package/docs/content/locales/zh-TW/mcp-clients.md +67 -67
- package/docs/content/locales/zh-TW/mcp-protocol.md +50 -50
- package/docs/content/locales/zh-TW/messaging.md +99 -99
- package/docs/content/locales/zh-TW/migration-workbench.md +6 -6
- package/docs/content/locales/zh-TW/multi-app-workspace.md +39 -39
- package/docs/content/locales/zh-TW/multi-tenancy.md +7 -7
- package/docs/content/locales/zh-TW/native-chat-ui.md +38 -38
- package/docs/content/locales/zh-TW/notifications.md +23 -23
- package/docs/content/locales/zh-TW/observability.md +49 -49
- package/docs/content/locales/zh-TW/observational-memory.md +23 -23
- package/docs/content/locales/zh-TW/onboarding.md +40 -40
- package/docs/content/locales/zh-TW/plan-plugin.md +37 -37
- package/docs/content/locales/zh-TW/pr-visual-recap.md +72 -72
- package/docs/content/locales/zh-TW/processors.md +17 -17
- package/docs/content/locales/zh-TW/progress.md +15 -15
- package/docs/content/locales/zh-TW/pure-agent-apps.md +10 -10
- package/docs/content/locales/zh-TW/real-time-collaboration.md +103 -103
- package/docs/content/locales/zh-TW/recurring-jobs.md +19 -19
- package/docs/content/locales/zh-TW/routing.md +9 -9
- package/docs/content/locales/zh-TW/sandbox-adapters.md +48 -48
- package/docs/content/locales/zh-TW/security.md +49 -49
- package/docs/content/locales/zh-TW/server.md +47 -47
- package/docs/content/locales/zh-TW/sharing.md +22 -22
- package/docs/content/locales/zh-TW/skills-guide.md +46 -46
- package/docs/content/locales/zh-TW/template-analytics.md +40 -40
- package/docs/content/locales/zh-TW/template-assets.md +69 -69
- package/docs/content/locales/zh-TW/template-brain.md +81 -81
- package/docs/content/locales/zh-TW/template-calendar.md +40 -40
- package/docs/content/locales/zh-TW/template-chat.md +27 -27
- package/docs/content/locales/zh-TW/template-clips.md +85 -85
- package/docs/content/locales/zh-TW/template-content.md +65 -66
- package/docs/content/locales/zh-TW/template-design.md +29 -29
- package/docs/content/locales/zh-TW/template-dispatch.md +51 -51
- package/docs/content/locales/zh-TW/template-forms.md +25 -25
- package/docs/content/locales/zh-TW/template-mail.md +71 -71
- package/docs/content/locales/zh-TW/template-plan.md +92 -92
- package/docs/content/locales/zh-TW/template-slides.md +52 -52
- package/docs/content/locales/zh-TW/template-videos.md +30 -30
- package/docs/content/locales/zh-TW/tracking.md +29 -29
- package/docs/content/locales/zh-TW/using-your-agent.md +18 -18
- package/docs/content/locales/zh-TW/voice-input.md +19 -19
- package/docs/content/locales/zh-TW/what-is-agent-native.md +61 -61
- package/docs/content/locales/zh-TW/workspace-connections.md +41 -41
- package/docs/content/locales/zh-TW/workspace-management.md +27 -27
- package/docs/content/locales/zh-TW/workspace.md +58 -58
- package/docs/content/locales/zh-TW/writing-agent-instructions.md +41 -41
- package/docs/content/template-clips.md +48 -2
- package/package.json +2 -1
- package/src/templates/default/app/i18n/zh-TW.ts +44 -44
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { appBasePath, useT } from "@agent-native/core/client";
|
|
2
|
+
import {
|
|
3
|
+
IconArrowLeft,
|
|
4
|
+
IconCheck,
|
|
5
|
+
IconCopy,
|
|
6
|
+
IconExternalLink,
|
|
7
|
+
} from "@tabler/icons-react";
|
|
8
|
+
import { useEffect, useMemo, useState } from "react";
|
|
9
|
+
import { Link, useLocation } from "react-router";
|
|
10
|
+
|
|
11
|
+
import { Button } from "@/components/ui/button";
|
|
12
|
+
import enMessages from "@/i18n/en-US";
|
|
13
|
+
|
|
14
|
+
export function meta() {
|
|
15
|
+
return [{ title: enMessages.bugReportRoute.donePageTitle }];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function absoluteAppUrl(path: string) {
|
|
19
|
+
if (typeof window === "undefined") return path;
|
|
20
|
+
return new URL(`${appBasePath()}${path}`, window.location.origin).toString();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function targetOrigin(returnUrl: string | null) {
|
|
24
|
+
if (!returnUrl) return "*";
|
|
25
|
+
try {
|
|
26
|
+
return new URL(returnUrl).origin;
|
|
27
|
+
} catch {
|
|
28
|
+
return "*";
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default function BugReportDoneRoute() {
|
|
33
|
+
const t = useT();
|
|
34
|
+
const location = useLocation();
|
|
35
|
+
const [copied, setCopied] = useState(false);
|
|
36
|
+
const params = useMemo(
|
|
37
|
+
() => new URLSearchParams(location.search),
|
|
38
|
+
[location.search],
|
|
39
|
+
);
|
|
40
|
+
const recordingId = params.get("recordingId")?.trim() || null;
|
|
41
|
+
const returnUrl = params.get("returnUrl")?.trim() || null;
|
|
42
|
+
|
|
43
|
+
const recordingUrl = recordingId
|
|
44
|
+
? absoluteAppUrl(`/r/${encodeURIComponent(recordingId)}`)
|
|
45
|
+
: null;
|
|
46
|
+
const embedUrl = recordingId
|
|
47
|
+
? absoluteAppUrl(`/embed/${encodeURIComponent(recordingId)}`)
|
|
48
|
+
: null;
|
|
49
|
+
const agentContextUrl = recordingId
|
|
50
|
+
? absoluteAppUrl(
|
|
51
|
+
`/api/agent-context.json?id=${encodeURIComponent(recordingId)}`,
|
|
52
|
+
)
|
|
53
|
+
: null;
|
|
54
|
+
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
if (!recordingId || !recordingUrl) return;
|
|
57
|
+
const message = {
|
|
58
|
+
type: "agent-native.clips.bug-report.submitted",
|
|
59
|
+
recordingId,
|
|
60
|
+
recordingUrl,
|
|
61
|
+
embedUrl,
|
|
62
|
+
agentContextUrl,
|
|
63
|
+
};
|
|
64
|
+
const origin = targetOrigin(returnUrl);
|
|
65
|
+
window.opener?.postMessage(message, origin);
|
|
66
|
+
if (window.parent && window.parent !== window) {
|
|
67
|
+
window.parent.postMessage(message, origin);
|
|
68
|
+
}
|
|
69
|
+
}, [agentContextUrl, embedUrl, recordingId, recordingUrl, returnUrl]);
|
|
70
|
+
|
|
71
|
+
const copyRecordingUrl = async () => {
|
|
72
|
+
if (!recordingUrl) return;
|
|
73
|
+
await navigator.clipboard.writeText(recordingUrl);
|
|
74
|
+
setCopied(true);
|
|
75
|
+
window.setTimeout(() => setCopied(false), 1800);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<main className="min-h-screen bg-background text-foreground">
|
|
80
|
+
<div className="mx-auto flex min-h-screen w-full max-w-lg flex-col justify-center px-4 py-5 sm:px-6">
|
|
81
|
+
<section className="rounded-lg border bg-card p-5 text-center shadow-sm">
|
|
82
|
+
<div className="mx-auto flex h-12 w-12 items-center justify-center rounded-md bg-emerald-600 text-white">
|
|
83
|
+
<IconCheck size={24} />
|
|
84
|
+
</div>
|
|
85
|
+
<h1 className="mt-4 text-xl font-semibold">
|
|
86
|
+
{recordingId
|
|
87
|
+
? t("bugReportRoute.doneTitle")
|
|
88
|
+
: t("bugReportRoute.missingRecording")}
|
|
89
|
+
</h1>
|
|
90
|
+
<p className="mx-auto mt-2 max-w-sm text-sm leading-6 text-muted-foreground">
|
|
91
|
+
{t("bugReportRoute.doneDescription")}
|
|
92
|
+
</p>
|
|
93
|
+
|
|
94
|
+
{recordingUrl ? (
|
|
95
|
+
<div className="mt-5 grid gap-2">
|
|
96
|
+
<Button asChild className="h-11">
|
|
97
|
+
<Link to={`/r/${recordingId}`}>
|
|
98
|
+
<IconExternalLink size={18} />
|
|
99
|
+
{t("bugReportRoute.openRecording")}
|
|
100
|
+
</Link>
|
|
101
|
+
</Button>
|
|
102
|
+
<Button
|
|
103
|
+
variant="outline"
|
|
104
|
+
className="h-10"
|
|
105
|
+
onClick={copyRecordingUrl}
|
|
106
|
+
>
|
|
107
|
+
<IconCopy size={17} />
|
|
108
|
+
{copied
|
|
109
|
+
? t("bugReportRoute.copied")
|
|
110
|
+
: t("bugReportRoute.copyLink")}
|
|
111
|
+
</Button>
|
|
112
|
+
{returnUrl ? (
|
|
113
|
+
<Button variant="ghost" className="h-10" asChild>
|
|
114
|
+
<a href={returnUrl}>
|
|
115
|
+
<IconArrowLeft size={17} />
|
|
116
|
+
{t("bugReportRoute.returnToProduct")}
|
|
117
|
+
</a>
|
|
118
|
+
</Button>
|
|
119
|
+
) : null}
|
|
120
|
+
</div>
|
|
121
|
+
) : null}
|
|
122
|
+
</section>
|
|
123
|
+
</div>
|
|
124
|
+
</main>
|
|
125
|
+
);
|
|
126
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { appBasePath, useT } from "@agent-native/core/client";
|
|
2
|
+
import {
|
|
3
|
+
bugReportContextToSearchParams,
|
|
4
|
+
parseBugReportContext,
|
|
5
|
+
type BugReportContext,
|
|
6
|
+
type BugReportSeverity,
|
|
7
|
+
} from "@shared/bug-report";
|
|
8
|
+
import {
|
|
9
|
+
IconArrowRight,
|
|
10
|
+
IconBug,
|
|
11
|
+
IconExternalLink,
|
|
12
|
+
IconShieldCheck,
|
|
13
|
+
} from "@tabler/icons-react";
|
|
14
|
+
import { useEffect, useMemo, useState } from "react";
|
|
15
|
+
import { useLocation, useOutlet } from "react-router";
|
|
16
|
+
|
|
17
|
+
import { Button } from "@/components/ui/button";
|
|
18
|
+
import { Input } from "@/components/ui/input";
|
|
19
|
+
import { Label } from "@/components/ui/label";
|
|
20
|
+
import {
|
|
21
|
+
Select,
|
|
22
|
+
SelectContent,
|
|
23
|
+
SelectItem,
|
|
24
|
+
SelectTrigger,
|
|
25
|
+
SelectValue,
|
|
26
|
+
} from "@/components/ui/select";
|
|
27
|
+
import { Textarea } from "@/components/ui/textarea";
|
|
28
|
+
import enMessages from "@/i18n/en-US";
|
|
29
|
+
import { cn } from "@/lib/utils";
|
|
30
|
+
|
|
31
|
+
export function meta() {
|
|
32
|
+
return [{ title: enMessages.bugReportRoute.pageTitle }];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function openRecorder(url: string) {
|
|
36
|
+
const opened = window.open(
|
|
37
|
+
url,
|
|
38
|
+
"agent-native-clips-bug-report",
|
|
39
|
+
"popup,width=1120,height=820",
|
|
40
|
+
);
|
|
41
|
+
if (!opened) {
|
|
42
|
+
window.location.href = url;
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
opened.focus();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default function BugReportRoute() {
|
|
49
|
+
const t = useT();
|
|
50
|
+
const location = useLocation();
|
|
51
|
+
const outlet = useOutlet();
|
|
52
|
+
const initialContext = useMemo(() => {
|
|
53
|
+
const params = new URLSearchParams(location.search);
|
|
54
|
+
return parseBugReportContext(params, { allowLoose: true });
|
|
55
|
+
}, [location.search]);
|
|
56
|
+
|
|
57
|
+
const [title, setTitle] = useState(initialContext?.title ?? "");
|
|
58
|
+
const [description, setDescription] = useState(
|
|
59
|
+
initialContext?.description ?? "",
|
|
60
|
+
);
|
|
61
|
+
const [reporterEmail, setReporterEmail] = useState(
|
|
62
|
+
initialContext?.reporterEmail ?? "",
|
|
63
|
+
);
|
|
64
|
+
const [severity, setSeverity] = useState<BugReportSeverity>(
|
|
65
|
+
initialContext?.severity ?? "normal",
|
|
66
|
+
);
|
|
67
|
+
const [referrer, setReferrer] = useState<string | null>(null);
|
|
68
|
+
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
setReferrer(document.referrer || null);
|
|
71
|
+
}, []);
|
|
72
|
+
|
|
73
|
+
const sourceUrl = initialContext?.sourceUrl ?? referrer;
|
|
74
|
+
const pageTitle = initialContext?.pageTitle ?? null;
|
|
75
|
+
const sourceLabel =
|
|
76
|
+
pageTitle || sourceUrl || t("bugReportRoute.sourceUnknown");
|
|
77
|
+
|
|
78
|
+
if (outlet) return outlet;
|
|
79
|
+
|
|
80
|
+
const startRecording = () => {
|
|
81
|
+
const context: BugReportContext = {
|
|
82
|
+
projectId: initialContext?.projectId ?? null,
|
|
83
|
+
title: title.trim() || initialContext?.title || null,
|
|
84
|
+
description: description.trim() || initialContext?.description || null,
|
|
85
|
+
severity,
|
|
86
|
+
sourceUrl,
|
|
87
|
+
pageTitle,
|
|
88
|
+
appVersion: initialContext?.appVersion ?? null,
|
|
89
|
+
environment: initialContext?.environment ?? null,
|
|
90
|
+
reporterEmail:
|
|
91
|
+
reporterEmail.trim() || initialContext?.reporterEmail || null,
|
|
92
|
+
reporterName: initialContext?.reporterName ?? null,
|
|
93
|
+
reporterId: initialContext?.reporterId ?? null,
|
|
94
|
+
metadata: initialContext?.metadata ?? null,
|
|
95
|
+
returnUrl: initialContext?.returnUrl ?? sourceUrl,
|
|
96
|
+
};
|
|
97
|
+
const params = bugReportContextToSearchParams(context);
|
|
98
|
+
params.set("intent", "bug-report");
|
|
99
|
+
params.set("mode", "screen");
|
|
100
|
+
params.set("surface", "browser");
|
|
101
|
+
openRecorder(`${appBasePath()}/record?${params.toString()}`);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
return (
|
|
105
|
+
<main className="min-h-screen bg-background text-foreground">
|
|
106
|
+
<div className="mx-auto flex min-h-screen w-full max-w-xl flex-col justify-center px-4 py-5 sm:px-6">
|
|
107
|
+
<section className="rounded-lg border bg-card p-4 shadow-sm sm:p-5">
|
|
108
|
+
<div className="mb-5 flex items-start gap-3">
|
|
109
|
+
<div className="flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-primary text-primary-foreground">
|
|
110
|
+
<IconBug size={20} />
|
|
111
|
+
</div>
|
|
112
|
+
<div className="min-w-0">
|
|
113
|
+
<p className="text-xs font-medium uppercase tracking-[0.12em] text-muted-foreground">
|
|
114
|
+
{t("bugReportRoute.eyebrow")}
|
|
115
|
+
</p>
|
|
116
|
+
<h1 className="mt-1 text-xl font-semibold leading-tight">
|
|
117
|
+
{t("bugReportRoute.title")}
|
|
118
|
+
</h1>
|
|
119
|
+
<p className="mt-2 text-sm leading-6 text-muted-foreground">
|
|
120
|
+
{t("bugReportRoute.description")}
|
|
121
|
+
</p>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<div className="space-y-4">
|
|
126
|
+
<div className="space-y-2">
|
|
127
|
+
<Label htmlFor="bug-title">
|
|
128
|
+
{t("bugReportRoute.issueTitleLabel")}
|
|
129
|
+
</Label>
|
|
130
|
+
<Input
|
|
131
|
+
id="bug-title"
|
|
132
|
+
value={title}
|
|
133
|
+
onChange={(event) => setTitle(event.target.value)}
|
|
134
|
+
placeholder={t("bugReportRoute.issueTitlePlaceholder")}
|
|
135
|
+
/>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<div className="space-y-2">
|
|
139
|
+
<Label htmlFor="bug-details">
|
|
140
|
+
{t("bugReportRoute.detailsLabel")}
|
|
141
|
+
</Label>
|
|
142
|
+
<Textarea
|
|
143
|
+
id="bug-details"
|
|
144
|
+
value={description}
|
|
145
|
+
onChange={(event) => setDescription(event.target.value)}
|
|
146
|
+
placeholder={t("bugReportRoute.detailsPlaceholder")}
|
|
147
|
+
className="min-h-24 resize-none"
|
|
148
|
+
/>
|
|
149
|
+
</div>
|
|
150
|
+
|
|
151
|
+
<div className="grid gap-4 sm:grid-cols-[1fr_180px]">
|
|
152
|
+
<div className="space-y-2">
|
|
153
|
+
<Label htmlFor="bug-email">
|
|
154
|
+
{t("bugReportRoute.emailLabel")}
|
|
155
|
+
</Label>
|
|
156
|
+
<Input
|
|
157
|
+
id="bug-email"
|
|
158
|
+
type="email"
|
|
159
|
+
value={reporterEmail}
|
|
160
|
+
onChange={(event) => setReporterEmail(event.target.value)}
|
|
161
|
+
placeholder={t("bugReportRoute.emailPlaceholder")}
|
|
162
|
+
/>
|
|
163
|
+
</div>
|
|
164
|
+
<div className="space-y-2">
|
|
165
|
+
<Label>{t("bugReportRoute.severityLabel")}</Label>
|
|
166
|
+
<Select
|
|
167
|
+
value={severity}
|
|
168
|
+
onValueChange={(value) =>
|
|
169
|
+
setSeverity(value as BugReportSeverity)
|
|
170
|
+
}
|
|
171
|
+
>
|
|
172
|
+
<SelectTrigger>
|
|
173
|
+
<SelectValue />
|
|
174
|
+
</SelectTrigger>
|
|
175
|
+
<SelectContent>
|
|
176
|
+
<SelectItem value="low">
|
|
177
|
+
{t("bugReportRoute.severityLow")}
|
|
178
|
+
</SelectItem>
|
|
179
|
+
<SelectItem value="normal">
|
|
180
|
+
{t("bugReportRoute.severityNormal")}
|
|
181
|
+
</SelectItem>
|
|
182
|
+
<SelectItem value="high">
|
|
183
|
+
{t("bugReportRoute.severityHigh")}
|
|
184
|
+
</SelectItem>
|
|
185
|
+
<SelectItem value="urgent">
|
|
186
|
+
{t("bugReportRoute.severityUrgent")}
|
|
187
|
+
</SelectItem>
|
|
188
|
+
</SelectContent>
|
|
189
|
+
</Select>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
<div className="rounded-md border bg-muted/40 px-3 py-2">
|
|
194
|
+
<p className="text-xs font-medium text-muted-foreground">
|
|
195
|
+
{t("bugReportRoute.sourceLabel")}
|
|
196
|
+
</p>
|
|
197
|
+
<p
|
|
198
|
+
className={cn(
|
|
199
|
+
"mt-1 truncate text-sm",
|
|
200
|
+
!sourceUrl && "text-muted-foreground",
|
|
201
|
+
)}
|
|
202
|
+
>
|
|
203
|
+
{sourceLabel}
|
|
204
|
+
</p>
|
|
205
|
+
</div>
|
|
206
|
+
|
|
207
|
+
<Button className="h-11 w-full" onClick={startRecording}>
|
|
208
|
+
<IconExternalLink size={18} />
|
|
209
|
+
{t("bugReportRoute.startRecording")}
|
|
210
|
+
<IconArrowRight size={18} className="ms-auto" />
|
|
211
|
+
</Button>
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<div className="mt-5 flex items-start gap-2 rounded-md bg-muted/50 p-3 text-xs leading-5 text-muted-foreground">
|
|
215
|
+
<IconShieldCheck size={16} className="mt-0.5 shrink-0" />
|
|
216
|
+
<p>{t("bugReportRoute.privacyNote")}</p>
|
|
217
|
+
</div>
|
|
218
|
+
</section>
|
|
219
|
+
</div>
|
|
220
|
+
</main>
|
|
221
|
+
);
|
|
222
|
+
}
|
|
@@ -76,6 +76,11 @@ async function writeAppState(key: string, value: unknown): Promise<void> {
|
|
|
76
76
|
},
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
|
+
import {
|
|
80
|
+
bugReportTitle,
|
|
81
|
+
parseBugReportContext,
|
|
82
|
+
type BugReportContext,
|
|
83
|
+
} from "@shared/bug-report";
|
|
79
84
|
import { toast } from "sonner";
|
|
80
85
|
|
|
81
86
|
import { CaptureInstallButton } from "@/components/capture-install-options";
|
|
@@ -166,6 +171,12 @@ function openUrlFromUserGesture(url: string): void {
|
|
|
166
171
|
}
|
|
167
172
|
}
|
|
168
173
|
|
|
174
|
+
function bugReportDonePath(recordingId: string, context: BugReportContext) {
|
|
175
|
+
const params = new URLSearchParams({ recordingId });
|
|
176
|
+
if (context.returnUrl) params.set("returnUrl", context.returnUrl);
|
|
177
|
+
return `/bug-report/done?${params.toString()}`;
|
|
178
|
+
}
|
|
179
|
+
|
|
169
180
|
function sendClipsExtensionMessage<T>(
|
|
170
181
|
extensionId: string,
|
|
171
182
|
message: Record<string, unknown>,
|
|
@@ -852,6 +863,10 @@ export default function RecordRoute() {
|
|
|
852
863
|
developerLogsEnabled: developerLogs !== "0",
|
|
853
864
|
};
|
|
854
865
|
}, [location.search]);
|
|
866
|
+
const bugReportContext = useMemo(
|
|
867
|
+
() => parseBugReportContext(new URLSearchParams(location.search)),
|
|
868
|
+
[location.search],
|
|
869
|
+
);
|
|
855
870
|
const markStorageConfigured = useCallback(
|
|
856
871
|
(status?: VideoStorageStatus) => {
|
|
857
872
|
queryClient.setQueryData<VideoStorageStatus>(
|
|
@@ -870,6 +885,41 @@ export default function RecordRoute() {
|
|
|
870
885
|
const liveTranscription = useLiveTranscription();
|
|
871
886
|
const stopLiveTranscription = liveTranscription.stop;
|
|
872
887
|
|
|
888
|
+
const saveBugReportContext = useCallback(
|
|
889
|
+
async (recordingId: string) => {
|
|
890
|
+
if (!bugReportContext) return;
|
|
891
|
+
try {
|
|
892
|
+
await callAction(
|
|
893
|
+
"save-bug-report-context" as any,
|
|
894
|
+
{
|
|
895
|
+
recordingId,
|
|
896
|
+
projectId: bugReportContext.projectId,
|
|
897
|
+
title: bugReportContext.title,
|
|
898
|
+
description: bugReportContext.description,
|
|
899
|
+
severity: bugReportContext.severity,
|
|
900
|
+
sourceUrl: bugReportContext.sourceUrl,
|
|
901
|
+
pageTitle: bugReportContext.pageTitle,
|
|
902
|
+
appVersion: bugReportContext.appVersion,
|
|
903
|
+
environment: bugReportContext.environment,
|
|
904
|
+
reporterEmail: bugReportContext.reporterEmail,
|
|
905
|
+
reporterName: bugReportContext.reporterName,
|
|
906
|
+
reporterId: bugReportContext.reporterId,
|
|
907
|
+
metadata: bugReportContext.metadata ?? undefined,
|
|
908
|
+
} as any,
|
|
909
|
+
);
|
|
910
|
+
} catch (err) {
|
|
911
|
+
console.warn("[recorder] bug report context save failed:", err);
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
[bugReportContext],
|
|
915
|
+
);
|
|
916
|
+
const bugReportContextRef = useRef<BugReportContext | null>(null);
|
|
917
|
+
const saveBugReportContextRef = useRef(saveBugReportContext);
|
|
918
|
+
useEffect(() => {
|
|
919
|
+
bugReportContextRef.current = bugReportContext;
|
|
920
|
+
saveBugReportContextRef.current = saveBugReportContext;
|
|
921
|
+
}, [bugReportContext, saveBugReportContext]);
|
|
922
|
+
|
|
873
923
|
const engineRef = useRef<RecorderEngine | null>(null);
|
|
874
924
|
const pendingRef = useRef<PendingRecording | null>(null);
|
|
875
925
|
const countdownAudioCueRef = useRef<CountdownAudioCue | null>(null);
|
|
@@ -1124,19 +1174,23 @@ export default function RecordRoute() {
|
|
|
1124
1174
|
}
|
|
1125
1175
|
|
|
1126
1176
|
// 2. Create the recording row server-side once permissions are granted.
|
|
1177
|
+
const reportContext = bugReportContextRef.current;
|
|
1178
|
+
const reportTitle = reportContext
|
|
1179
|
+
? `Bug report: ${bugReportTitle(reportContext)}`
|
|
1180
|
+
: null;
|
|
1127
1181
|
const res = await fetch(
|
|
1128
1182
|
agentNativePath("/_agent-native/actions/create-recording"),
|
|
1129
1183
|
{
|
|
1130
1184
|
method: "POST",
|
|
1131
1185
|
headers: { "Content-Type": "application/json" },
|
|
1132
1186
|
body: JSON.stringify({
|
|
1133
|
-
title: captureTitle.title,
|
|
1134
|
-
titleSource: captureTitle.titleSource,
|
|
1187
|
+
title: reportTitle ?? captureTitle.title,
|
|
1188
|
+
titleSource: reportTitle ? "context" : captureTitle.titleSource,
|
|
1135
1189
|
sourceAppName: captureTitle.sourceAppName,
|
|
1136
1190
|
sourceWindowTitle: captureTitle.sourceWindowTitle,
|
|
1137
1191
|
hasCamera: opts.mode !== "screen",
|
|
1138
1192
|
hasAudio: wantsMic,
|
|
1139
|
-
visibility: "public",
|
|
1193
|
+
visibility: reportContext ? "org" : "public",
|
|
1140
1194
|
spaceIds: spaceIdFromUrl ? [spaceIdFromUrl] : undefined,
|
|
1141
1195
|
folderId: folderIdFromUrl ?? undefined,
|
|
1142
1196
|
}),
|
|
@@ -1190,6 +1244,7 @@ export default function RecordRoute() {
|
|
|
1190
1244
|
uploadUrl: uploadChunkUrl,
|
|
1191
1245
|
abortUrl,
|
|
1192
1246
|
});
|
|
1247
|
+
await saveBugReportContextRef.current(info.id);
|
|
1193
1248
|
|
|
1194
1249
|
setPreviewStream(ps);
|
|
1195
1250
|
setCameraStream(cs);
|
|
@@ -1403,6 +1458,10 @@ export default function RecordRoute() {
|
|
|
1403
1458
|
);
|
|
1404
1459
|
}
|
|
1405
1460
|
setUiState("uploading");
|
|
1461
|
+
const reportContext = bugReportContextRef.current;
|
|
1462
|
+
const reportTitle = reportContext
|
|
1463
|
+
? `Bug report: ${bugReportTitle(reportContext)}`
|
|
1464
|
+
: null;
|
|
1406
1465
|
|
|
1407
1466
|
const res = await fetch(
|
|
1408
1467
|
agentNativePath("/_agent-native/actions/create-recording"),
|
|
@@ -1412,12 +1471,14 @@ export default function RecordRoute() {
|
|
|
1412
1471
|
signal: abort.signal,
|
|
1413
1472
|
body: JSON.stringify({
|
|
1414
1473
|
title:
|
|
1415
|
-
|
|
1416
|
-
|
|
1474
|
+
reportTitle ??
|
|
1475
|
+
(file.name.replace(/\.[^/.]+$/, "") || defaultRecordingTitle()),
|
|
1476
|
+
titleSource: reportTitle ? "context" : "upload",
|
|
1417
1477
|
hasCamera: false,
|
|
1418
1478
|
hasAudio: true,
|
|
1419
1479
|
width: meta.width,
|
|
1420
1480
|
height: meta.height,
|
|
1481
|
+
visibility: reportContext ? "org" : undefined,
|
|
1421
1482
|
spaceIds: spaceIdFromUrl ? [spaceIdFromUrl] : undefined,
|
|
1422
1483
|
folderId: folderIdFromUrl ?? undefined,
|
|
1423
1484
|
}),
|
|
@@ -1451,6 +1512,7 @@ export default function RecordRoute() {
|
|
|
1451
1512
|
throw new Error("create-recording did not return an id");
|
|
1452
1513
|
}
|
|
1453
1514
|
createdId = info.id;
|
|
1515
|
+
await saveBugReportContextRef.current(info.id);
|
|
1454
1516
|
if (isStale()) throw makeAbortError("Upload cancelled");
|
|
1455
1517
|
const uploadBase = `${appBasePath()}${info.uploadChunkUrl}`;
|
|
1456
1518
|
|
|
@@ -1517,13 +1579,25 @@ export default function RecordRoute() {
|
|
|
1517
1579
|
} else {
|
|
1518
1580
|
toast.success(t("recordRoute.videoUploaded"));
|
|
1519
1581
|
}
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1582
|
+
if (reportContext && createdId) {
|
|
1583
|
+
const path = bugReportDonePath(createdId, reportContext);
|
|
1584
|
+
await writeAppState("navigate", {
|
|
1585
|
+
view: "bug-report-done",
|
|
1586
|
+
recordingId: createdId,
|
|
1587
|
+
path,
|
|
1588
|
+
});
|
|
1589
|
+
setTimeout(() => {
|
|
1590
|
+
navigate(path);
|
|
1591
|
+
}, 50);
|
|
1592
|
+
} else {
|
|
1593
|
+
await writeAppState("navigate", {
|
|
1594
|
+
view: "recording",
|
|
1595
|
+
recordingId: createdId,
|
|
1596
|
+
});
|
|
1597
|
+
setTimeout(() => {
|
|
1598
|
+
if (createdId) navigate(`/r/${createdId}`);
|
|
1599
|
+
}, 50);
|
|
1600
|
+
}
|
|
1527
1601
|
} catch (err) {
|
|
1528
1602
|
const message =
|
|
1529
1603
|
err instanceof Error ? err.message : t("recordRoute.uploadFailed");
|
|
@@ -1736,6 +1810,20 @@ export default function RecordRoute() {
|
|
|
1736
1810
|
toast.success(t("recordRoute.recordingSaved"));
|
|
1737
1811
|
}
|
|
1738
1812
|
|
|
1813
|
+
const reportContext = bugReportContextRef.current;
|
|
1814
|
+
if (reportContext) {
|
|
1815
|
+
const path = bugReportDonePath(recordingId, reportContext);
|
|
1816
|
+
await writeAppState("navigate", {
|
|
1817
|
+
view: "bug-report-done",
|
|
1818
|
+
recordingId,
|
|
1819
|
+
path,
|
|
1820
|
+
}).catch(() => {});
|
|
1821
|
+
setTimeout(() => {
|
|
1822
|
+
navigate(path);
|
|
1823
|
+
}, 50);
|
|
1824
|
+
return;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1739
1827
|
await writeAppState("navigate", {
|
|
1740
1828
|
view: "recording",
|
|
1741
1829
|
recordingId,
|
|
@@ -2173,6 +2261,8 @@ export default function RecordRoute() {
|
|
|
2173
2261
|
) : (
|
|
2174
2262
|
<StorageSetupCard
|
|
2175
2263
|
onConfigured={() => markStorageConfigured()}
|
|
2264
|
+
connectSource="clips_record_storage_setup_card"
|
|
2265
|
+
connectFlow="record"
|
|
2176
2266
|
/>
|
|
2177
2267
|
)}
|
|
2178
2268
|
</div>
|
|
@@ -2324,6 +2414,8 @@ export default function RecordRoute() {
|
|
|
2324
2414
|
}
|
|
2325
2415
|
}}
|
|
2326
2416
|
connectedDescription="Storage connected. Reopening recorder..."
|
|
2417
|
+
connectSource="clips_record_storage_setup_card"
|
|
2418
|
+
connectFlow="record"
|
|
2327
2419
|
/>
|
|
2328
2420
|
</>
|
|
2329
2421
|
) : error === "SESSION_EXPIRED" ? (
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"manifest_version": 3,
|
|
3
3
|
"name": "Agent-Native Clips",
|
|
4
4
|
"short_name": "Clips",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.6",
|
|
6
6
|
"description": "Start Clips recordings from Chrome, capture optional diagnostics, and preview Clips links on GitHub.",
|
|
7
7
|
"minimum_chrome_version": "116",
|
|
8
8
|
"action": {
|
|
@@ -18,7 +18,14 @@
|
|
|
18
18
|
"32": "icons/icon-32.png",
|
|
19
19
|
"128": "icons/icon-128.png"
|
|
20
20
|
},
|
|
21
|
-
"permissions": [
|
|
21
|
+
"permissions": [
|
|
22
|
+
"activeTab",
|
|
23
|
+
"debugger",
|
|
24
|
+
"downloads",
|
|
25
|
+
"offscreen",
|
|
26
|
+
"scripting",
|
|
27
|
+
"storage"
|
|
28
|
+
],
|
|
22
29
|
"host_permissions": [
|
|
23
30
|
"https://clips.agent-native.com/*",
|
|
24
31
|
"https://forms.agent-native.com/*",
|