@agent-native/core 0.79.17 → 0.79.19
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 +14 -0
- package/corpus/core/docs/content/file-uploads.md +11 -4
- package/corpus/core/docs/content/locales/ar-SA/multi-app-workspace.md +3 -3
- package/corpus/core/docs/content/locales/de-DE/multi-app-workspace.md +3 -3
- package/corpus/core/docs/content/locales/es-ES/multi-app-workspace.md +3 -3
- package/corpus/core/docs/content/locales/fr-FR/multi-app-workspace.md +3 -3
- package/corpus/core/docs/content/locales/hi-IN/multi-app-workspace.md +3 -3
- package/corpus/core/docs/content/locales/ja-JP/multi-app-workspace.md +3 -3
- package/corpus/core/docs/content/locales/ko-KR/multi-app-workspace.md +3 -3
- package/corpus/core/docs/content/locales/pt-BR/multi-app-workspace.md +3 -3
- package/corpus/core/docs/content/locales/zh-CN/multi-app-workspace.md +3 -3
- package/corpus/core/docs/content/locales/zh-TW/multi-app-workspace.md +3 -3
- package/corpus/core/docs/content/multi-app-workspace.md +3 -3
- package/corpus/core/docs/content/template-clips.md +14 -5
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/engine/builder-engine.ts +8 -3
- package/corpus/core/src/cli/mcp.ts +11 -6
- package/corpus/core/src/client/AssistantChat.tsx +6 -2
- package/corpus/core/src/client/chat/markdown-renderer.tsx +1 -0
- package/corpus/core/src/client/i18n.tsx +77 -65
- package/corpus/core/src/client/index.ts +7 -1
- package/corpus/core/src/client/org/OrgSwitcher.tsx +5 -5
- package/corpus/core/src/client/org/TeamPage.tsx +11 -3
- package/corpus/core/src/client/settings/SettingsTabsPage.tsx +216 -0
- package/corpus/core/src/client/settings/index.ts +5 -0
- package/corpus/core/src/file-upload/index.ts +1 -0
- package/corpus/core/src/file-upload/registry.ts +22 -6
- package/corpus/core/src/file-upload/types.ts +6 -1
- package/corpus/core/src/integrations/adapters/email.ts +26 -18
- package/corpus/core/src/integrations/adapters/slack.ts +8 -7
- package/corpus/core/src/integrations/adapters/telegram.ts +9 -11
- package/corpus/core/src/integrations/adapters/whatsapp.ts +12 -9
- package/corpus/core/src/integrations/plugin.ts +79 -13
- package/corpus/core/src/onboarding/default-steps.ts +6 -3
- package/corpus/core/src/onboarding/types.ts +1 -1
- package/corpus/core/src/org/handlers.ts +1 -1
- package/corpus/core/src/server/agent-chat-plugin.ts +4 -7
- package/corpus/core/src/server/better-auth-instance.ts +19 -62
- package/corpus/core/src/server/core-routes-plugin.ts +93 -180
- package/corpus/core/src/server/create-server.ts +55 -116
- package/corpus/core/src/server/email-actions.ts +3 -6
- package/corpus/core/src/server/email.ts +52 -17
- package/corpus/core/src/server/index.ts +2 -1
- package/corpus/core/src/server/scoped-key-storage.ts +223 -0
- package/corpus/core/src/shared/agent-env.ts +3 -3
- package/corpus/core/src/sharing/actions/share-resource.ts +1 -1
- package/corpus/core/src/styles/agent-native.css +47 -3
- package/corpus/core/src/templates/workspace-root/AGENTS.md +3 -2
- package/corpus/core/src/templates/workspace-root/README.md +1 -1
- package/corpus/core/src/templates/workspace-root/scripts/repair-workspace-org.ts +29 -90
- package/corpus/core/src/terminal/pty-server.ts +3 -38
- package/corpus/core/src/triggers/dispatcher.ts +1 -2
- package/corpus/templates/.retired/issues/package.json +7 -0
- package/corpus/templates/.retired/meeting-notes/package.json +7 -0
- package/corpus/templates/.retired/recruiting/package.json +7 -0
- package/corpus/templates/.retired/scheduling/package.json +7 -0
- package/corpus/templates/.retired/voice/package.json +7 -0
- package/corpus/templates/analytics/app/components/layout/Header.tsx +0 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +1 -18
- package/corpus/templates/analytics/app/global.css +15 -0
- package/corpus/templates/analytics/app/i18n/zh-TW.ts +7 -1
- package/corpus/templates/analytics/app/i18n-data.ts +71 -2
- package/corpus/templates/analytics/app/pages/Ask.tsx +1 -1
- package/corpus/templates/analytics/app/pages/Settings.tsx +120 -73
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +0 -11
- package/corpus/templates/analytics/app/routes/catalog.tsx +33 -176
- package/corpus/templates/analytics/app/routes/team.tsx +3 -2
- package/corpus/templates/analytics/changelog/2026-06-26-dashboard-templates-are-tucked-into-settings-and-show-simple.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-26-the-ask-tab-uses-a-softer-dark-gray-canvas-while-sidebar-cha.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-26-the-sessions-page-shows-a-single-page-title-instead-of-repea.md +6 -0
- package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +37 -28
- package/corpus/templates/assets/app/routes/settings.tsx +65 -43
- package/corpus/templates/assets/app/routes/team.tsx +2 -10
- package/corpus/templates/brain/app/routes/settings.tsx +390 -358
- package/corpus/templates/brain/app/routes/team.tsx +2 -8
- package/corpus/templates/calendar/actions/db-connect.ts +5 -29
- package/corpus/templates/calendar/app/components/CloudUpgrade.tsx +8 -51
- package/corpus/templates/calendar/app/components/calendar/GoogleConnectBanner.tsx +2 -1
- package/corpus/templates/calendar/app/components/calendar/GoogleSetupWizard.tsx +4 -2
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +0 -2
- package/corpus/templates/calendar/app/pages/Settings.tsx +304 -271
- package/corpus/templates/calendar/app/routes/_app.team.tsx +2 -17
- package/corpus/templates/calendar/server/handlers/google-auth.ts +22 -9
- package/corpus/templates/calendar/server/lib/booking-emails.ts +1 -1
- package/corpus/templates/calendar/server/lib/event-guest-notifications.ts +1 -1
- package/corpus/templates/calendar/server/lib/google-calendar.ts +48 -28
- package/corpus/templates/chat/app/components/layout/Header.tsx +0 -1
- package/corpus/templates/chat/app/hooks/use-navigation-state.ts +4 -2
- package/corpus/templates/chat/app/routes/settings.tsx +54 -54
- package/corpus/templates/chat/app/routes/team.tsx +2 -10
- package/corpus/templates/clips/.agents/skills/ai-video-tools/SKILL.md +7 -2
- package/corpus/templates/clips/.agents/skills/recording/SKILL.md +1 -1
- package/corpus/templates/clips/.agents/skills/video-sharing/SKILL.md +7 -0
- package/corpus/templates/clips/AGENTS.md +8 -0
- package/corpus/templates/clips/actions/invite-member.ts +1 -1
- package/corpus/templates/clips/actions/request-transcript.ts +1 -1
- package/corpus/templates/clips/app/components/library/library-layout.tsx +325 -333
- package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +80 -40
- package/corpus/templates/clips/app/components/player/transcript-panel.tsx +2 -0
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +629 -643
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +263 -158
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +10 -2
- package/corpus/templates/clips/changelog/2026-06-26-long-desktop-recordings-are-checkpointed-so-macos-finalizati.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-non-mac-desktop-recordings-wait-for-upload-transcription.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-recording-details-button-stays-at-the-far-right-on-small-screen.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-s3-compatible-storage-keys-now-save-securely-from-clips-sett.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-shared-clip-links-guide-agents-through-processing-transcripts.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-the-agent-sidebar-now-slides-in-smoothly-without-duplicate-e.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-26-the-clip-details-sidebar-now-collapses-into-a-slide-out-pane.md +6 -0
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +55 -3
- package/corpus/templates/clips/desktop/src/lib/transcription-capture.ts +217 -5
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +1 -0
- package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +176 -5
- package/corpus/templates/clips/server/lib/public-agent-context.ts +31 -0
- package/corpus/templates/clips/server/lib/s3-upload-provider.ts +60 -14
- package/corpus/templates/clips/server/lib/video-storage.ts +37 -9
- package/corpus/templates/clips/server/routes/api/agent-transcript.json.get.ts +5 -0
- package/corpus/templates/content/app/components/layout/Header.tsx +0 -1
- package/corpus/templates/content/app/components/sidebar/NotionButton.tsx +1 -0
- package/corpus/templates/content/app/routes/_app.settings.tsx +54 -55
- package/corpus/templates/content/app/routes/_app.team.tsx +2 -28
- package/corpus/templates/content/server/lib/notion.ts +43 -11
- package/corpus/templates/content/server/routes/api/notion/auth-url.get.ts +2 -2
- package/corpus/templates/content/server/routes/api/notion/status.get.ts +3 -3
- package/corpus/templates/design/app/routes/settings.tsx +60 -38
- package/corpus/templates/design/app/routes/team.tsx +2 -10
- package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +2 -2
- package/corpus/templates/dispatch/app/routes/settings.tsx +70 -55
- package/corpus/templates/dispatch/app/routes/team.tsx +5 -1
- package/corpus/templates/forms/actions/db-connect.ts +7 -36
- package/corpus/templates/forms/actions/navigate.ts +2 -2
- package/corpus/templates/forms/app/components/CloudUpgrade.tsx +8 -47
- package/corpus/templates/forms/app/components/layout/Header.tsx +0 -1
- package/corpus/templates/forms/app/components/layout/Layout.tsx +42 -25
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +35 -76
- package/corpus/templates/forms/app/global.css +9 -25
- package/corpus/templates/forms/app/hooks/use-navigation-state.ts +4 -4
- package/corpus/templates/forms/app/i18n/ar-SA.ts +1 -0
- package/corpus/templates/forms/app/i18n/de-DE.ts +1 -0
- package/corpus/templates/forms/app/i18n/en-US.ts +1 -0
- package/corpus/templates/forms/app/i18n/es-ES.ts +1 -0
- package/corpus/templates/forms/app/i18n/fr-FR.ts +1 -0
- package/corpus/templates/forms/app/i18n/hi-IN.ts +1 -0
- package/corpus/templates/forms/app/i18n/ja-JP.ts +1 -0
- package/corpus/templates/forms/app/i18n/ko-KR.ts +1 -0
- package/corpus/templates/forms/app/i18n/pt-BR.ts +1 -0
- package/corpus/templates/forms/app/i18n/zh-CN.ts +1 -0
- package/corpus/templates/forms/app/i18n/zh-TW.ts +1 -0
- package/corpus/templates/forms/app/lib/route-prewarm.ts +9 -8
- package/corpus/templates/forms/app/pages/AskPage.tsx +70 -0
- package/corpus/templates/forms/app/pages/FormsListPage.tsx +74 -81
- package/corpus/templates/forms/app/root.tsx +1 -1
- package/corpus/templates/forms/app/routes/_app.ask.tsx +14 -0
- package/corpus/templates/forms/app/routes/_app.settings.tsx +54 -54
- package/corpus/templates/forms/app/routes/_app.team.tsx +2 -9
- package/corpus/templates/forms/app/routes/_index.tsx +21 -130
- package/corpus/templates/forms/changelog/2026-06-26-ask-forms-opens-as-a-standard-app-tab-with-a-simpler-sidebar.md +6 -0
- package/corpus/templates/forms/changelog/2026-06-26-forms-are-shown-in-a-tighter-row-list-with-a-denser-sidebar.md +6 -0
- package/corpus/templates/forms/shared/navigation.ts +4 -2
- package/corpus/templates/macros/app/routes/settings.tsx +54 -54
- package/corpus/templates/macros/app/routes/team.tsx +2 -10
- package/corpus/templates/mail/actions/helpers.ts +2 -2
- package/corpus/templates/mail/app/components/GoogleConnectBanner.tsx +2 -1
- package/corpus/templates/mail/app/pages/SettingsPage.tsx +5 -5
- package/corpus/templates/mail/app/routes/team.tsx +3 -2
- package/corpus/templates/mail/server/handlers/emails.ts +3 -2
- package/corpus/templates/mail/server/handlers/google-auth.ts +19 -12
- package/corpus/templates/mail/server/lib/automation-engine.ts +3 -2
- package/corpus/templates/mail/server/lib/email-state.ts +2 -3
- package/corpus/templates/mail/server/lib/google-auth.ts +28 -11
- package/corpus/templates/mail/server/lib/jobs.ts +3 -2
- package/corpus/templates/mail/server/onboarding.ts +9 -6
- package/corpus/templates/mail/server/routes/api/attachments.get.ts +3 -3
- package/corpus/templates/plan/actions/request-plan-access.ts +1 -1
- package/corpus/templates/plan/app/components/layout/Header.tsx +0 -1
- package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +56 -4
- package/corpus/templates/plan/app/global.css +8 -3
- package/corpus/templates/plan/app/hooks/use-navigation-state.ts +4 -2
- package/corpus/templates/plan/app/lib/route-prewarm.ts +0 -4
- package/corpus/templates/plan/app/pages/PlansPage.tsx +1 -1
- package/corpus/templates/plan/app/routes/settings.tsx +75 -73
- package/corpus/templates/plan/app/routes/team.tsx +2 -8
- package/corpus/templates/plan/changelog/2026-06-26-canvas-grid-panning-now-stays-smooth-and-fills-the-workspace.md +6 -0
- package/corpus/templates/plan/server/lib/comment-notifications.ts +1 -1
- package/corpus/templates/slides/actions/check-image-gen.ts +2 -1
- package/corpus/templates/slides/actions/db-connect.ts +7 -45
- package/corpus/templates/slides/actions/edit-image.ts +6 -3
- package/corpus/templates/slides/actions/generate-image-api.ts +1 -1
- package/corpus/templates/slides/actions/generate-image.ts +2 -2
- package/corpus/templates/slides/actions/generate-slides-ai.ts +5 -3
- package/corpus/templates/slides/actions/image-gen-status.ts +4 -3
- package/corpus/templates/slides/actions/image-search.ts +6 -3
- package/corpus/templates/slides/actions/search-images.ts +6 -3
- package/corpus/templates/slides/app/components/CloudUpgrade.tsx +8 -51
- package/corpus/templates/slides/app/components/layout/Header.tsx +0 -1
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +0 -2
- package/corpus/templates/slides/app/routes/settings.tsx +54 -54
- package/corpus/templates/slides/app/routes/team.tsx +2 -12
- package/corpus/templates/slides/server/handlers/google-docs-auth.ts +9 -9
- package/corpus/templates/slides/server/handlers/image-gen.ts +5 -1
- package/corpus/templates/slides/server/handlers/image-providers/gemini.ts +9 -1
- package/corpus/templates/slides/server/handlers/image-providers/index.ts +18 -8
- package/corpus/templates/slides/server/handlers/image-providers/openai.ts +10 -4
- package/corpus/templates/slides/server/handlers/image-providers/types.ts +1 -0
- package/corpus/templates/slides/server/lib/google-docs-oauth.ts +59 -34
- package/corpus/templates/slides/server/register-secrets.ts +60 -0
- package/corpus/templates/videos/actions/db-connect.ts +7 -45
- package/corpus/templates/videos/app/components/CloudUpgrade.tsx +8 -51
- package/corpus/templates/videos/app/components/Sidebar.tsx +1 -9
- package/corpus/templates/videos/app/components/layout/Header.tsx +0 -1
- package/corpus/templates/videos/app/components/layout/NavSidebar.tsx +0 -3
- package/corpus/templates/videos/app/routes/settings.tsx +54 -54
- package/corpus/templates/videos/app/routes/team.tsx +2 -8
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +8 -3
- package/dist/agent/engine/builder-engine.js.map +1 -1
- package/dist/cli/mcp.d.ts.map +1 -1
- package/dist/cli/mcp.js +3 -4
- package/dist/cli/mcp.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +6 -2
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/chat/markdown-renderer.d.ts.map +1 -1
- package/dist/client/chat/markdown-renderer.js +1 -0
- package/dist/client/chat/markdown-renderer.js.map +1 -1
- package/dist/client/i18n.d.ts.map +1 -1
- package/dist/client/i18n.js +20 -9
- 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/org/OrgSwitcher.d.ts +3 -3
- package/dist/client/org/OrgSwitcher.js +2 -2
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/org/TeamPage.d.ts +6 -1
- package/dist/client/org/TeamPage.d.ts.map +1 -1
- package/dist/client/org/TeamPage.js +2 -2
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/settings/SettingsTabsPage.d.ts +27 -0
- package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -0
- package/dist/client/settings/SettingsTabsPage.js +108 -0
- package/dist/client/settings/SettingsTabsPage.js.map +1 -0
- package/dist/client/settings/index.d.ts +1 -0
- package/dist/client/settings/index.d.ts.map +1 -1
- package/dist/client/settings/index.js +1 -0
- package/dist/client/settings/index.js.map +1 -1
- package/dist/file-upload/index.d.ts +1 -1
- package/dist/file-upload/index.d.ts.map +1 -1
- package/dist/file-upload/index.js +1 -1
- package/dist/file-upload/index.js.map +1 -1
- package/dist/file-upload/registry.d.ts +1 -0
- package/dist/file-upload/registry.d.ts.map +1 -1
- package/dist/file-upload/registry.js +24 -6
- package/dist/file-upload/registry.js.map +1 -1
- package/dist/file-upload/types.d.ts +6 -1
- package/dist/file-upload/types.d.ts.map +1 -1
- package/dist/file-upload/types.js.map +1 -1
- package/dist/integrations/adapters/email.d.ts.map +1 -1
- package/dist/integrations/adapters/email.js +18 -18
- package/dist/integrations/adapters/email.js.map +1 -1
- package/dist/integrations/adapters/slack.d.ts.map +1 -1
- package/dist/integrations/adapters/slack.js +8 -7
- package/dist/integrations/adapters/slack.js.map +1 -1
- package/dist/integrations/adapters/telegram.d.ts.map +1 -1
- package/dist/integrations/adapters/telegram.js +9 -9
- package/dist/integrations/adapters/telegram.js.map +1 -1
- package/dist/integrations/adapters/whatsapp.d.ts.map +1 -1
- package/dist/integrations/adapters/whatsapp.js +10 -9
- package/dist/integrations/adapters/whatsapp.js.map +1 -1
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +47 -13
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/observability/routes.d.ts +6 -6
- package/dist/onboarding/default-steps.d.ts.map +1 -1
- package/dist/onboarding/default-steps.js +6 -5
- package/dist/onboarding/default-steps.js.map +1 -1
- package/dist/onboarding/types.d.ts +1 -1
- package/dist/onboarding/types.d.ts.map +1 -1
- package/dist/onboarding/types.js.map +1 -1
- package/dist/org/handlers.js +1 -1
- package/dist/org/handlers.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +4 -6
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +2 -2
- package/dist/server/better-auth-instance.d.ts.map +1 -1
- package/dist/server/better-auth-instance.js +17 -56
- package/dist/server/better-auth-instance.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +67 -153
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/create-server.d.ts +3 -9
- package/dist/server/create-server.d.ts.map +1 -1
- package/dist/server/create-server.js +37 -91
- package/dist/server/create-server.js.map +1 -1
- package/dist/server/email-actions.d.ts +2 -3
- package/dist/server/email-actions.d.ts.map +1 -1
- package/dist/server/email-actions.js +3 -6
- package/dist/server/email-actions.js.map +1 -1
- package/dist/server/email.d.ts +3 -3
- package/dist/server/email.d.ts.map +1 -1
- package/dist/server/email.js +40 -19
- package/dist/server/email.js.map +1 -1
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +3 -3
- package/dist/server/index.js.map +1 -1
- package/dist/server/scoped-key-storage.d.ts +22 -0
- package/dist/server/scoped-key-storage.d.ts.map +1 -0
- package/dist/server/scoped-key-storage.js +152 -0
- package/dist/server/scoped-key-storage.js.map +1 -0
- package/dist/shared/agent-env.d.ts +3 -3
- package/dist/shared/agent-env.d.ts.map +1 -1
- package/dist/shared/agent-env.js +3 -3
- package/dist/shared/agent-env.js.map +1 -1
- package/dist/sharing/actions/share-resource.js +1 -1
- package/dist/sharing/actions/share-resource.js.map +1 -1
- package/dist/styles/agent-native.css +47 -3
- package/dist/templates/workspace-root/AGENTS.md +3 -2
- package/dist/templates/workspace-root/README.md +1 -1
- package/dist/templates/workspace-root/scripts/repair-workspace-org.ts +29 -90
- package/dist/terminal/pty-server.d.ts.map +1 -1
- package/dist/terminal/pty-server.js +3 -36
- package/dist/terminal/pty-server.js.map +1 -1
- package/dist/triggers/dispatcher.js +1 -1
- package/dist/triggers/dispatcher.js.map +1 -1
- package/docs/content/file-uploads.md +11 -4
- package/docs/content/locales/ar-SA/multi-app-workspace.md +3 -3
- package/docs/content/locales/de-DE/multi-app-workspace.md +3 -3
- package/docs/content/locales/es-ES/multi-app-workspace.md +3 -3
- package/docs/content/locales/fr-FR/multi-app-workspace.md +3 -3
- package/docs/content/locales/hi-IN/multi-app-workspace.md +3 -3
- package/docs/content/locales/ja-JP/multi-app-workspace.md +3 -3
- package/docs/content/locales/ko-KR/multi-app-workspace.md +3 -3
- package/docs/content/locales/pt-BR/multi-app-workspace.md +3 -3
- package/docs/content/locales/zh-CN/multi-app-workspace.md +3 -3
- package/docs/content/locales/zh-TW/multi-app-workspace.md +3 -3
- package/docs/content/multi-app-workspace.md +3 -3
- package/docs/content/template-clips.md +14 -5
- package/package.json +1 -1
- package/src/templates/workspace-root/AGENTS.md +3 -2
- package/src/templates/workspace-root/README.md +1 -1
- package/src/templates/workspace-root/scripts/repair-workspace-org.ts +29 -90
- package/corpus/core/src/server/env-var-writes.ts +0 -16
- package/corpus/templates/analytics/app/pages/Team.tsx +0 -9
- package/corpus/templates/calendar/app/pages/Team.tsx +0 -12
- package/corpus/templates/mail/app/pages/Team.tsx +0 -17
- package/dist/server/env-var-writes.d.ts +0 -10
- package/dist/server/env-var-writes.d.ts.map +0 -1
- package/dist/server/env-var-writes.js +0 -18
- package/dist/server/env-var-writes.js.map +0 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ChangelogSettingsCard,
|
|
3
3
|
LanguagePicker,
|
|
4
|
+
SettingsTabsPage,
|
|
4
5
|
openAgentSettings,
|
|
5
6
|
useT,
|
|
6
7
|
} from "@agent-native/core/client";
|
|
8
|
+
import { TeamPage } from "@agent-native/core/client/org";
|
|
7
9
|
import { Button } from "@agent-native/dispatch/components/ui/button";
|
|
8
10
|
import {
|
|
9
11
|
Card,
|
|
@@ -27,63 +29,76 @@ export default function SettingsRoute() {
|
|
|
27
29
|
const t = useT();
|
|
28
30
|
|
|
29
31
|
return (
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
{t("settings.description")}
|
|
37
|
-
</p>
|
|
38
|
-
</div>
|
|
32
|
+
<SettingsTabsPage
|
|
33
|
+
general={
|
|
34
|
+
<div className="mx-auto w-full max-w-3xl space-y-6">
|
|
35
|
+
<p className="text-sm leading-6 text-muted-foreground">
|
|
36
|
+
{t("settings.description")}
|
|
37
|
+
</p>
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
<Card>
|
|
40
|
+
<CardHeader>
|
|
41
|
+
<CardTitle className="text-base">
|
|
42
|
+
{t("settings.languageTitle")}
|
|
43
|
+
</CardTitle>
|
|
44
|
+
<CardDescription>
|
|
45
|
+
{t("settings.languageDescription")}
|
|
46
|
+
</CardDescription>
|
|
47
|
+
</CardHeader>
|
|
48
|
+
<CardContent className="max-w-xs space-y-1.5">
|
|
49
|
+
<Label>{t("settings.languageLabel")}</Label>
|
|
50
|
+
<LanguagePicker label={t("settings.languageLabel")} />
|
|
51
|
+
</CardContent>
|
|
52
|
+
</Card>
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
</Card>
|
|
54
|
+
<Card>
|
|
55
|
+
<CardHeader>
|
|
56
|
+
<CardTitle className="text-base">
|
|
57
|
+
{t("settings.workspaceTitle")}
|
|
58
|
+
</CardTitle>
|
|
59
|
+
<CardDescription>
|
|
60
|
+
{t("settings.workspaceDescription")}
|
|
61
|
+
</CardDescription>
|
|
62
|
+
</CardHeader>
|
|
63
|
+
<CardContent>
|
|
64
|
+
<Button variant="outline" asChild>
|
|
65
|
+
<Link to="/workspace">
|
|
66
|
+
{t("settings.openResourceSettings")}
|
|
67
|
+
</Link>
|
|
68
|
+
</Button>
|
|
69
|
+
</CardContent>
|
|
70
|
+
</Card>
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
72
|
+
<Card>
|
|
73
|
+
<CardHeader>
|
|
74
|
+
<CardTitle className="text-base">
|
|
75
|
+
{t("settings.agentTitle")}
|
|
76
|
+
</CardTitle>
|
|
77
|
+
<CardDescription>
|
|
78
|
+
{t("settings.agentDescription")}
|
|
79
|
+
</CardDescription>
|
|
80
|
+
</CardHeader>
|
|
81
|
+
<CardContent>
|
|
82
|
+
<Button variant="outline" onClick={() => openAgentSettings()}>
|
|
83
|
+
{t("settings.openAgentSettings")}
|
|
84
|
+
</Button>
|
|
85
|
+
</CardContent>
|
|
86
|
+
</Card>
|
|
87
|
+
</div>
|
|
88
|
+
}
|
|
89
|
+
team={
|
|
90
|
+
<div className="mx-auto w-full max-w-3xl">
|
|
91
|
+
<TeamPage
|
|
92
|
+
showTitle={false}
|
|
93
|
+
createOrgDescription="Set up a team to share dispatch destinations and approvals with your colleagues."
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
96
|
+
}
|
|
97
|
+
whatsNew={
|
|
98
|
+
<div className="mx-auto w-full max-w-3xl">
|
|
99
|
+
<ChangelogSettingsCard markdown={changelog} />
|
|
100
|
+
</div>
|
|
101
|
+
}
|
|
102
|
+
/>
|
|
88
103
|
);
|
|
89
104
|
}
|
|
@@ -1,49 +1,20 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
import path from "path";
|
|
3
|
-
|
|
4
1
|
import { defineAction } from "@agent-native/core";
|
|
5
2
|
import { z } from "zod";
|
|
6
3
|
|
|
7
|
-
function upsertEnvLine(lines: string[], key: string, value: string): string[] {
|
|
8
|
-
if (/[\r\n\0]/.test(value)) {
|
|
9
|
-
throw new Error(
|
|
10
|
-
`Invalid value for ${key}: must not contain newlines or null bytes`,
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const idx = lines.findIndex((l) => l.startsWith(`${key}=`));
|
|
15
|
-
const line = `${key}=${value}`;
|
|
16
|
-
if (idx >= 0) {
|
|
17
|
-
lines[idx] = line;
|
|
18
|
-
} else {
|
|
19
|
-
lines.push(line);
|
|
20
|
-
}
|
|
21
|
-
return lines;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
4
|
export default defineAction({
|
|
25
5
|
description:
|
|
26
|
-
"
|
|
6
|
+
"Explain how to configure deployment-level database connection settings.",
|
|
27
7
|
schema: z.object({
|
|
28
8
|
url: z.string().describe("DATABASE_URL value (required)"),
|
|
29
9
|
token: z.string().optional().describe("DATABASE_AUTH_TOKEN value"),
|
|
30
10
|
}),
|
|
31
11
|
http: false,
|
|
32
12
|
run: async (args) => {
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
upsertEnvLine(lines, "DATABASE_URL", args.url);
|
|
41
|
-
if (args.token) {
|
|
42
|
-
upsertEnvLine(lines, "DATABASE_AUTH_TOKEN", args.token);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
fs.writeFileSync(envPath, lines.join("\n"));
|
|
46
|
-
|
|
47
|
-
return `Database connection saved to .env. Restart the dev server for changes to take effect.`;
|
|
13
|
+
const maskedUrl = args.url.replace(/\/\/.*@/, "//***@");
|
|
14
|
+
return [
|
|
15
|
+
`Database connection not written: ${maskedUrl}.`,
|
|
16
|
+
"DATABASE_URL and DATABASE_AUTH_TOKEN are deployment-level database settings.",
|
|
17
|
+
"Configure them with your hosting provider and redeploy the app.",
|
|
18
|
+
].join(" ");
|
|
48
19
|
},
|
|
49
20
|
});
|
|
@@ -20,13 +20,13 @@ function writeId() {
|
|
|
20
20
|
|
|
21
21
|
export default defineAction({
|
|
22
22
|
description:
|
|
23
|
-
"Navigate the UI to a view or form. Views: home, forms, form, responses, response-insights, team, extensions, form-preview. Use view=responses with a formId when the user asks to see/open all responses for a form. Use view=form with tab=edit|responses|settings|integrations to open a form builder sub-tab.",
|
|
23
|
+
"Navigate the UI to a view or form. Views: ask, home, forms, form, responses, response-insights, team, extensions, form-preview. Use view=ask/home for the Ask Forms chat tab. Use view=forms to open the forms list/table. Use view=responses with a formId when the user asks to see/open all responses for a form. Use view=form with tab=edit|responses|settings|integrations to open a form builder sub-tab.",
|
|
24
24
|
schema: z.object({
|
|
25
25
|
view: z
|
|
26
26
|
.enum(FORMS_NAVIGATION_VIEWS)
|
|
27
27
|
.optional()
|
|
28
28
|
.describe(
|
|
29
|
-
"View to navigate to (home, forms, form, responses, response-insights, team, extensions, form-preview)",
|
|
29
|
+
"View to navigate to (ask, home, forms, form, responses, response-insights, team, extensions, form-preview)",
|
|
30
30
|
),
|
|
31
31
|
formId: z
|
|
32
32
|
.string()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useT } from "@agent-native/core/client";
|
|
2
2
|
import {
|
|
3
3
|
IconCheck,
|
|
4
4
|
IconLoader2,
|
|
@@ -120,59 +120,20 @@ export function CloudUpgrade({
|
|
|
120
120
|
connectingRef.current = true;
|
|
121
121
|
|
|
122
122
|
if (!dbUrl.trim()) {
|
|
123
|
-
setErrorMsg(
|
|
123
|
+
setErrorMsg(
|
|
124
|
+
"Database settings are deployment-level. Configure DATABASE_URL with your host and redeploy the app.",
|
|
125
|
+
);
|
|
124
126
|
setStatus("error");
|
|
125
127
|
connectingRef.current = false;
|
|
126
128
|
return;
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
try {
|
|
130
|
-
setStatus("
|
|
132
|
+
setStatus("error");
|
|
131
133
|
setErrorMsg("");
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
];
|
|
136
|
-
if (authToken.trim()) {
|
|
137
|
-
vars.push({ key: "DATABASE_AUTH_TOKEN", value: authToken.trim() });
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
const saveRes = await fetch(agentNativePath("/_agent-native/env-vars"), {
|
|
141
|
-
method: "POST",
|
|
142
|
-
headers: { "Content-Type": "application/json" },
|
|
143
|
-
body: JSON.stringify({ vars }),
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
if (!saveRes.ok) {
|
|
147
|
-
const data = await saveRes.json().catch(() => ({}));
|
|
148
|
-
throw new Error(data.error || t("cloudUpgrade.saveCredentialsFailed"));
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
// Poll db-health until it returns ok
|
|
152
|
-
setStatus("polling");
|
|
153
|
-
let ok = false;
|
|
154
|
-
for (let i = 0; i < 30; i++) {
|
|
155
|
-
await new Promise((r) => setTimeout(r, 1000));
|
|
156
|
-
try {
|
|
157
|
-
const healthRes = await fetch(appApiPath("/api/db-health"));
|
|
158
|
-
const health = await healthRes.json();
|
|
159
|
-
if (health.ok && health.local === false) {
|
|
160
|
-
ok = true;
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
} catch {
|
|
164
|
-
// Keep polling
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
if (!ok) {
|
|
169
|
-
throw new Error(t("cloudUpgrade.connectionFailedAfterAttempts"));
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
setStatus("success");
|
|
173
|
-
setTimeout(() => {
|
|
174
|
-
window.location.reload();
|
|
175
|
-
}, 1500);
|
|
134
|
+
throw new Error(
|
|
135
|
+
"Database settings are deployment-level. Configure DATABASE_URL and DATABASE_AUTH_TOKEN with your host, redeploy, then check sharing again.",
|
|
136
|
+
);
|
|
176
137
|
} catch (e) {
|
|
177
138
|
setErrorMsg(
|
|
178
139
|
e instanceof Error ? e.message : t("cloudUpgrade.connectionFailed"),
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
focusAgentChat,
|
|
4
4
|
navigateWithAgentChatViewTransition,
|
|
5
5
|
useAgentChatHomeHandoff,
|
|
6
|
+
useAgentChatHomeHandoffLinks,
|
|
6
7
|
useT,
|
|
7
8
|
} from "@agent-native/core/client";
|
|
8
9
|
import { InvitationBanner } from "@agent-native/core/client/org";
|
|
@@ -30,9 +31,15 @@ export function Layout({ children }: LayoutProps) {
|
|
|
30
31
|
const location = useLocation();
|
|
31
32
|
const navigate = useNavigate();
|
|
32
33
|
const t = useT();
|
|
34
|
+
const isAskRoute = location.pathname === "/ask";
|
|
33
35
|
const chatHomeHandoffActive = useAgentChatHomeHandoff({
|
|
34
36
|
storageKey: "forms",
|
|
35
37
|
activePath: location.pathname,
|
|
38
|
+
enabled: !isAskRoute,
|
|
39
|
+
});
|
|
40
|
+
useAgentChatHomeHandoffLinks({
|
|
41
|
+
storageKey: "forms",
|
|
42
|
+
chatPath: "/ask",
|
|
36
43
|
});
|
|
37
44
|
|
|
38
45
|
// Bind chat to the currently-open form. The `/forms/:id` URL covers
|
|
@@ -53,13 +60,14 @@ export function Layout({ children }: LayoutProps) {
|
|
|
53
60
|
// Editor routes (/forms/:id, /forms/:id/responses) render their own
|
|
54
61
|
// toolbar with AgentToggleButton — skip the global Header to avoid
|
|
55
62
|
// a double-header.
|
|
56
|
-
const showHeader =
|
|
57
|
-
|
|
58
|
-
|
|
63
|
+
const showHeader =
|
|
64
|
+
!NO_HEADER_PREFIXES.some((prefix) =>
|
|
65
|
+
location.pathname.startsWith(prefix),
|
|
66
|
+
) && !isAskRoute;
|
|
59
67
|
|
|
60
68
|
function openAskAgentFullscreen() {
|
|
61
69
|
focusAgentChat();
|
|
62
|
-
navigateWithAgentChatViewTransition(navigate, "/");
|
|
70
|
+
navigateWithAgentChatViewTransition(navigate, "/ask");
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
return (
|
|
@@ -68,28 +76,37 @@ export function Layout({ children }: LayoutProps) {
|
|
|
68
76
|
<div className="agent-layout-left-drawer flex shrink-0">
|
|
69
77
|
<Sidebar />
|
|
70
78
|
</div>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
openOnChatRunning={chatHomeHandoffActive}
|
|
78
|
-
onFullscreenRequest={openAskAgentFullscreen}
|
|
79
|
-
emptyStateText={t("agent.emptyState")}
|
|
80
|
-
suggestions={[
|
|
81
|
-
t("agent.suggestionSurvey"),
|
|
82
|
-
t("agent.suggestionSubmissions"),
|
|
83
|
-
t("agent.suggestionExport"),
|
|
84
|
-
]}
|
|
85
|
-
scope={sidebarScope}
|
|
86
|
-
>
|
|
87
|
-
<div className="flex h-full flex-1 flex-col overflow-hidden">
|
|
88
|
-
{showHeader ? <Header /> : null}
|
|
89
|
-
<InvitationBanner />
|
|
90
|
-
<main className="flex-1 overflow-auto">{children}</main>
|
|
79
|
+
{isAskRoute ? (
|
|
80
|
+
<div className="agent-layout-main-surface flex min-w-0 flex-1 overflow-hidden">
|
|
81
|
+
<div className="flex h-full flex-1 flex-col overflow-hidden">
|
|
82
|
+
<InvitationBanner />
|
|
83
|
+
<main className="flex-1 overflow-hidden">{children}</main>
|
|
84
|
+
</div>
|
|
91
85
|
</div>
|
|
92
|
-
|
|
86
|
+
) : (
|
|
87
|
+
<AgentSidebar
|
|
88
|
+
position="right"
|
|
89
|
+
defaultOpen
|
|
90
|
+
chatViewTransition
|
|
91
|
+
storageKey="forms"
|
|
92
|
+
browserTabId={TAB_ID}
|
|
93
|
+
openOnChatRunning={chatHomeHandoffActive}
|
|
94
|
+
onFullscreenRequest={openAskAgentFullscreen}
|
|
95
|
+
emptyStateText={t("agent.emptyState")}
|
|
96
|
+
suggestions={[
|
|
97
|
+
t("agent.suggestionSurvey"),
|
|
98
|
+
t("agent.suggestionSubmissions"),
|
|
99
|
+
t("agent.suggestionExport"),
|
|
100
|
+
]}
|
|
101
|
+
scope={sidebarScope}
|
|
102
|
+
>
|
|
103
|
+
<div className="flex h-full flex-1 flex-col overflow-hidden">
|
|
104
|
+
{showHeader ? <Header /> : null}
|
|
105
|
+
<InvitationBanner />
|
|
106
|
+
<main className="flex-1 overflow-auto">{children}</main>
|
|
107
|
+
</div>
|
|
108
|
+
</AgentSidebar>
|
|
109
|
+
)}
|
|
93
110
|
</div>
|
|
94
111
|
</HeaderActionsProvider>
|
|
95
112
|
);
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
import { ExtensionsSidebarSection } from "@agent-native/core/client/extensions";
|
|
11
11
|
import { OrgSwitcher } from "@agent-native/core/client/org";
|
|
12
12
|
import {
|
|
13
|
-
IconUsers,
|
|
14
13
|
IconArrowUp,
|
|
15
14
|
IconPlus,
|
|
16
15
|
IconMenu2,
|
|
17
16
|
IconX,
|
|
18
17
|
IconMessageCircle,
|
|
19
18
|
IconSettings,
|
|
19
|
+
IconForms,
|
|
20
20
|
} from "@tabler/icons-react";
|
|
21
21
|
import { useState, useRef, useEffect, type MouseEvent } from "react";
|
|
22
22
|
import { Link, useLocation, useNavigate } from "react-router";
|
|
@@ -29,7 +29,6 @@ import {
|
|
|
29
29
|
PopoverContent,
|
|
30
30
|
} from "@/components/ui/popover";
|
|
31
31
|
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
32
|
-
import { Skeleton } from "@/components/ui/skeleton";
|
|
33
32
|
import { Textarea } from "@/components/ui/textarea";
|
|
34
33
|
import {
|
|
35
34
|
Tooltip,
|
|
@@ -38,22 +37,14 @@ import {
|
|
|
38
37
|
TooltipTrigger,
|
|
39
38
|
} from "@/components/ui/tooltip";
|
|
40
39
|
import { useAgentPromptRun } from "@/hooks/use-agent-prompt-run";
|
|
41
|
-
import {
|
|
40
|
+
import { useCreateForm } from "@/hooks/use-forms";
|
|
42
41
|
import { useIsMobile } from "@/hooks/use-mobile";
|
|
43
42
|
import { cn } from "@/lib/utils";
|
|
44
43
|
|
|
45
|
-
const statusDots: Record<string, string> = {
|
|
46
|
-
draft: "bg-amber-500",
|
|
47
|
-
published: "bg-emerald-500",
|
|
48
|
-
closed: "bg-muted-foreground/50",
|
|
49
|
-
};
|
|
50
|
-
|
|
51
44
|
export function Sidebar() {
|
|
52
45
|
const location = useLocation();
|
|
53
46
|
const navigate = useNavigate();
|
|
54
47
|
const t = useT();
|
|
55
|
-
const { data: formsData, isLoading: formsLoading } = useForms();
|
|
56
|
-
const forms = Array.isArray(formsData) ? formsData : [];
|
|
57
48
|
const createForm = useCreateForm();
|
|
58
49
|
const { send } = useSendToAgentChat();
|
|
59
50
|
const promptRun = useAgentPromptRun({
|
|
@@ -95,22 +86,31 @@ export function Sidebar() {
|
|
|
95
86
|
}
|
|
96
87
|
|
|
97
88
|
function navigateHomeChat(event: MouseEvent<HTMLAnchorElement>) {
|
|
89
|
+
if (
|
|
90
|
+
event.metaKey ||
|
|
91
|
+
event.ctrlKey ||
|
|
92
|
+
event.shiftKey ||
|
|
93
|
+
event.altKey ||
|
|
94
|
+
event.button !== 0
|
|
95
|
+
) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
98
|
event.preventDefault();
|
|
99
99
|
if (isMobile) setMobileOpen(false);
|
|
100
100
|
focusAgentChat();
|
|
101
|
-
navigateWithAgentChatViewTransition(navigate, "/");
|
|
101
|
+
navigateWithAgentChatViewTransition(navigate, "/ask");
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
function toggleLogoView() {
|
|
105
105
|
if (isMobile) setMobileOpen(false);
|
|
106
106
|
focusAgentChat();
|
|
107
|
-
navigateWithAgentChatViewTransition(navigate, "/");
|
|
107
|
+
navigateWithAgentChatViewTransition(navigate, "/ask");
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
const newFormButton = (
|
|
111
111
|
<PopoverTrigger asChild>
|
|
112
|
-
<button className="
|
|
113
|
-
<IconPlus
|
|
112
|
+
<button className="flex min-h-[44px] w-full cursor-pointer items-center gap-2.5 rounded-md px-3 py-2 text-sm text-muted-foreground transition-all hover:bg-accent/50 hover:text-foreground">
|
|
113
|
+
<IconPlus className="h-4 w-4 shrink-0" />
|
|
114
114
|
<span>{t("sidebar.newForm")}</span>
|
|
115
115
|
</button>
|
|
116
116
|
</PopoverTrigger>
|
|
@@ -223,69 +223,41 @@ export function Sidebar() {
|
|
|
223
223
|
<ScrollArea className="min-h-0 min-w-0 flex-1">
|
|
224
224
|
<div
|
|
225
225
|
className={cn(
|
|
226
|
-
"min-w-0 max-w-full overflow-hidden
|
|
226
|
+
"grid min-w-0 max-w-full gap-1 overflow-hidden p-2",
|
|
227
227
|
isMobile ? "w-full" : "w-60",
|
|
228
228
|
)}
|
|
229
229
|
>
|
|
230
230
|
<Link
|
|
231
|
-
to="/"
|
|
231
|
+
to="/ask"
|
|
232
232
|
onClick={navigateHomeChat}
|
|
233
233
|
className={cn(
|
|
234
|
-
"flex w-full min-w-0 max-w-full items-center gap-2.5 overflow-hidden rounded-md px-3 py-2 text-sm
|
|
235
|
-
location.pathname === "/"
|
|
234
|
+
"flex min-h-[44px] w-full min-w-0 max-w-full items-center gap-2.5 overflow-hidden rounded-md px-3 py-2 text-sm transition-all hover:text-primary",
|
|
235
|
+
location.pathname === "/ask" || location.pathname === "/"
|
|
236
236
|
? "bg-accent text-accent-foreground"
|
|
237
237
|
: "text-muted-foreground hover:bg-accent/50 hover:text-foreground",
|
|
238
238
|
)}
|
|
239
239
|
>
|
|
240
|
-
<IconMessageCircle
|
|
240
|
+
<IconMessageCircle className="h-4 w-4 shrink-0" />
|
|
241
241
|
<span className="min-w-0 flex-1 basis-0 truncate">
|
|
242
242
|
{t("navigation.askForms")}
|
|
243
243
|
</span>
|
|
244
244
|
</Link>
|
|
245
245
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
)
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
const isActive =
|
|
262
|
-
location.pathname === `/forms/${form.id}` ||
|
|
263
|
-
location.pathname === `/forms/${form.id}/responses`;
|
|
264
|
-
return (
|
|
265
|
-
<Link
|
|
266
|
-
key={form.id}
|
|
267
|
-
to={`/forms/${form.id}`}
|
|
268
|
-
onClick={() => isMobile && setMobileOpen(false)}
|
|
269
|
-
className={cn(
|
|
270
|
-
"flex w-full min-w-0 max-w-full items-center gap-2.5 overflow-hidden rounded-md px-3 py-2 text-sm min-h-[44px]",
|
|
271
|
-
isActive
|
|
272
|
-
? "bg-accent text-accent-foreground"
|
|
273
|
-
: "text-muted-foreground hover:bg-accent/50 hover:text-foreground",
|
|
274
|
-
)}
|
|
275
|
-
title={form.title || t("sidebar.untitledForm")}
|
|
276
|
-
>
|
|
277
|
-
<span
|
|
278
|
-
className={cn(
|
|
279
|
-
"h-1.5 w-1.5 shrink-0 rounded-full",
|
|
280
|
-
isActive ? "bg-accent-foreground" : statusDots[form.status],
|
|
281
|
-
)}
|
|
282
|
-
/>
|
|
283
|
-
<span className="min-w-0 flex-1 basis-0 truncate">
|
|
284
|
-
{form.title || t("sidebar.untitledForm")}
|
|
285
|
-
</span>
|
|
286
|
-
</Link>
|
|
287
|
-
);
|
|
288
|
-
})}
|
|
246
|
+
<Link
|
|
247
|
+
to="/forms"
|
|
248
|
+
onClick={() => isMobile && setMobileOpen(false)}
|
|
249
|
+
className={cn(
|
|
250
|
+
"flex min-h-[44px] w-full min-w-0 max-w-full items-center gap-2.5 overflow-hidden rounded-md px-3 py-2 text-sm transition-all hover:text-primary",
|
|
251
|
+
location.pathname.startsWith("/forms")
|
|
252
|
+
? "bg-accent text-accent-foreground"
|
|
253
|
+
: "text-muted-foreground hover:bg-accent/50 hover:text-foreground",
|
|
254
|
+
)}
|
|
255
|
+
>
|
|
256
|
+
<IconForms className="h-4 w-4 shrink-0" />
|
|
257
|
+
<span className="min-w-0 flex-1 basis-0 truncate">
|
|
258
|
+
{t("navigation.allForms")}
|
|
259
|
+
</span>
|
|
260
|
+
</Link>
|
|
289
261
|
|
|
290
262
|
<Popover open={popoverOpen} onOpenChange={setPopoverOpen}>
|
|
291
263
|
{newFormButton}
|
|
@@ -309,19 +281,6 @@ export function Sidebar() {
|
|
|
309
281
|
<IconSettings size={14} className="shrink-0" />
|
|
310
282
|
<span>{t("navigation.settings")}</span>
|
|
311
283
|
</Link>
|
|
312
|
-
<Link
|
|
313
|
-
to="/team"
|
|
314
|
-
onClick={() => isMobile && setMobileOpen(false)}
|
|
315
|
-
className={cn(
|
|
316
|
-
"flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-sm min-h-[44px]",
|
|
317
|
-
location.pathname === "/team"
|
|
318
|
-
? "bg-accent text-accent-foreground"
|
|
319
|
-
: "text-muted-foreground hover:bg-accent/50 hover:text-foreground",
|
|
320
|
-
)}
|
|
321
|
-
>
|
|
322
|
-
<IconUsers size={14} className="shrink-0" />
|
|
323
|
-
<span>{t("navigation.team")}</span>
|
|
324
|
-
</Link>
|
|
325
284
|
</div>
|
|
326
285
|
|
|
327
286
|
{/* Tools */}
|