@agent-native/core 0.108.0 → 0.109.0
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 +18 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/a2a/client.ts +140 -17
- package/corpus/core/src/a2a/handlers.ts +60 -0
- package/corpus/core/src/a2a/index.ts +6 -1
- package/corpus/core/src/a2a/invoke.ts +68 -1
- package/corpus/core/src/a2a/server.ts +13 -1
- package/corpus/core/src/a2a/types.ts +16 -0
- package/corpus/core/src/action.ts +3 -2
- package/corpus/core/src/agent/production-agent.ts +10 -4
- package/corpus/core/src/client/AssistantChat.tsx +648 -603
- package/corpus/core/src/client/MultiTabAssistantChat.tsx +31 -4
- package/corpus/core/src/client/agent-chat-adapter.ts +23 -37
- package/corpus/core/src/client/agent-sidebar-state.ts +4 -0
- package/corpus/core/src/client/analytics.ts +84 -0
- package/corpus/core/src/client/chat/message-components.tsx +94 -22
- package/corpus/core/src/client/chat/tool-call-display.tsx +170 -47
- package/corpus/core/src/client/chat/use-agent-chat-lifecycle-tracking.ts +74 -0
- package/corpus/core/src/client/chat-thread-url.ts +11 -0
- package/corpus/core/src/client/error-capture.ts +12 -0
- package/corpus/core/src/client/extensions/ExtensionSlot.tsx +37 -1
- package/corpus/core/src/client/index.ts +2 -0
- package/corpus/core/src/client/route-chunk-recovery.ts +20 -8
- package/corpus/core/src/client/session-replay.ts +31 -0
- package/corpus/core/src/extensions/actions.ts +2 -14
- package/corpus/core/src/extensions/store.ts +1 -1
- package/corpus/core/src/localization/default-messages.ts +3 -0
- package/corpus/core/src/mcp/build-server.ts +2 -2
- package/corpus/core/src/progress/actions.ts +4 -2
- package/corpus/core/src/provider-api/index.ts +205 -105
- package/corpus/core/src/scripts/call-agent.ts +137 -17
- package/corpus/core/src/server/agent-chat/action-filters-a2a.ts +40 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +31 -0
- package/corpus/core/src/styles/agent-conversation.css +7 -0
- package/corpus/core/src/templates/default/app/i18n/ar-SA.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/de-DE.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/en-US.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/es-ES.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/fr-FR.ts +21 -0
- package/corpus/core/src/templates/default/app/i18n/hi-IN.ts +19 -0
- package/corpus/core/src/templates/default/app/i18n/ja-JP.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/ko-KR.ts +19 -0
- package/corpus/core/src/templates/default/app/i18n/pt-BR.ts +20 -0
- package/corpus/core/src/templates/default/app/i18n/zh-CN.ts +19 -0
- package/corpus/core/src/templates/default/app/i18n/zh-TW.ts +19 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +28 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +5 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/performance/SKILL.md +13 -0
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +29 -10
- package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +54 -23
- package/corpus/templates/analytics/.builder/skills/apollo/SKILL.md +19 -41
- package/corpus/templates/analytics/.builder/skills/commonroom/SKILL.md +20 -35
- package/corpus/templates/analytics/.builder/skills/github/SKILL.md +23 -67
- package/corpus/templates/analytics/.builder/skills/pylon/SKILL.md +25 -43
- package/corpus/templates/analytics/AGENTS.md +22 -13
- package/corpus/templates/analytics/actions/account-deep-dive.ts +1 -0
- package/corpus/templates/analytics/actions/configure-gong-native-insights.ts +29 -0
- package/corpus/templates/analytics/actions/content-calendar-schema.ts +8 -4
- package/corpus/templates/analytics/actions/content-calendar.ts +12 -4
- package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +2 -1
- package/corpus/templates/analytics/actions/gong-calls.ts +113 -22
- package/corpus/templates/analytics/actions/gong-native-insights.ts +166 -0
- package/corpus/templates/analytics/actions/hubspot-deals.ts +190 -46
- package/corpus/templates/analytics/actions/pylon-issues.ts +123 -0
- package/corpus/templates/analytics/actions/slack-messages.ts +179 -27
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +48 -152
- package/corpus/templates/analytics/app/components/ui/chart.tsx +1 -1
- package/corpus/templates/analytics/app/hooks/use-chart-tooltip-flip.ts +21 -6
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +13 -0
- package/corpus/templates/analytics/app/i18n-data.ts +134 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +181 -30
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +6 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +4 -3
- package/corpus/templates/analytics/changelog/2026-07-17-dashboard-editors-can-add-shared-extensions-or-opt-into-per-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-dashboard-extensions-show-a-loading-skeleton.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-errors-now-group-repeat-failures-consistently-and-keep-priva.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-gong-transcript-reviews-now-batch-bounded-call-windows-for-f.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-hubspot-deal-filters-now-run-in-hubspot-before-paging-result.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-notion-content-calendars-now-discover-the-matching-database-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-pylon-dashboard-reads-now-use-the-paginated-issue-search-api.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-17-slack-reads-no-longer-join-channels-and-report-pagination-coverage.md +6 -0
- package/corpus/templates/analytics/server/handlers/notion.ts +14 -3
- package/corpus/templates/analytics/server/handlers/slack.ts +182 -29
- package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +2 -6
- package/corpus/templates/analytics/server/lib/analytics-connector-catalog.ts +6 -2
- package/corpus/templates/analytics/server/lib/error-capture.ts +75 -8
- package/corpus/templates/analytics/server/lib/gong-native-policy.ts +72 -0
- package/corpus/templates/analytics/server/lib/gong.ts +54 -66
- package/corpus/templates/analytics/server/lib/hubspot.ts +40 -3
- package/corpus/templates/analytics/server/lib/notion.ts +83 -8
- package/corpus/templates/analytics/server/lib/real-data-actions.ts +4 -0
- package/corpus/templates/analytics/server/lib/slack.ts +242 -90
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +3 -3
- package/corpus/templates/analytics/server/routes/api/pylon/accounts.get.ts +42 -1
- package/corpus/templates/analytics/server/routes/api/pylon/issues.get.ts +71 -1
- package/corpus/templates/analytics/server/routes/api/test-connection.post.ts +44 -4
- package/corpus/templates/clips/app/components/library/bulk-action-toolbar.tsx +19 -1
- package/corpus/templates/clips/app/components/library/create-folder-dialog.tsx +123 -0
- package/corpus/templates/clips/app/components/library/library-grid.tsx +42 -4
- package/corpus/templates/clips/app/components/library/recording-card.tsx +30 -0
- package/corpus/templates/clips/app/entry.client.tsx +6 -1
- package/corpus/templates/clips/app/i18n/ar-SA.ts +12 -1
- package/corpus/templates/clips/app/i18n/de-DE.ts +12 -1
- package/corpus/templates/clips/app/i18n/en-US.ts +12 -1
- package/corpus/templates/clips/app/i18n/es-ES.ts +11 -1
- package/corpus/templates/clips/app/i18n/fr-FR.ts +11 -1
- package/corpus/templates/clips/app/i18n/hi-IN.ts +10 -1
- package/corpus/templates/clips/app/i18n/ja-JP.ts +12 -1
- package/corpus/templates/clips/app/i18n/ko-KR.ts +11 -1
- package/corpus/templates/clips/app/i18n/pt-BR.ts +11 -1
- package/corpus/templates/clips/app/i18n/zh-CN.ts +11 -1
- package/corpus/templates/clips/app/i18n/zh-TW.ts +11 -1
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +72 -1
- package/corpus/templates/clips/changelog/2026-07-17-choose-which-workspace-receives-new-clips-recordings-and-des.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-create-folders-directly-from-the-move-menu.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-17-failed-desktop-uploads-now-offer-a-direct-way-to-reopen-clip.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +1 -1
- package/corpus/templates/content/app/entry.client.tsx +6 -1
- package/corpus/templates/dispatch/AGENTS.md +5 -0
- package/corpus/templates/dispatch/changelog/2026-07-17-apps-page-links-to-other-available-apps.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-07-17-curated-template-remixes.md +6 -0
- package/corpus/templates/mail/app/entry.client.tsx +6 -1
- package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +11 -7
- package/corpus/templates/slides/.env.example +0 -1
- package/corpus/templates/slides/AGENTS.md +4 -0
- package/corpus/templates/slides/DEVELOPING.md +2 -2
- package/corpus/templates/slides/actions/index-design-system-with-builder.ts +1 -1
- package/corpus/templates/slides/actions/logo-config.ts +6 -7
- package/corpus/templates/slides/actions/search-images.ts +11 -39
- package/corpus/templates/slides/actions/search-logos.ts +5 -52
- package/corpus/templates/slides/app/components/editor/ImageSearchPanel.tsx +1 -1
- package/corpus/templates/slides/app/components/editor/LogoSearchPanel.tsx +16 -26
- package/corpus/templates/slides/app/entry.client.tsx +6 -1
- package/corpus/templates/slides/server/lib/media-search-providers.ts +216 -0
- package/corpus/templates/slides/server/register-secrets.ts +30 -0
- package/dist/a2a/client.d.ts +38 -1
- package/dist/a2a/client.d.ts.map +1 -1
- package/dist/a2a/client.js +81 -12
- package/dist/a2a/client.js.map +1 -1
- package/dist/a2a/handlers.d.ts.map +1 -1
- package/dist/a2a/handlers.js +47 -0
- package/dist/a2a/handlers.js.map +1 -1
- package/dist/a2a/index.d.ts +4 -4
- package/dist/a2a/index.d.ts.map +1 -1
- package/dist/a2a/index.js +2 -2
- package/dist/a2a/index.js.map +1 -1
- package/dist/a2a/invoke.d.ts +26 -2
- package/dist/a2a/invoke.d.ts.map +1 -1
- package/dist/a2a/invoke.js +30 -1
- package/dist/a2a/invoke.js.map +1 -1
- package/dist/a2a/server.d.ts.map +1 -1
- package/dist/a2a/server.js +14 -1
- package/dist/a2a/server.js.map +1 -1
- package/dist/a2a/types.d.ts +12 -0
- package/dist/a2a/types.d.ts.map +1 -1
- package/dist/a2a/types.js.map +1 -1
- package/dist/action.d.ts +3 -2
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js.map +1 -1
- package/dist/agent/production-agent.d.ts +5 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +5 -3
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +14 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +158 -136
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +27 -4
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +21 -39
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/agent-sidebar-state.d.ts +1 -0
- package/dist/client/agent-sidebar-state.d.ts.map +1 -1
- package/dist/client/agent-sidebar-state.js +4 -0
- package/dist/client/agent-sidebar-state.js.map +1 -1
- package/dist/client/analytics.d.ts +14 -0
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +67 -0
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +8 -0
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +62 -19
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +6 -0
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +83 -14
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/client/chat/use-agent-chat-lifecycle-tracking.d.ts +8 -0
- package/dist/client/chat/use-agent-chat-lifecycle-tracking.d.ts.map +1 -0
- package/dist/client/chat/use-agent-chat-lifecycle-tracking.js +51 -0
- package/dist/client/chat/use-agent-chat-lifecycle-tracking.js.map +1 -0
- package/dist/client/chat-thread-url.d.ts +2 -0
- package/dist/client/chat-thread-url.d.ts.map +1 -0
- package/dist/client/chat-thread-url.js +12 -0
- package/dist/client/chat-thread-url.js.map +1 -0
- package/dist/client/error-capture.d.ts.map +1 -1
- package/dist/client/error-capture.js +7 -0
- package/dist/client/error-capture.js.map +1 -1
- package/dist/client/extensions/ExtensionSlot.d.ts +3 -1
- package/dist/client/extensions/ExtensionSlot.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionSlot.js +28 -3
- package/dist/client/extensions/ExtensionSlot.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/route-chunk-recovery.d.ts.map +1 -1
- package/dist/client/route-chunk-recovery.js +14 -9
- package/dist/client/route-chunk-recovery.js.map +1 -1
- package/dist/client/session-replay.d.ts +15 -0
- package/dist/client/session-replay.d.ts.map +1 -1
- package/dist/client/session-replay.js +20 -0
- package/dist/client/session-replay.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/extensions/actions.d.ts.map +1 -1
- package/dist/extensions/actions.js +2 -10
- package/dist/extensions/actions.js.map +1 -1
- package/dist/extensions/store.js +1 -1
- package/dist/extensions/store.js.map +1 -1
- package/dist/localization/default-messages.d.ts +3 -0
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +3 -0
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp/build-server.d.ts +2 -0
- package/dist/mcp/build-server.d.ts.map +1 -1
- package/dist/mcp/build-server.js +2 -2
- package/dist/mcp/build-server.js.map +1 -1
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +1 -1
- package/dist/progress/actions.d.ts.map +1 -1
- package/dist/progress/actions.js +3 -2
- package/dist/progress/actions.js.map +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/provider-api/index.d.ts.map +1 -1
- package/dist/provider-api/index.js +91 -8
- package/dist/provider-api/index.js.map +1 -1
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/scripts/call-agent.d.ts.map +1 -1
- package/dist/scripts/call-agent.js +107 -16
- package/dist/scripts/call-agent.js.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.d.ts +6 -0
- package/dist/server/agent-chat/action-filters-a2a.d.ts.map +1 -1
- package/dist/server/agent-chat/action-filters-a2a.js +27 -0
- package/dist/server/agent-chat/action-filters-a2a.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +27 -1
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/styles/agent-conversation.css +7 -0
- package/dist/templates/default/app/i18n/ar-SA.ts +20 -0
- package/dist/templates/default/app/i18n/de-DE.ts +20 -0
- package/dist/templates/default/app/i18n/en-US.ts +20 -0
- package/dist/templates/default/app/i18n/es-ES.ts +20 -0
- package/dist/templates/default/app/i18n/fr-FR.ts +21 -0
- package/dist/templates/default/app/i18n/hi-IN.ts +19 -0
- package/dist/templates/default/app/i18n/ja-JP.ts +20 -0
- package/dist/templates/default/app/i18n/ko-KR.ts +19 -0
- package/dist/templates/default/app/i18n/pt-BR.ts +20 -0
- package/dist/templates/default/app/i18n/zh-CN.ts +19 -0
- package/dist/templates/default/app/i18n/zh-TW.ts +19 -0
- package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +28 -0
- package/dist/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +5 -0
- package/dist/templates/workspace-core/.agents/skills/performance/SKILL.md +13 -0
- package/package.json +1 -1
- package/src/templates/default/app/i18n/ar-SA.ts +20 -0
- package/src/templates/default/app/i18n/de-DE.ts +20 -0
- package/src/templates/default/app/i18n/en-US.ts +20 -0
- package/src/templates/default/app/i18n/es-ES.ts +20 -0
- package/src/templates/default/app/i18n/fr-FR.ts +21 -0
- package/src/templates/default/app/i18n/hi-IN.ts +19 -0
- package/src/templates/default/app/i18n/ja-JP.ts +20 -0
- package/src/templates/default/app/i18n/ko-KR.ts +19 -0
- package/src/templates/default/app/i18n/pt-BR.ts +20 -0
- package/src/templates/default/app/i18n/zh-CN.ts +19 -0
- package/src/templates/default/app/i18n/zh-TW.ts +19 -0
- package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +28 -0
- package/src/templates/workspace-core/.agents/skills/composable-mini-apps/SKILL.md +5 -0
- package/src/templates/workspace-core/.agents/skills/performance/SKILL.md +13 -0
- package/corpus/templates/analytics/server/handlers/github.ts +0 -200
- package/corpus/templates/analytics/server/handlers/pylon.ts +0 -43
- package/corpus/templates/analytics/server/lib/apollo.ts +0 -167
- package/corpus/templates/analytics/server/lib/commonroom.ts +0 -149
- package/corpus/templates/analytics/server/lib/github.ts +0 -660
- package/corpus/templates/analytics/server/lib/mixpanel.ts +0 -156
- package/corpus/templates/analytics/server/lib/posthog.ts +0 -194
- package/corpus/templates/analytics/server/lib/pylon.ts +0 -109
- package/corpus/templates/analytics/server/routes/api/github/graphql.post.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/github/issue.get.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/github/org-prs.get.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/github/pr.get.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/github/prs.get.ts +0 -1
- package/corpus/templates/analytics/server/routes/api/github/search.get.ts +0 -1
- package/corpus/templates/slides/actions/fetch-logos.ts +0 -90
- package/corpus/templates/slides/actions/image-search.ts +0 -64
- package/corpus/templates/slides/actions/import-github.ts +0 -182
- package/corpus/templates/slides/actions/logo-lookup.ts +0 -113
|
@@ -598,6 +598,15 @@ const messages = {
|
|
|
598
598
|
languageDescription:
|
|
599
599
|
"選取此帳號的介面語言。Clips 會在不同設備上記住你的選取。",
|
|
600
600
|
languageLabel: "介面語言",
|
|
601
|
+
uploadWorkspaceTitle: "目前工作區",
|
|
602
|
+
uploadWorkspaceDescription:
|
|
603
|
+
"選擇 Clips 用於新錄製內容(包括桌面上傳)的工作區。",
|
|
604
|
+
uploadWorkspaceLabel: "目前工作區",
|
|
605
|
+
uploadWorkspacePlaceholder: "選擇工作區",
|
|
606
|
+
uploadWorkspaceHint: "切換後,Clips 中與工作區相關的檢視也會更新。",
|
|
607
|
+
uploadWorkspaceSaving: "正在儲存工作區…",
|
|
608
|
+
uploadWorkspaceSaved: "目前工作區已更新",
|
|
609
|
+
uploadWorkspaceSaveFailed: "無法更新目前工作區",
|
|
601
610
|
whatsNew: "最新變化",
|
|
602
611
|
changelogEmpty: "暫無更新。",
|
|
603
612
|
viewAllUpdates: "檢視所有更新",
|
|
@@ -1302,7 +1311,8 @@ const messages = {
|
|
|
1302
1311
|
savedLocally: "已儲存到本機",
|
|
1303
1312
|
uploadFailed: "上傳失敗",
|
|
1304
1313
|
connectStorageToFinish: "開啟以連線儲存並完成儲存。",
|
|
1305
|
-
retryFromClipsMenu:
|
|
1314
|
+
retryFromClipsMenu:
|
|
1315
|
+
"從選單列開啟 Clips 以重試這個已儲存的上傳;不需要重新錄製。",
|
|
1306
1316
|
removeFailedClip: "移除此失敗剪輯。",
|
|
1307
1317
|
remove: "移除",
|
|
1308
1318
|
viewsCount: "{{count}} 次觀看",
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
useT,
|
|
13
13
|
type SettingsSearchEntry,
|
|
14
14
|
} from "@agent-native/core/client";
|
|
15
|
-
import { TeamPage } from "@agent-native/core/client/org";
|
|
15
|
+
import { TeamPage, useOrg, useSwitchOrg } from "@agent-native/core/client/org";
|
|
16
16
|
import {
|
|
17
17
|
BUILDER_CREDITS_UPGRADE_URL,
|
|
18
18
|
type BuilderCreditsStatus,
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
IconServer,
|
|
31
31
|
IconTrash,
|
|
32
32
|
IconUser,
|
|
33
|
+
IconUsersGroup,
|
|
33
34
|
} from "@tabler/icons-react";
|
|
34
35
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
35
36
|
import { toast } from "sonner";
|
|
@@ -394,6 +395,8 @@ export default function SettingsIndexRoute() {
|
|
|
394
395
|
const { session } = useSession();
|
|
395
396
|
const t = useT();
|
|
396
397
|
const agentSettingsTabs = useAgentSettingsTabs();
|
|
398
|
+
const { data: org } = useOrg();
|
|
399
|
+
const switchOrg = useSwitchOrg();
|
|
397
400
|
const email = session?.email ?? "";
|
|
398
401
|
const storageStatus = useVideoStorageStatus();
|
|
399
402
|
const builderStatus = useBuilderStatus();
|
|
@@ -505,6 +508,22 @@ export default function SettingsIndexRoute() {
|
|
|
505
508
|
void refreshApiKeyStatus();
|
|
506
509
|
}, [refreshApiKeyStatus]);
|
|
507
510
|
|
|
511
|
+
const orgs = org?.orgs ?? [];
|
|
512
|
+
|
|
513
|
+
async function handleUploadWorkspaceChange(organizationId: string) {
|
|
514
|
+
if (!organizationId || organizationId === org?.orgId) return;
|
|
515
|
+
try {
|
|
516
|
+
await switchOrg.mutateAsync(organizationId);
|
|
517
|
+
toast.success(t("settings.uploadWorkspaceSaved"));
|
|
518
|
+
} catch (err) {
|
|
519
|
+
toast.error(
|
|
520
|
+
err instanceof Error
|
|
521
|
+
? err.message
|
|
522
|
+
: t("settings.uploadWorkspaceSaveFailed"),
|
|
523
|
+
);
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
508
527
|
async function handleSave() {
|
|
509
528
|
setSaving(true);
|
|
510
529
|
try {
|
|
@@ -761,6 +780,13 @@ export default function SettingsIndexRoute() {
|
|
|
761
780
|
keywords: "storage s3 builder bucket cloud video",
|
|
762
781
|
hash: "video-storage",
|
|
763
782
|
},
|
|
783
|
+
{
|
|
784
|
+
id: "clips-upload-workspace",
|
|
785
|
+
label: t("settings.uploadWorkspaceTitle"),
|
|
786
|
+
keywords:
|
|
787
|
+
"upload recordings desktop destination organization workspace",
|
|
788
|
+
hash: "upload-workspace",
|
|
789
|
+
},
|
|
764
790
|
{
|
|
765
791
|
id: "clips-slack",
|
|
766
792
|
label: t("settings.slackTitle"),
|
|
@@ -835,6 +861,51 @@ export default function SettingsIndexRoute() {
|
|
|
835
861
|
</CardContent>
|
|
836
862
|
</Card>
|
|
837
863
|
|
|
864
|
+
{orgs.length > 0 ? (
|
|
865
|
+
<Card id="upload-workspace" className="scroll-mt-16">
|
|
866
|
+
<CardHeader>
|
|
867
|
+
<CardTitle className="flex items-center gap-2 text-base">
|
|
868
|
+
<IconUsersGroup className="size-4 text-primary" />
|
|
869
|
+
{t("settings.uploadWorkspaceTitle")}
|
|
870
|
+
</CardTitle>
|
|
871
|
+
<CardDescription>
|
|
872
|
+
{t("settings.uploadWorkspaceDescription")}
|
|
873
|
+
</CardDescription>
|
|
874
|
+
</CardHeader>
|
|
875
|
+
<CardContent className="max-w-md space-y-1.5">
|
|
876
|
+
<Label htmlFor="upload-workspace-select">
|
|
877
|
+
{t("settings.uploadWorkspaceLabel")}
|
|
878
|
+
</Label>
|
|
879
|
+
<Select
|
|
880
|
+
value={org?.orgId ?? undefined}
|
|
881
|
+
onValueChange={handleUploadWorkspaceChange}
|
|
882
|
+
disabled={switchOrg.isPending || orgs.length < 2}
|
|
883
|
+
>
|
|
884
|
+
<SelectTrigger id="upload-workspace-select">
|
|
885
|
+
<SelectValue
|
|
886
|
+
placeholder={t("settings.uploadWorkspacePlaceholder")}
|
|
887
|
+
/>
|
|
888
|
+
</SelectTrigger>
|
|
889
|
+
<SelectContent>
|
|
890
|
+
{orgs.map((workspace) => (
|
|
891
|
+
<SelectItem
|
|
892
|
+
key={workspace.orgId}
|
|
893
|
+
value={workspace.orgId}
|
|
894
|
+
>
|
|
895
|
+
{workspace.orgName}
|
|
896
|
+
</SelectItem>
|
|
897
|
+
))}
|
|
898
|
+
</SelectContent>
|
|
899
|
+
</Select>
|
|
900
|
+
<p className="text-xs text-muted-foreground">
|
|
901
|
+
{switchOrg.isPending
|
|
902
|
+
? t("settings.uploadWorkspaceSaving")
|
|
903
|
+
: t("settings.uploadWorkspaceHint")}
|
|
904
|
+
</p>
|
|
905
|
+
</CardContent>
|
|
906
|
+
</Card>
|
|
907
|
+
) : null}
|
|
908
|
+
|
|
838
909
|
<Card id="video-storage" className="scroll-mt-16">
|
|
839
910
|
<CardHeader>
|
|
840
911
|
<CardTitle className="text-base flex items-center gap-2">
|
|
@@ -4569,7 +4569,7 @@ function Setup({
|
|
|
4569
4569
|
<div className="setup-section">
|
|
4570
4570
|
<SettingLabel
|
|
4571
4571
|
label="Clip Drafts"
|
|
4572
|
-
hint="
|
|
4572
|
+
hint="Only clips you dismiss from the saved-upload card appear in Movies/Clips/Drafts. To retry a failed upload, return to the Clips popover and use Retry."
|
|
4573
4573
|
/>
|
|
4574
4574
|
<button
|
|
4575
4575
|
type="button"
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
appBasePath,
|
|
3
|
+
installRouteChunkRecovery,
|
|
4
|
+
} from "@agent-native/core/client";
|
|
2
5
|
import { hydrateRoot } from "react-dom/client";
|
|
3
6
|
import { HydratedRouter } from "react-router/dom";
|
|
4
7
|
|
|
8
|
+
installRouteChunkRecovery();
|
|
9
|
+
|
|
5
10
|
const basePath = appBasePath();
|
|
6
11
|
const pathname = window.location.pathname;
|
|
7
12
|
const routerBasePath =
|
|
@@ -31,6 +31,11 @@ specific essentials.
|
|
|
31
31
|
setup item is unclear.
|
|
32
32
|
- Keep approval and routing behavior explicit. Never silently widen access to
|
|
33
33
|
secrets, apps, integrations, or workspace resources.
|
|
34
|
+
- Curated workspace templates are private remix sources. Use
|
|
35
|
+
`list-curated-workspace-templates` to inspect the reviewed catalog and
|
|
36
|
+
`remix-workspace-template` to create an independent app. A remix may use
|
|
37
|
+
empty or synthetic data only; never copy source-app records, credentials,
|
|
38
|
+
secrets, or private configuration.
|
|
34
39
|
- `/operations` is the focused operator console. Its Monitoring tab reuses the
|
|
35
40
|
shared observability dashboard for traces, conversations, evaluations,
|
|
36
41
|
experiments, and feedback; its Database tab reuses the Code-mode database
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
appBasePath,
|
|
3
|
+
installRouteChunkRecovery,
|
|
4
|
+
} from "@agent-native/core/client";
|
|
2
5
|
import { hydrateRoot } from "react-dom/client";
|
|
3
6
|
import { HydratedRouter } from "react-router/dom";
|
|
4
7
|
|
|
8
|
+
installRouteChunkRecovery();
|
|
9
|
+
|
|
5
10
|
const basePath = appBasePath();
|
|
6
11
|
const pathname = window.location.pathname;
|
|
7
12
|
const routerBasePath =
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: slide-images
|
|
3
|
-
description: Image generation workflow -- generate-image,
|
|
3
|
+
description: Image generation workflow -- generate-image, search-images, and search-logos actions. Style reference patterns.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Slide Images
|
|
@@ -12,8 +12,8 @@ Images for slides are generated or sourced via three scripts. The agent delegate
|
|
|
12
12
|
| Script | Purpose | Example |
|
|
13
13
|
|--------|---------|---------|
|
|
14
14
|
| `generate-image` | Generate images (Gemini/OpenAI/auto) | `pnpm action generate-image --prompt "hero image" --model auto --count 3` |
|
|
15
|
-
| `
|
|
16
|
-
| `
|
|
15
|
+
| `search-images` | Search Google Images via the configured provider | `pnpm action search-images --q "Acme logo transparent" --count 5` |
|
|
16
|
+
| `search-logos` | Resolve company domains and canonical logo URLs | `pnpm action search-logos --q "Acme"` |
|
|
17
17
|
| `image-gen-status` | Check configured image providers | `pnpm action image-gen-status` |
|
|
18
18
|
|
|
19
19
|
## Image Generation Flow
|
|
@@ -46,19 +46,23 @@ Default style reference images from `shared/api.ts` are always included.
|
|
|
46
46
|
|
|
47
47
|
Two options for company logos:
|
|
48
48
|
|
|
49
|
-
**Option 1: Logo.dev
|
|
49
|
+
**Option 1: canonical logo search** (uses Logo.dev search when configured and a bounded domain fallback otherwise):
|
|
50
50
|
```bash
|
|
51
|
-
pnpm action
|
|
51
|
+
pnpm action search-logos --q "Acme"
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
Use a returned `logoUrl` directly. Do not call a second logo-provider action for
|
|
55
|
+
each result.
|
|
56
|
+
|
|
54
57
|
**Option 2: Google Image Search** (fallback):
|
|
55
58
|
```bash
|
|
56
|
-
pnpm action
|
|
59
|
+
pnpm action search-images --q "Acme logo transparent" --count 5
|
|
57
60
|
```
|
|
58
61
|
|
|
59
62
|
## Important Rules
|
|
60
63
|
|
|
61
64
|
- Always include style references for visual consistency
|
|
62
65
|
- Use `.fmd-img-placeholder` divs in slides before real images are generated
|
|
63
|
-
-
|
|
66
|
+
- Use one canonical provider action per conceptual search; do not loop legacy
|
|
67
|
+
provider scripts or manually guess provider URLs
|
|
64
68
|
- After inserting an image, update the deck via the API
|
|
@@ -40,6 +40,10 @@ Detailed deck, slide-editing, image, design-system, and export workflows live in
|
|
|
40
40
|
- Use image-generation and image-selection actions only when the deck genuinely
|
|
41
41
|
needs imagery; keep citations/asset provenance when available.
|
|
42
42
|
- Use framework sharing actions for deck visibility and grants.
|
|
43
|
+
- For a known, read-only sibling-app operation, use `call-agent` with `action`
|
|
44
|
+
and `input` (or `invokeAgentAction`) instead of starting the sibling agent's
|
|
45
|
+
model loop. In Analytics, use `gong-native-insights` for provider-synthesized
|
|
46
|
+
briefs and `gong-calls` for quotes, counts, transcripts, and coverage claims.
|
|
43
47
|
- Before generation, follow the creative-context reuse ladder in
|
|
44
48
|
`.agents/skills/creative-context/SKILL.md`: explicit request and current deck
|
|
45
49
|
first, then a pinned/current pack, then narrow library search. Respect
|
|
@@ -59,8 +59,8 @@ actions/ # Shared app operations (defineAction; UI uses ac
|
|
|
59
59
|
├── run.ts # Script dispatcher
|
|
60
60
|
├── generate-image.ts # Image generation with style references
|
|
61
61
|
├── image-gen-status.ts # Check API key status
|
|
62
|
-
├──
|
|
63
|
-
└──
|
|
62
|
+
├── search-images.ts # Canonical Google image search
|
|
63
|
+
└── search-logos.ts # Canonical company/logo search
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## Framework Basics (Nitro + @agent-native/core)
|
|
@@ -35,7 +35,7 @@ const codeFileSchema = z.object({
|
|
|
35
35
|
export default defineAction({
|
|
36
36
|
description:
|
|
37
37
|
"Start Builder DSI design-system indexing from connected code, a GitHub repository, code/design files, and optional design.md guidance. " +
|
|
38
|
-
"Use this instead of local
|
|
38
|
+
"Use this instead of legacy local code import when the user wants a reusable brand kit or slide design system. " +
|
|
39
39
|
"Requires Builder.io to be connected; Builder owns the indexed design-system docs, generated guidance, token/component extraction, and job state.",
|
|
40
40
|
schema: z.object({
|
|
41
41
|
projectName: z
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
|
+
import { getLogoProviderConfig } from "../server/lib/media-search-providers.js";
|
|
5
|
+
|
|
4
6
|
export default defineAction({
|
|
5
|
-
description: "Get logo
|
|
7
|
+
description: "Get runtime-backed logo provider configuration for the UI.",
|
|
6
8
|
schema: z.object({}),
|
|
7
9
|
http: { method: "GET" },
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
hasLogoDevSecret: !!process.env.LOGO_DEV_SECRET_KEY?.startsWith("sk_"),
|
|
12
|
-
};
|
|
13
|
-
},
|
|
10
|
+
readOnly: true,
|
|
11
|
+
agentTool: false,
|
|
12
|
+
run: async () => getLogoProviderConfig(),
|
|
14
13
|
});
|
|
@@ -1,55 +1,27 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
|
-
import { resolveSecret } from "@agent-native/core/server";
|
|
3
2
|
import { z } from "zod";
|
|
4
3
|
|
|
4
|
+
import { searchProviderImages } from "../server/lib/media-search-providers.js";
|
|
5
|
+
|
|
5
6
|
export default defineAction({
|
|
6
7
|
description: "Search for images using Google Custom Search API.",
|
|
7
8
|
schema: z.object({
|
|
8
9
|
q: z.string().optional().describe("Search query (required)"),
|
|
10
|
+
count: z.coerce
|
|
11
|
+
.number()
|
|
12
|
+
.int()
|
|
13
|
+
.min(1)
|
|
14
|
+
.max(10)
|
|
15
|
+
.default(10)
|
|
16
|
+
.describe("Maximum number of image results to return."),
|
|
9
17
|
}),
|
|
10
18
|
http: { method: "GET" },
|
|
19
|
+
readOnly: true,
|
|
11
20
|
run: async (args) => {
|
|
12
21
|
const q = args.q;
|
|
13
22
|
if (!q) {
|
|
14
23
|
throw new Error("Missing query parameter 'q'");
|
|
15
24
|
}
|
|
16
|
-
|
|
17
|
-
const [apiKey, cx] = await Promise.all([
|
|
18
|
-
resolveSecret("GOOGLE_API_KEY"),
|
|
19
|
-
resolveSecret("GOOGLE_SEARCH_CX"),
|
|
20
|
-
]);
|
|
21
|
-
|
|
22
|
-
if (!apiKey || !cx) {
|
|
23
|
-
throw new Error(
|
|
24
|
-
"Google Search not configured. Save GOOGLE_API_KEY and GOOGLE_SEARCH_CX in settings.",
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const params = new URLSearchParams({
|
|
29
|
-
key: apiKey,
|
|
30
|
-
cx,
|
|
31
|
-
q,
|
|
32
|
-
searchType: "image",
|
|
33
|
-
num: "10",
|
|
34
|
-
safe: "active",
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
const response = await fetch(
|
|
38
|
-
`https://www.googleapis.com/customsearch/v1?${params}`,
|
|
39
|
-
);
|
|
40
|
-
if (!response.ok) {
|
|
41
|
-
const text = await response.text();
|
|
42
|
-
console.error("Google API error:", response.status, text);
|
|
43
|
-
throw new Error("Google API error");
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const data = await response.json();
|
|
47
|
-
return (data.items || []).map((item: any) => ({
|
|
48
|
-
url: item.link,
|
|
49
|
-
thumbnail: item.image?.thumbnailLink || item.link,
|
|
50
|
-
title: item.title,
|
|
51
|
-
width: item.image?.width,
|
|
52
|
-
height: item.image?.height,
|
|
53
|
-
}));
|
|
25
|
+
return searchProviderImages(q, args.count);
|
|
54
26
|
},
|
|
55
27
|
});
|
|
@@ -1,67 +1,20 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
|
+
import { searchProviderLogos } from "../server/lib/media-search-providers.js";
|
|
5
|
+
|
|
4
6
|
export default defineAction({
|
|
5
7
|
description: "Search for company logos by name or domain.",
|
|
6
8
|
schema: z.object({
|
|
7
9
|
q: z.string().optional().describe("Company name or domain to search"),
|
|
8
10
|
}),
|
|
9
11
|
http: { method: "GET" },
|
|
12
|
+
readOnly: true,
|
|
10
13
|
run: async (args) => {
|
|
11
|
-
const q = (args.q || "").trim()
|
|
14
|
+
const q = (args.q || "").trim();
|
|
12
15
|
if (!q) {
|
|
13
16
|
throw new Error("Missing ?q= parameter");
|
|
14
17
|
}
|
|
15
|
-
|
|
16
|
-
const secretKey = process.env.LOGO_DEV_SECRET_KEY;
|
|
17
|
-
|
|
18
|
-
// If we have a secret key that's actually an sk_ key, use the search API
|
|
19
|
-
if (secretKey && secretKey.startsWith("sk_")) {
|
|
20
|
-
try {
|
|
21
|
-
const response = await fetch(
|
|
22
|
-
`https://api.logo.dev/search?q=${encodeURIComponent(q)}`,
|
|
23
|
-
{ headers: { Authorization: `Bearer ${secretKey}` } },
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
if (response.ok) {
|
|
27
|
-
const results: Array<{ name: string; domain: string }> =
|
|
28
|
-
await response.json();
|
|
29
|
-
return results.map((r) => ({ name: r.name, domain: r.domain }));
|
|
30
|
-
}
|
|
31
|
-
} catch {
|
|
32
|
-
// Fall through to domain guessing
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Domain guessing: generate candidate domains from the query
|
|
37
|
-
const candidates: Array<{ name: string; domain: string }> = [];
|
|
38
|
-
|
|
39
|
-
if (q.includes(".")) {
|
|
40
|
-
const clean = q
|
|
41
|
-
.replace(/^https?:\/\//, "")
|
|
42
|
-
.replace(/^www\./, "")
|
|
43
|
-
.split("/")[0];
|
|
44
|
-
candidates.push({ name: clean.split(".")[0], domain: clean });
|
|
45
|
-
} else {
|
|
46
|
-
const slug = q.replace(/[^a-z0-9]/g, "");
|
|
47
|
-
const slugDashed = q.replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
48
|
-
|
|
49
|
-
const tlds = [".com", ".io", ".co", ".dev", ".org", ".net"];
|
|
50
|
-
const seen = new Set<string>();
|
|
51
|
-
|
|
52
|
-
for (const tld of tlds) {
|
|
53
|
-
const domain = slug + tld;
|
|
54
|
-
if (!seen.has(domain)) {
|
|
55
|
-
seen.add(domain);
|
|
56
|
-
candidates.push({ name: q, domain });
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (slugDashed !== slug) {
|
|
61
|
-
candidates.push({ name: q, domain: slugDashed + ".com" });
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return candidates;
|
|
18
|
+
return searchProviderLogos(q);
|
|
66
19
|
},
|
|
67
20
|
});
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
agentNativePath,
|
|
3
|
-
useActionQuery,
|
|
4
|
-
useT,
|
|
5
|
-
} from "@agent-native/core/client";
|
|
1
|
+
import { callAction, useActionQuery, useT } from "@agent-native/core/client";
|
|
6
2
|
import { IconX, IconSearch, IconLoader2 } from "@tabler/icons-react";
|
|
7
3
|
import { useState, useEffect, useRef } from "react";
|
|
8
4
|
import { createPortal } from "react-dom";
|
|
9
5
|
|
|
10
|
-
const LOGO_DEV_PK = "pk_VwOyCAOgT0aBNpecT2qO-A";
|
|
11
|
-
|
|
12
6
|
interface LogoResult {
|
|
13
7
|
name: string;
|
|
14
8
|
domain: string;
|
|
9
|
+
logoUrl?: string;
|
|
15
10
|
}
|
|
16
11
|
|
|
17
12
|
interface LogoSearchPanelProps {
|
|
@@ -32,6 +27,7 @@ export default function LogoSearchPanel({
|
|
|
32
27
|
const [error, setError] = useState<string | null>(null);
|
|
33
28
|
const [selectedDomain, setSelectedDomain] = useState<string | null>(null);
|
|
34
29
|
const [brandfetchId, setBrandfetchId] = useState<string | null>(null);
|
|
30
|
+
const [logoDevToken, setLogoDevToken] = useState<string | null>(null);
|
|
35
31
|
const panelRef = useRef<HTMLDivElement>(null);
|
|
36
32
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
37
33
|
|
|
@@ -41,6 +37,7 @@ export default function LogoSearchPanel({
|
|
|
41
37
|
if (logoConfigData?.brandfetchId) {
|
|
42
38
|
setBrandfetchId(logoConfigData.brandfetchId);
|
|
43
39
|
}
|
|
40
|
+
setLogoDevToken(logoConfigData?.logoDevToken ?? null);
|
|
44
41
|
}, [logoConfigData]);
|
|
45
42
|
|
|
46
43
|
useEffect(() => {
|
|
@@ -84,17 +81,7 @@ export default function LogoSearchPanel({
|
|
|
84
81
|
setResults([]);
|
|
85
82
|
setSelectedDomain(null);
|
|
86
83
|
try {
|
|
87
|
-
const
|
|
88
|
-
agentNativePath(
|
|
89
|
-
`/_agent-native/actions/search-logos?q=${encodeURIComponent(q)}`,
|
|
90
|
-
),
|
|
91
|
-
);
|
|
92
|
-
if (!res.ok) {
|
|
93
|
-
const data = await res.json();
|
|
94
|
-
setError(data.error || "Search failed");
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
const data: LogoResult[] = await res.json();
|
|
84
|
+
const data = await callAction("search-logos", { q }, { method: "GET" });
|
|
98
85
|
if (data.length === 0) {
|
|
99
86
|
setError("No logos found");
|
|
100
87
|
} else {
|
|
@@ -116,7 +103,7 @@ export default function LogoSearchPanel({
|
|
|
116
103
|
|
|
117
104
|
// Build variations for the selected domain
|
|
118
105
|
const variations = selectedDomain
|
|
119
|
-
? buildVariations(selectedDomain, brandfetchId, t)
|
|
106
|
+
? buildVariations(selectedDomain, brandfetchId, logoDevToken, t)
|
|
120
107
|
: [];
|
|
121
108
|
|
|
122
109
|
return createPortal(
|
|
@@ -323,14 +310,12 @@ interface VariationGroup {
|
|
|
323
310
|
function buildVariations(
|
|
324
311
|
domain: string,
|
|
325
312
|
_brandfetchId: string | null,
|
|
313
|
+
logoDevToken: string | null,
|
|
326
314
|
t: ReturnType<typeof useT>,
|
|
327
315
|
): VariationGroup[] {
|
|
328
316
|
// Brandfetch CDN works without client ID for free tier
|
|
329
317
|
const bf = (path: string) => `https://cdn.brandfetch.io/${domain}/${path}`;
|
|
330
|
-
const
|
|
331
|
-
`https://img.logo.dev/${domain}?token=${LOGO_DEV_PK}&${params}`;
|
|
332
|
-
|
|
333
|
-
return [
|
|
318
|
+
const groups: VariationGroup[] = [
|
|
334
319
|
{
|
|
335
320
|
label: "Logo",
|
|
336
321
|
items: [
|
|
@@ -355,7 +340,11 @@ function buildVariations(
|
|
|
355
340
|
{ label: "Icon", url: bf("icon.png"), bg: "rgba(255,255,255,0.03)" },
|
|
356
341
|
],
|
|
357
342
|
},
|
|
358
|
-
|
|
343
|
+
];
|
|
344
|
+
if (logoDevToken) {
|
|
345
|
+
const ld = (params: string) =>
|
|
346
|
+
`https://img.logo.dev/${domain}?token=${encodeURIComponent(logoDevToken)}&${params}`;
|
|
347
|
+
groups.push({
|
|
359
348
|
label: "Logo.dev",
|
|
360
349
|
items: [
|
|
361
350
|
{
|
|
@@ -374,6 +363,7 @@ function buildVariations(
|
|
|
374
363
|
bg: "rgba(255,255,255,0.03)",
|
|
375
364
|
},
|
|
376
365
|
],
|
|
377
|
-
}
|
|
378
|
-
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
return groups;
|
|
379
369
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
appBasePath,
|
|
3
|
+
installRouteChunkRecovery,
|
|
4
|
+
} from "@agent-native/core/client";
|
|
2
5
|
import { hydrateRoot } from "react-dom/client";
|
|
3
6
|
import { HydratedRouter } from "react-router/dom";
|
|
4
7
|
|
|
8
|
+
installRouteChunkRecovery();
|
|
9
|
+
|
|
5
10
|
const basePath = appBasePath();
|
|
6
11
|
const pathname = window.location.pathname;
|
|
7
12
|
const routerBasePath =
|