@agent-native/core 0.75.4 → 0.76.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 +47 -0
- package/corpus/core/docs/AGENTS.md +1 -0
- package/corpus/core/docs/content/client.md +15 -0
- package/corpus/core/docs/content/internationalization.md +145 -0
- package/corpus/core/docs/content/locales/ar-SA/internationalization.md +102 -0
- package/corpus/core/docs/content/locales/de-DE/internationalization.md +102 -0
- package/corpus/core/docs/content/locales/es-ES/internationalization.md +102 -0
- package/corpus/core/docs/content/locales/fr-FR/internationalization.md +102 -0
- package/corpus/core/docs/content/locales/hi-IN/internationalization.md +102 -0
- package/corpus/core/docs/content/locales/ja-JP/internationalization.md +114 -0
- package/corpus/core/docs/content/locales/ko-KR/internationalization.md +102 -0
- package/corpus/core/docs/content/locales/pt-BR/internationalization.md +102 -0
- package/corpus/core/docs/content/locales/zh-CN/internationalization.md +102 -0
- package/corpus/core/docs/content/skills-guide.md +19 -18
- package/corpus/core/package.json +7 -1
- package/corpus/core/src/agent/durable-background.ts +62 -28
- package/corpus/core/src/agent/production-agent.ts +16 -12
- package/corpus/core/src/cli/skills.ts +22 -4
- package/corpus/core/src/client/CommandMenu.tsx +16 -0
- package/corpus/core/src/client/app-providers.tsx +26 -1
- package/corpus/core/src/client/i18n.tsx +605 -0
- package/corpus/core/src/client/index.ts +28 -0
- package/corpus/core/src/deploy/build.ts +47 -113
- package/corpus/core/src/deploy/workspace-deploy.ts +62 -30
- package/corpus/core/src/index.browser.ts +25 -0
- package/corpus/core/src/localization/actions/get-localization-preference.ts +23 -0
- package/corpus/core/src/localization/actions/set-localization-preference.ts +30 -0
- package/corpus/core/src/localization/index.ts +2 -0
- package/corpus/core/src/localization/server.ts +131 -0
- package/corpus/core/src/localization/shared.ts +163 -0
- package/corpus/core/src/server/action-discovery.ts +8 -0
- package/corpus/core/src/server/index.ts +8 -0
- package/corpus/core/src/server/self-dispatch.ts +29 -2
- package/corpus/core/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/corpus/core/src/templates/default/.agents/skills/internationalization/SKILL.md +77 -0
- package/corpus/core/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/core/src/templates/default/AGENTS.md +16 -15
- package/corpus/core/src/templates/default/app/i18n/en-US.ts +29 -0
- package/corpus/core/src/templates/default/app/i18n/index.ts +13 -0
- package/corpus/core/src/templates/default/app/root.tsx +20 -1
- package/corpus/core/src/templates/default/app/routes/_index.tsx +24 -9
- package/corpus/core/src/templates/default/app/routes/settings.tsx +67 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/internationalization/SKILL.md +77 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/core/src/vite/action-types-plugin.ts +10 -0
- package/corpus/templates/analytics/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/templates/analytics/app/components/layout/Header.tsx +18 -15
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +7 -5
- package/corpus/templates/analytics/app/components/layout/MobileNav.tsx +9 -3
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +5 -3
- package/corpus/templates/analytics/app/i18n/ar-SA.ts +3 -0
- package/corpus/templates/analytics/app/i18n/de-DE.ts +3 -0
- package/corpus/templates/analytics/app/i18n/en-US.ts +3 -0
- package/corpus/templates/analytics/app/i18n/es-ES.ts +3 -0
- package/corpus/templates/analytics/app/i18n/fr-FR.ts +3 -0
- package/corpus/templates/analytics/app/i18n/hi-IN.ts +3 -0
- package/corpus/templates/analytics/app/i18n/index.ts +31 -0
- package/corpus/templates/analytics/app/i18n/ja-JP.ts +3 -0
- package/corpus/templates/analytics/app/i18n/ko-KR.ts +3 -0
- package/corpus/templates/analytics/app/i18n/pt-BR.ts +3 -0
- package/corpus/templates/analytics/app/i18n/zh-CN.ts +3 -0
- package/corpus/templates/analytics/app/i18n-data.ts +433 -0
- package/corpus/templates/analytics/app/pages/Settings.tsx +50 -16
- package/corpus/templates/analytics/app/root.tsx +14 -1
- package/corpus/templates/analytics/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-settings-now-link-directly-to-agent-settings-for-model-api-k.md +6 -0
- package/corpus/templates/assets/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/templates/assets/app/components/layout/Header.tsx +17 -8
- package/corpus/templates/assets/app/components/layout/Layout.tsx +10 -6
- package/corpus/templates/assets/app/components/layout/Sidebar.tsx +40 -23
- package/corpus/templates/assets/app/i18n/ar-SA.ts +3 -0
- package/corpus/templates/assets/app/i18n/de-DE.ts +3 -0
- package/corpus/templates/assets/app/i18n/en-US.ts +3 -0
- package/corpus/templates/assets/app/i18n/es-ES.ts +3 -0
- package/corpus/templates/assets/app/i18n/fr-FR.ts +3 -0
- package/corpus/templates/assets/app/i18n/hi-IN.ts +3 -0
- package/corpus/templates/assets/app/i18n/index.ts +31 -0
- package/corpus/templates/assets/app/i18n/ja-JP.ts +3 -0
- package/corpus/templates/assets/app/i18n/ko-KR.ts +3 -0
- package/corpus/templates/assets/app/i18n/pt-BR.ts +3 -0
- package/corpus/templates/assets/app/i18n/zh-CN.ts +3 -0
- package/corpus/templates/assets/app/i18n-data.ts +668 -0
- package/corpus/templates/assets/app/root.tsx +40 -15
- package/corpus/templates/assets/app/routes/_index.tsx +9 -10
- package/corpus/templates/assets/app/routes/settings.tsx +37 -6
- package/corpus/templates/assets/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/assets/changelog/2026-06-24-settings-now-link-directly-to-agent-settings-for-model-api-k.md +6 -0
- package/corpus/templates/brain/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/corpus/templates/brain/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/templates/brain/app/components/layout/Layout.tsx +12 -8
- package/corpus/templates/brain/app/components/layout/Sidebar.tsx +23 -12
- package/corpus/templates/brain/app/i18n/ar-SA.ts +3 -0
- package/corpus/templates/brain/app/i18n/de-DE.ts +3 -0
- package/corpus/templates/brain/app/i18n/en-US.ts +3 -0
- package/corpus/templates/brain/app/i18n/es-ES.ts +3 -0
- package/corpus/templates/brain/app/i18n/fr-FR.ts +3 -0
- package/corpus/templates/brain/app/i18n/hi-IN.ts +3 -0
- package/corpus/templates/brain/app/i18n/index.ts +31 -0
- package/corpus/templates/brain/app/i18n/ja-JP.ts +3 -0
- package/corpus/templates/brain/app/i18n/ko-KR.ts +3 -0
- package/corpus/templates/brain/app/i18n/pt-BR.ts +3 -0
- package/corpus/templates/brain/app/i18n/zh-CN.ts +3 -0
- package/corpus/templates/brain/app/i18n-data.ts +624 -0
- package/corpus/templates/brain/app/root.tsx +27 -12
- package/corpus/templates/brain/app/routes/settings.tsx +45 -8
- package/corpus/templates/brain/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/brain/changelog/2026-06-24-settings-now-link-directly-to-agent-settings-for-model-api-k.md +6 -0
- package/corpus/templates/calendar/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +2 -0
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +16 -9
- package/corpus/templates/calendar/app/i18n/ar-SA.ts +57 -0
- package/corpus/templates/calendar/app/i18n/de-DE.ts +58 -0
- package/corpus/templates/calendar/app/i18n/en-US.ts +57 -0
- package/corpus/templates/calendar/app/i18n/es-ES.ts +58 -0
- package/corpus/templates/calendar/app/i18n/fr-FR.ts +58 -0
- package/corpus/templates/calendar/app/i18n/hi-IN.ts +57 -0
- package/corpus/templates/calendar/app/i18n/index.ts +31 -0
- package/corpus/templates/calendar/app/i18n/ja-JP.ts +58 -0
- package/corpus/templates/calendar/app/i18n/ko-KR.ts +57 -0
- package/corpus/templates/calendar/app/i18n/pt-BR.ts +57 -0
- package/corpus/templates/calendar/app/i18n/zh-CN.ts +57 -0
- package/corpus/templates/calendar/app/i18n-data.ts +516 -0
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +2 -0
- package/corpus/templates/calendar/app/pages/Settings.tsx +63 -28
- package/corpus/templates/calendar/app/root.tsx +78 -7
- package/corpus/templates/calendar/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/calendar/changelog/2026-06-24-settings-now-link-directly-to-agent-settings-for-model-api-k.md +6 -0
- package/corpus/templates/chat/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/corpus/templates/chat/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/templates/chat/app/components/layout/Header.tsx +17 -11
- package/corpus/templates/chat/app/components/layout/Layout.tsx +12 -8
- package/corpus/templates/chat/app/components/layout/Sidebar.tsx +47 -18
- package/corpus/templates/chat/app/i18n/ar-SA.ts +62 -0
- package/corpus/templates/chat/app/i18n/de-DE.ts +63 -0
- package/corpus/templates/chat/app/i18n/en-US.ts +63 -0
- package/corpus/templates/chat/app/i18n/es-ES.ts +63 -0
- package/corpus/templates/chat/app/i18n/fr-FR.ts +63 -0
- package/corpus/templates/chat/app/i18n/hi-IN.ts +63 -0
- package/corpus/templates/chat/app/i18n/index.ts +31 -0
- package/corpus/templates/chat/app/i18n/ja-JP.ts +63 -0
- package/corpus/templates/chat/app/i18n/ko-KR.ts +63 -0
- package/corpus/templates/chat/app/i18n/pt-BR.ts +63 -0
- package/corpus/templates/chat/app/i18n/zh-CN.ts +61 -0
- package/corpus/templates/chat/app/i18n-data.ts +475 -0
- package/corpus/templates/chat/app/root.tsx +18 -5
- package/corpus/templates/chat/app/routes/_index.tsx +9 -8
- package/corpus/templates/chat/app/routes/settings.tsx +86 -0
- package/corpus/templates/chat/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/corpus/templates/chat/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/clips/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/templates/clips/app/components/layout/Header.tsx +23 -17
- package/corpus/templates/clips/app/components/library/empty-state.tsx +10 -34
- package/corpus/templates/clips/app/components/library/library-layout.tsx +45 -34
- package/corpus/templates/clips/app/i18n/ar-SA.ts +182 -0
- package/corpus/templates/clips/app/i18n/de-DE.ts +184 -0
- package/corpus/templates/clips/app/i18n/en-US.ts +179 -0
- package/corpus/templates/clips/app/i18n/es-ES.ts +183 -0
- package/corpus/templates/clips/app/i18n/fr-FR.ts +184 -0
- package/corpus/templates/clips/app/i18n/hi-IN.ts +180 -0
- package/corpus/templates/clips/app/i18n/index.ts +41 -0
- package/corpus/templates/clips/app/i18n/ja-JP.ts +180 -0
- package/corpus/templates/clips/app/i18n/ko-KR.ts +178 -0
- package/corpus/templates/clips/app/i18n/pt-BR.ts +183 -0
- package/corpus/templates/clips/app/i18n/zh-CN.ts +173 -0
- package/corpus/templates/clips/app/root.tsx +104 -10
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +154 -95
- package/corpus/templates/clips/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-24-chrome-extension-setup-now-shows-a-clear-all-done-confirmati.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-24-clips-now-includes-a-language-picker-and-simplified-chinese-ui.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-24-settings-now-link-directly-to-agent-settings-for-model-api-k.md +6 -0
- package/corpus/templates/clips/chrome-extension/src/permission.html +60 -0
- package/corpus/templates/clips/chrome-extension/src/permission.ts +28 -15
- package/corpus/templates/content/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/templates/content/app/components/EmptyState.tsx +7 -5
- package/corpus/templates/content/app/components/ThemeToggle.tsx +4 -2
- package/corpus/templates/content/app/components/layout/Header.tsx +2 -0
- package/corpus/templates/content/app/components/layout/Layout.tsx +8 -7
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +41 -1
- package/corpus/templates/content/app/i18n/ar-SA.ts +3 -0
- package/corpus/templates/content/app/i18n/de-DE.ts +3 -0
- package/corpus/templates/content/app/i18n/en-US.ts +3 -0
- package/corpus/templates/content/app/i18n/es-ES.ts +3 -0
- package/corpus/templates/content/app/i18n/fr-FR.ts +3 -0
- package/corpus/templates/content/app/i18n/hi-IN.ts +3 -0
- package/corpus/templates/content/app/i18n/index.ts +31 -0
- package/corpus/templates/content/app/i18n/ja-JP.ts +3 -0
- package/corpus/templates/content/app/i18n/ko-KR.ts +3 -0
- package/corpus/templates/content/app/i18n/pt-BR.ts +3 -0
- package/corpus/templates/content/app/i18n/zh-CN.ts +3 -0
- package/corpus/templates/content/app/i18n-data.ts +490 -0
- package/corpus/templates/content/app/root.tsx +110 -23
- package/corpus/templates/content/app/routes/_app.settings.tsx +84 -0
- package/corpus/templates/content/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/corpus/templates/content/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/design/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/templates/design/app/components/layout/Header.tsx +16 -8
- package/corpus/templates/design/app/components/layout/Layout.tsx +8 -6
- package/corpus/templates/design/app/components/layout/Sidebar.tsx +25 -9
- package/corpus/templates/design/app/i18n/ar-SA.ts +3 -0
- package/corpus/templates/design/app/i18n/de-DE.ts +3 -0
- package/corpus/templates/design/app/i18n/en-US.ts +3 -0
- package/corpus/templates/design/app/i18n/es-ES.ts +3 -0
- package/corpus/templates/design/app/i18n/fr-FR.ts +3 -0
- package/corpus/templates/design/app/i18n/hi-IN.ts +3 -0
- package/corpus/templates/design/app/i18n/index.ts +31 -0
- package/corpus/templates/design/app/i18n/ja-JP.ts +3 -0
- package/corpus/templates/design/app/i18n/ko-KR.ts +3 -0
- package/corpus/templates/design/app/i18n/pt-BR.ts +3 -0
- package/corpus/templates/design/app/i18n/zh-CN.ts +3 -0
- package/corpus/templates/design/app/i18n-data.ts +350 -0
- package/corpus/templates/design/app/root.tsx +40 -15
- package/corpus/templates/design/app/routes/settings.tsx +43 -0
- package/corpus/templates/design/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/design/changelog/2026-06-24-settings-now-link-directly-to-agent-settings-for-model-api-k.md +6 -0
- package/corpus/templates/dispatch/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/templates/dispatch/app/i18n/ar-SA.ts +3 -0
- package/corpus/templates/dispatch/app/i18n/de-DE.ts +3 -0
- package/corpus/templates/dispatch/app/i18n/en-US.ts +3 -0
- package/corpus/templates/dispatch/app/i18n/es-ES.ts +3 -0
- package/corpus/templates/dispatch/app/i18n/fr-FR.ts +3 -0
- package/corpus/templates/dispatch/app/i18n/hi-IN.ts +3 -0
- package/corpus/templates/dispatch/app/i18n/index.ts +31 -0
- package/corpus/templates/dispatch/app/i18n/ja-JP.ts +3 -0
- package/corpus/templates/dispatch/app/i18n/ko-KR.ts +3 -0
- package/corpus/templates/dispatch/app/i18n/pt-BR.ts +3 -0
- package/corpus/templates/dispatch/app/i18n/zh-CN.ts +3 -0
- package/corpus/templates/dispatch/app/i18n-data.ts +267 -0
- package/corpus/templates/dispatch/app/root.tsx +18 -4
- package/corpus/templates/dispatch/app/routes/settings.tsx +86 -0
- package/corpus/templates/dispatch/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/forms/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/templates/forms/app/components/layout/Header.tsx +16 -9
- package/corpus/templates/forms/app/components/layout/Layout.tsx +6 -4
- package/corpus/templates/forms/app/components/layout/Sidebar.tsx +34 -17
- package/corpus/templates/forms/app/i18n/ar-SA.ts +58 -0
- package/corpus/templates/forms/app/i18n/de-DE.ts +59 -0
- package/corpus/templates/forms/app/i18n/en-US.ts +59 -0
- package/corpus/templates/forms/app/i18n/es-ES.ts +59 -0
- package/corpus/templates/forms/app/i18n/fr-FR.ts +59 -0
- package/corpus/templates/forms/app/i18n/hi-IN.ts +59 -0
- package/corpus/templates/forms/app/i18n/index.ts +31 -0
- package/corpus/templates/forms/app/i18n/ja-JP.ts +59 -0
- package/corpus/templates/forms/app/i18n/ko-KR.ts +59 -0
- package/corpus/templates/forms/app/i18n/pt-BR.ts +59 -0
- package/corpus/templates/forms/app/i18n/zh-CN.ts +56 -0
- package/corpus/templates/forms/app/root.tsx +65 -16
- package/corpus/templates/forms/app/routes/_app.settings.tsx +85 -0
- package/corpus/templates/forms/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/corpus/templates/forms/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +29 -17
- package/corpus/templates/macros/app/components/layout/Header.tsx +16 -10
- package/corpus/templates/macros/app/i18n/ar-SA.ts +54 -0
- package/corpus/templates/macros/app/i18n/de-DE.ts +55 -0
- package/corpus/templates/macros/app/i18n/en-US.ts +55 -0
- package/corpus/templates/macros/app/i18n/es-ES.ts +55 -0
- package/corpus/templates/macros/app/i18n/fr-FR.ts +55 -0
- package/corpus/templates/macros/app/i18n/hi-IN.ts +55 -0
- package/corpus/templates/macros/app/i18n/index.ts +31 -0
- package/corpus/templates/macros/app/i18n/ja-JP.ts +55 -0
- package/corpus/templates/macros/app/i18n/ko-KR.ts +55 -0
- package/corpus/templates/macros/app/i18n/pt-BR.ts +55 -0
- package/corpus/templates/macros/app/i18n/zh-CN.ts +53 -0
- package/corpus/templates/macros/app/root.tsx +65 -15
- package/corpus/templates/macros/app/routes/settings.tsx +85 -0
- package/corpus/templates/macros/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/corpus/templates/macros/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/mail/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +9 -4
- package/corpus/templates/mail/app/i18n/ar-SA.ts +33 -0
- package/corpus/templates/mail/app/i18n/de-DE.ts +33 -0
- package/corpus/templates/mail/app/i18n/en-US.ts +32 -0
- package/corpus/templates/mail/app/i18n/es-ES.ts +33 -0
- package/corpus/templates/mail/app/i18n/fr-FR.ts +33 -0
- package/corpus/templates/mail/app/i18n/hi-IN.ts +32 -0
- package/corpus/templates/mail/app/i18n/index.ts +31 -0
- package/corpus/templates/mail/app/i18n/ja-JP.ts +32 -0
- package/corpus/templates/mail/app/i18n/ko-KR.ts +33 -0
- package/corpus/templates/mail/app/i18n/pt-BR.ts +34 -0
- package/corpus/templates/mail/app/i18n/zh-CN.ts +32 -0
- package/corpus/templates/mail/app/pages/SettingsPage.tsx +67 -13
- package/corpus/templates/mail/app/root.tsx +20 -0
- package/corpus/templates/mail/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/mail/changelog/2026-06-24-settings-now-link-directly-to-agent-settings-for-model-api-k.md +6 -0
- package/corpus/templates/plan/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/corpus/templates/plan/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/templates/plan/.agents/skills/visual-plan/references/wireframe.md +22 -4
- package/corpus/templates/plan/.agents/skills/visual-recap/references/wireframe.md +22 -4
- package/corpus/templates/plan/app/components/layout/Header.tsx +19 -12
- package/corpus/templates/plan/app/components/layout/Layout.tsx +11 -7
- package/corpus/templates/plan/app/components/layout/Sidebar.tsx +41 -28
- package/corpus/templates/plan/app/i18n/ar-SA.ts +77 -0
- package/corpus/templates/plan/app/i18n/de-DE.ts +78 -0
- package/corpus/templates/plan/app/i18n/en-US.ts +78 -0
- package/corpus/templates/plan/app/i18n/es-ES.ts +78 -0
- package/corpus/templates/plan/app/i18n/fr-FR.ts +78 -0
- package/corpus/templates/plan/app/i18n/hi-IN.ts +78 -0
- package/corpus/templates/plan/app/i18n/index.ts +31 -0
- package/corpus/templates/plan/app/i18n/ja-JP.ts +79 -0
- package/corpus/templates/plan/app/i18n/ko-KR.ts +77 -0
- package/corpus/templates/plan/app/i18n/pt-BR.ts +78 -0
- package/corpus/templates/plan/app/i18n/zh-CN.ts +74 -0
- package/corpus/templates/plan/app/root.tsx +45 -8
- package/corpus/templates/plan/app/routes/settings.tsx +86 -0
- package/corpus/templates/plan/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/corpus/templates/plan/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/slides/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/templates/slides/app/components/layout/Header.tsx +23 -11
- package/corpus/templates/slides/app/components/layout/Layout.tsx +7 -6
- package/corpus/templates/slides/app/components/layout/Sidebar.tsx +23 -11
- package/corpus/templates/slides/app/i18n/ar-SA.ts +54 -0
- package/corpus/templates/slides/app/i18n/de-DE.ts +56 -0
- package/corpus/templates/slides/app/i18n/en-US.ts +55 -0
- package/corpus/templates/slides/app/i18n/es-ES.ts +55 -0
- package/corpus/templates/slides/app/i18n/fr-FR.ts +55 -0
- package/corpus/templates/slides/app/i18n/hi-IN.ts +55 -0
- package/corpus/templates/slides/app/i18n/index.ts +31 -0
- package/corpus/templates/slides/app/i18n/ja-JP.ts +55 -0
- package/corpus/templates/slides/app/i18n/ko-KR.ts +55 -0
- package/corpus/templates/slides/app/i18n/pt-BR.ts +55 -0
- package/corpus/templates/slides/app/i18n/zh-CN.ts +53 -0
- package/corpus/templates/slides/app/root.tsx +50 -8
- package/corpus/templates/slides/app/routes/settings.tsx +85 -0
- package/corpus/templates/slides/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/corpus/templates/slides/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/templates/videos/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/corpus/templates/videos/app/components/NewCompositionPopover.tsx +14 -9
- package/corpus/templates/videos/app/components/Sidebar.tsx +16 -9
- package/corpus/templates/videos/app/components/StudioHeader.tsx +12 -8
- package/corpus/templates/videos/app/components/layout/Header.tsx +21 -15
- package/corpus/templates/videos/app/components/layout/Layout.tsx +10 -7
- package/corpus/templates/videos/app/components/layout/NavSidebar.tsx +21 -6
- package/corpus/templates/videos/app/i18n/ar-SA.ts +73 -0
- package/corpus/templates/videos/app/i18n/de-DE.ts +75 -0
- package/corpus/templates/videos/app/i18n/en-US.ts +74 -0
- package/corpus/templates/videos/app/i18n/es-ES.ts +75 -0
- package/corpus/templates/videos/app/i18n/fr-FR.ts +75 -0
- package/corpus/templates/videos/app/i18n/hi-IN.ts +74 -0
- package/corpus/templates/videos/app/i18n/index.ts +31 -0
- package/corpus/templates/videos/app/i18n/ja-JP.ts +74 -0
- package/corpus/templates/videos/app/i18n/ko-KR.ts +74 -0
- package/corpus/templates/videos/app/i18n/pt-BR.ts +75 -0
- package/corpus/templates/videos/app/i18n/zh-CN.ts +72 -0
- package/corpus/templates/videos/app/pages/Index.tsx +11 -9
- package/corpus/templates/videos/app/root.tsx +45 -7
- package/corpus/templates/videos/app/routes/settings.tsx +85 -0
- package/corpus/templates/videos/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/corpus/templates/videos/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/dist/agent/durable-background.d.ts +32 -28
- package/dist/agent/durable-background.d.ts.map +1 -1
- package/dist/agent/durable-background.js +59 -28
- package/dist/agent/durable-background.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +16 -12
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/cli/skills.d.ts +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +22 -4
- package/dist/cli/skills.js.map +1 -1
- package/dist/client/CommandMenu.d.ts +3 -0
- package/dist/client/CommandMenu.d.ts.map +1 -1
- package/dist/client/CommandMenu.js +9 -0
- package/dist/client/CommandMenu.js.map +1 -1
- package/dist/client/app-providers.d.ts +8 -1
- package/dist/client/app-providers.d.ts.map +1 -1
- package/dist/client/app-providers.js +7 -5
- package/dist/client/app-providers.js.map +1 -1
- package/dist/client/i18n.d.ts +54 -0
- package/dist/client/i18n.d.ts.map +1 -0
- package/dist/client/i18n.js +354 -0
- package/dist/client/i18n.js.map +1 -0
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -1
- package/dist/client/index.js.map +1 -1
- package/dist/deploy/build.d.ts +32 -36
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +47 -104
- package/dist/deploy/build.js.map +1 -1
- package/dist/deploy/workspace-deploy.js +62 -30
- package/dist/deploy/workspace-deploy.js.map +1 -1
- package/dist/index.browser.d.ts +1 -1
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/localization/actions/get-localization-preference.d.ts +4 -0
- package/dist/localization/actions/get-localization-preference.d.ts.map +1 -0
- package/dist/localization/actions/get-localization-preference.js +16 -0
- package/dist/localization/actions/get-localization-preference.js.map +1 -0
- package/dist/localization/actions/set-localization-preference.d.ts +6 -0
- package/dist/localization/actions/set-localization-preference.d.ts.map +1 -0
- package/dist/localization/actions/set-localization-preference.js +24 -0
- package/dist/localization/actions/set-localization-preference.js.map +1 -0
- package/dist/localization/index.d.ts +3 -0
- package/dist/localization/index.d.ts.map +1 -0
- package/dist/localization/index.js +3 -0
- package/dist/localization/index.js.map +1 -0
- package/dist/localization/server.d.ts +25 -0
- package/dist/localization/server.d.ts.map +1 -0
- package/dist/localization/server.js +69 -0
- package/dist/localization/server.js.map +1 -0
- package/dist/localization/shared.d.ts +25 -0
- package/dist/localization/shared.d.ts.map +1 -0
- package/dist/localization/shared.js +134 -0
- package/dist/localization/shared.js.map +1 -0
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +8 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/self-dispatch.d.ts +0 -10
- package/dist/server/self-dispatch.d.ts.map +1 -1
- package/dist/server/self-dispatch.js +27 -2
- package/dist/server/self-dispatch.js.map +1 -1
- package/dist/templates/default/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/dist/templates/default/.agents/skills/internationalization/SKILL.md +77 -0
- package/dist/templates/default/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/dist/templates/default/AGENTS.md +16 -15
- package/dist/templates/default/app/i18n/en-US.ts +29 -0
- package/dist/templates/default/app/i18n/index.ts +13 -0
- package/dist/templates/default/app/root.tsx +20 -1
- package/dist/templates/default/app/routes/_index.tsx +24 -9
- package/dist/templates/default/app/routes/settings.tsx +67 -0
- package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/dist/templates/workspace-core/.agents/skills/internationalization/SKILL.md +77 -0
- package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/dist/vite/action-types-plugin.d.ts.map +1 -1
- package/dist/vite/action-types-plugin.js +8 -0
- package/dist/vite/action-types-plugin.js.map +1 -1
- package/docs/AGENTS.md +1 -0
- package/docs/content/client.md +15 -0
- package/docs/content/internationalization.md +145 -0
- package/docs/content/locales/ar-SA/internationalization.md +102 -0
- package/docs/content/locales/de-DE/internationalization.md +102 -0
- package/docs/content/locales/es-ES/internationalization.md +102 -0
- package/docs/content/locales/fr-FR/internationalization.md +102 -0
- package/docs/content/locales/hi-IN/internationalization.md +102 -0
- package/docs/content/locales/ja-JP/internationalization.md +114 -0
- package/docs/content/locales/ko-KR/internationalization.md +102 -0
- package/docs/content/locales/pt-BR/internationalization.md +102 -0
- package/docs/content/locales/zh-CN/internationalization.md +102 -0
- package/docs/content/skills-guide.md +19 -18
- package/package.json +7 -1
- package/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/src/templates/default/.agents/skills/internationalization/SKILL.md +77 -0
- package/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +6 -0
- package/src/templates/default/AGENTS.md +16 -15
- package/src/templates/default/app/i18n/en-US.ts +29 -0
- package/src/templates/default/app/i18n/index.ts +13 -0
- package/src/templates/default/app/root.tsx +20 -1
- package/src/templates/default/app/routes/_index.tsx +24 -9
- package/src/templates/default/app/routes/settings.tsx +67 -0
- package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +5 -0
- package/src/templates/workspace-core/.agents/skills/internationalization/SKILL.md +77 -0
- package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +6 -0
|
@@ -63,45 +63,79 @@ export const AGENT_CHAT_PROCESS_RUN_PATH =
|
|
|
63
63
|
export const AGENT_BACKGROUND_FUNCTION_NAME = "server-agent-background";
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
|
-
* Default function URL of the background function on Netlify
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* the name/url shape stays asserted and discoverable.
|
|
66
|
+
* Default function URL of the background function on Netlify. Every Netlify
|
|
67
|
+
* function is reachable at `/.netlify/functions/<name>` BY DEFAULT; that default
|
|
68
|
+
* url is removed ONLY if the function declares a custom `config.path`. The
|
|
69
|
+
* emitted background function declares NO custom `config.path` (it sets
|
|
70
|
+
* `background: true` and nothing else routing-related), so it KEEPS this default
|
|
71
|
+
* url — and the Nitro `server` function already excludes `/.netlify/*` from its
|
|
72
|
+
* `/*` catch-all, so this namespace is never shadowed. The foreground therefore
|
|
73
|
+
* dispatches HERE on hosted Netlify (see `resolveAgentChatProcessRunDispatchPath`).
|
|
75
74
|
*/
|
|
76
75
|
export const AGENT_BACKGROUND_FUNCTION_URL_PATH = `/.netlify/functions/${AGENT_BACKGROUND_FUNCTION_NAME}`;
|
|
77
76
|
|
|
77
|
+
/**
|
|
78
|
+
* The per-app workspace background function URL path. Workspace deploy emits one
|
|
79
|
+
* background function per app named `<app>-agent-background`, reachable at its
|
|
80
|
+
* DEFAULT url `/.netlify/functions/<app>-agent-background` (no custom
|
|
81
|
+
* `config.path`). The foreground resolves the current workspace app id from
|
|
82
|
+
* `AGENT_NATIVE_WORKSPACE_APP_ID` (set by the workspace function entry) so it can
|
|
83
|
+
* dispatch to the right per-app function url. Returns `null` when no workspace
|
|
84
|
+
* app id is configured (single-template deploy).
|
|
85
|
+
*/
|
|
86
|
+
function resolveWorkspaceBackgroundFunctionUrlPath(): string | null {
|
|
87
|
+
const raw = process.env.AGENT_NATIVE_WORKSPACE_APP_ID;
|
|
88
|
+
if (typeof raw !== "string") return null;
|
|
89
|
+
// Mirror the workspace app-id normalization (resources/store.ts): take the
|
|
90
|
+
// first path segment and accept only the safe slug shape used for function
|
|
91
|
+
// names. Anything else falls back to the single-template name.
|
|
92
|
+
const candidate = raw.trim().replace(/^\/+/, "").split("/")[0] ?? "";
|
|
93
|
+
if (!/^[a-z0-9][a-z0-9-]{0,127}$/.test(candidate)) return null;
|
|
94
|
+
return `/.netlify/functions/${candidate}-agent-background`;
|
|
95
|
+
}
|
|
96
|
+
|
|
78
97
|
/**
|
|
79
98
|
* Resolve the path the foreground POST should self-dispatch the chat background
|
|
80
99
|
* worker to.
|
|
81
100
|
*
|
|
82
|
-
* GROUNDED IN THE REAL NETLIFY BUILD OUTPUT
|
|
83
|
-
* INTO the scanned dir
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
101
|
+
* GROUNDED IN THE REAL NETLIFY BUILD OUTPUT + THE NETLIFY DOCS DEFAULT-URL RULE:
|
|
102
|
+
* the background function is emitted INTO the scanned dir
|
|
103
|
+
* (`.netlify/functions-internal/server-agent-background`, or per-app
|
|
104
|
+
* `<app>-agent-background` for workspaces) with `export const config = {
|
|
105
|
+
* background: true, ... }` and NO custom `config.path`. Because it has no custom
|
|
106
|
+
* path, Netlify keeps its DEFAULT function url `/.netlify/functions/<name>`, and
|
|
107
|
+
* `background: true` makes any invocation of that url ASYNC (immediate 202,
|
|
108
|
+
* 15-min budget). The Nitro `server` function already excludes `/.netlify/*`
|
|
109
|
+
* from its `/*` catch-all, so the default-url namespace is NEVER shadowed by the
|
|
110
|
+
* synchronous function.
|
|
90
111
|
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
112
|
+
* Therefore on hosted Netlify the foreground dispatches to the function's DEFAULT
|
|
113
|
+
* url (`/.netlify/functions/<name>`); the function entry then rewrites the
|
|
114
|
+
* incoming pathname to `AGENT_CHAT_PROCESS_RUN_PATH` (base-path-prefixed for
|
|
115
|
+
* workspaces) before delegating to the Nitro router, so the `_process-run`
|
|
116
|
+
* plugin runs with the async 15-min budget. Everywhere else (local dev, `netlify
|
|
117
|
+
* dev`, non-Netlify hosts where no second function exists) there is no second
|
|
118
|
+
* function, so the foreground dispatches to the framework route
|
|
119
|
+
* `AGENT_CHAT_PROCESS_RUN_PATH` and the same in-process catch-all handles it
|
|
120
|
+
* inline. The HMAC token (signed over the runId) is unchanged either way.
|
|
97
121
|
*
|
|
98
|
-
* NOTE: this is
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
122
|
+
* NOTE: this is the DOC-CORRECT approach. An earlier attempt gave the function a
|
|
123
|
+
* custom `config.path` + a catch-all `excludedPath` patch; the custom path was
|
|
124
|
+
* NOT honored as a route in prod (probe → 404). Using the default function url
|
|
125
|
+
* (no custom path) is what Netlify documents and is simpler — there is nothing
|
|
126
|
+
* to shadow because `/.netlify/*` is already excluded from the `server` catch-all.
|
|
103
127
|
*/
|
|
104
128
|
export function resolveAgentChatProcessRunDispatchPath(): string {
|
|
129
|
+
if (
|
|
130
|
+
process.env.NETLIFY &&
|
|
131
|
+
process.env.NETLIFY !== "false" &&
|
|
132
|
+
process.env.NETLIFY_LOCAL !== "true"
|
|
133
|
+
) {
|
|
134
|
+
return (
|
|
135
|
+
resolveWorkspaceBackgroundFunctionUrlPath() ??
|
|
136
|
+
AGENT_BACKGROUND_FUNCTION_URL_PATH
|
|
137
|
+
);
|
|
138
|
+
}
|
|
105
139
|
return AGENT_CHAT_PROCESS_RUN_PATH;
|
|
106
140
|
}
|
|
107
141
|
|
|
@@ -4394,13 +4394,16 @@ export function createProductionAgentHandler(
|
|
|
4394
4394
|
try {
|
|
4395
4395
|
await fireInternalDispatch({
|
|
4396
4396
|
event,
|
|
4397
|
-
//
|
|
4398
|
-
//
|
|
4399
|
-
//
|
|
4400
|
-
//
|
|
4401
|
-
//
|
|
4402
|
-
//
|
|
4403
|
-
//
|
|
4397
|
+
// On hosted Netlify this resolves to the background function's DEFAULT
|
|
4398
|
+
// url (/.netlify/functions/<name>, or per-app <app>-agent-background for
|
|
4399
|
+
// workspaces) — the function declares NO custom config.path, so it keeps
|
|
4400
|
+
// its default url, and `background: true` makes that url async (202,
|
|
4401
|
+
// 15-min budget). The `server` /* catch-all already excludes /.netlify/*
|
|
4402
|
+
// so it never shadows it. Off-Netlify this resolves to the framework
|
|
4403
|
+
// `_process-run` route and the same in-process catch-all handles it
|
|
4404
|
+
// inline. `fireInternalDispatch` strips the app base path for
|
|
4405
|
+
// /.netlify/* targets so the request reaches the host-root function url;
|
|
4406
|
+
// the Authorization Bearer HMAC is preserved either way.
|
|
4404
4407
|
path: resolveAgentChatProcessRunDispatchPath(),
|
|
4405
4408
|
taskId: runId,
|
|
4406
4409
|
body: {
|
|
@@ -4643,11 +4646,12 @@ export function createProductionAgentHandler(
|
|
|
4643
4646
|
try {
|
|
4644
4647
|
await fireInternalDispatch({
|
|
4645
4648
|
event,
|
|
4646
|
-
// Continuation chunks
|
|
4647
|
-
//
|
|
4648
|
-
//
|
|
4649
|
-
//
|
|
4650
|
-
//
|
|
4649
|
+
// Continuation chunks use the same path resolution as the
|
|
4650
|
+
// initial dispatch: on hosted Netlify the background
|
|
4651
|
+
// function's DEFAULT url (no custom config.path; async via
|
|
4652
|
+
// background:true; never shadowed because /.netlify/* is
|
|
4653
|
+
// excluded from the /* catch-all) so each chunk keeps the
|
|
4654
|
+
// 15-min budget; off-Netlify the in-process framework route.
|
|
4651
4655
|
path: resolveAgentChatProcessRunDispatchPath(),
|
|
4652
4656
|
taskId: nextRunId,
|
|
4653
4657
|
body: {
|
|
@@ -526,6 +526,13 @@ themes. For any inline border, background, or text color, reference a token:
|
|
|
526
526
|
and \`--wf-radius\`. Never hard-code a hex color and never set \`font-family\` — the
|
|
527
527
|
renderer owns the sketch/clean font.
|
|
528
528
|
|
|
529
|
+
**Use literal CSS lengths for spacing.** The \`--wf-*\` tokens are for colors and
|
|
530
|
+
renderer-owned visual styling, not layout spacing. Do not use guessed spacing
|
|
531
|
+
tokens such as \`var(--wf-space-4)\`, Tailwind spacing classes, or theme spacing
|
|
532
|
+
variables inside wireframe HTML; if a token is unavailable in the Plan renderer,
|
|
533
|
+
padding collapses and content hugs the border. Use explicit CSS lengths for
|
|
534
|
+
layout: \`padding:16px\`, \`gap:12px\`, \`margin-top:18px\`, \`minmax(0,1fr)\`.
|
|
535
|
+
|
|
529
536
|
**Lay out with inline \`style\` flex/grid.** You write the real layout —
|
|
530
537
|
\`display:flex; flex-direction:column; gap:10px; padding:16px\` and so on — and the
|
|
531
538
|
renderer never repositions anything. Compose the actual product: reproduce the
|
|
@@ -610,10 +617,21 @@ check/serve or verify command for \`<plan-dir>\`.
|
|
|
610
617
|
**Treat the wireframe border as part of the visible design.** Always wrap HTML
|
|
611
618
|
wireframe content in a root container with real inner padding before drawing
|
|
612
619
|
cards, fields, pills, labels, or controls. Use at least 14-16px of padding,
|
|
613
|
-
\`box-sizing: border-box\`, \`height: 100%\`, and \`gap\` between child rows
|
|
614
|
-
first row never sits flush against the screen border.
|
|
615
|
-
|
|
616
|
-
|
|
620
|
+
\`box-sizing: border-box\`, \`height: 100%\`, and \`gap\` between child rows on the
|
|
621
|
+
root node itself so the first row never sits flush against the screen border. Do
|
|
622
|
+
not rely on padding on a nested page section as the first visible inset; the
|
|
623
|
+
outermost element must create the breathing room. Keep text away from borders:
|
|
624
|
+
every container, field, button, menu item, and annotation needs enough padding
|
|
625
|
+
and line-height to read cleanly in the rendered Plan view.
|
|
626
|
+
|
|
627
|
+
**For feature-cloud or abundance visuals, optimize the composition over line-by-line
|
|
628
|
+
reading.** Some marketing/product sections need to feel like a large surface area
|
|
629
|
+
of capability rather than a precise app workflow. In those cases, use one padded
|
|
630
|
+
root with a short headline and a dense, aesthetic cloud of short feature labels,
|
|
631
|
+
chips, rings, or columns. Vary scale and opacity with tokens, cluster by meaning,
|
|
632
|
+
and let many labels be glanceable rather than individually essential. Do not
|
|
633
|
+
force dozens of features into equal cards with long wrapped sentences; that
|
|
634
|
+
usually creates a messy unreadable mockup.
|
|
617
635
|
|
|
618
636
|
**Lay out children safely so they never collide.** Use HTML flex/grid with
|
|
619
637
|
\`gap\`, \`min-width: 0\`, and sensible overflow. Avoid negative margins, absolute
|
|
@@ -63,6 +63,22 @@ export function openAgentSidebar() {
|
|
|
63
63
|
window.dispatchEvent(new Event("agent-panel:open"));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
export function openAgentSettings(
|
|
67
|
+
section?: string | { section?: string | null },
|
|
68
|
+
) {
|
|
69
|
+
if (typeof window === "undefined") return;
|
|
70
|
+
|
|
71
|
+
const normalizedSection =
|
|
72
|
+
typeof section === "string" ? section : section?.section;
|
|
73
|
+
|
|
74
|
+
openAgentSidebar();
|
|
75
|
+
window.dispatchEvent(
|
|
76
|
+
new CustomEvent("agent-panel:open-settings", {
|
|
77
|
+
detail: normalizedSection ? { section: normalizedSection } : undefined,
|
|
78
|
+
}),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
66
82
|
export function focusAgentChat() {
|
|
67
83
|
window.dispatchEvent(
|
|
68
84
|
new CustomEvent("agent-panel:set-mode", {
|
|
@@ -53,6 +53,10 @@ import { TooltipProvider } from "@radix-ui/react-tooltip";
|
|
|
53
53
|
import { Toaster } from "sonner";
|
|
54
54
|
import { ClientOnly } from "./ClientOnly.js";
|
|
55
55
|
import { DefaultSpinner } from "./DefaultSpinner.js";
|
|
56
|
+
import {
|
|
57
|
+
AgentNativeI18nProvider,
|
|
58
|
+
type AgentNativeI18nProviderProps,
|
|
59
|
+
} from "./i18n.js";
|
|
56
60
|
|
|
57
61
|
export interface AppProvidersProps {
|
|
58
62
|
/** QueryClient instance — create with `createAgentNativeQueryClient()`. */
|
|
@@ -94,6 +98,13 @@ export interface AppProvidersProps {
|
|
|
94
98
|
*/
|
|
95
99
|
disableThemeTransitions?: boolean;
|
|
96
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Optional localization runtime configuration. When omitted, AppProviders
|
|
103
|
+
* still mounts the i18n provider with an English fallback so templates can
|
|
104
|
+
* call useT/useLocale before they add catalogs. Pass false to opt out.
|
|
105
|
+
*/
|
|
106
|
+
i18n?: Omit<AgentNativeI18nProviderProps, "children"> | false;
|
|
107
|
+
|
|
97
108
|
/**
|
|
98
109
|
* When true the providers render without a `<ClientOnly>` gate so SSR
|
|
99
110
|
* streams real markup for public/unauthenticated paths.
|
|
@@ -119,6 +130,7 @@ function ProvidersInner({
|
|
|
119
130
|
tooltipDelayDuration,
|
|
120
131
|
toaster = DEFAULT_TOASTER,
|
|
121
132
|
disableThemeTransitions = true,
|
|
133
|
+
i18n,
|
|
122
134
|
children,
|
|
123
135
|
}: {
|
|
124
136
|
queryClient: QueryClient;
|
|
@@ -127,8 +139,18 @@ function ProvidersInner({
|
|
|
127
139
|
tooltipDelayDuration?: number;
|
|
128
140
|
toaster?: React.ReactNode | null;
|
|
129
141
|
disableThemeTransitions?: boolean;
|
|
142
|
+
i18n?: Omit<AgentNativeI18nProviderProps, "children"> | false;
|
|
130
143
|
children: React.ReactNode;
|
|
131
144
|
}) {
|
|
145
|
+
const localizedChildren =
|
|
146
|
+
i18n === false ? (
|
|
147
|
+
children
|
|
148
|
+
) : (
|
|
149
|
+
<AgentNativeI18nProvider {...(i18n ?? {})}>
|
|
150
|
+
{children}
|
|
151
|
+
</AgentNativeI18nProvider>
|
|
152
|
+
);
|
|
153
|
+
|
|
132
154
|
return (
|
|
133
155
|
<QueryClientProvider client={queryClient}>
|
|
134
156
|
<ThemeProvider
|
|
@@ -138,7 +160,7 @@ function ProvidersInner({
|
|
|
138
160
|
disableTransitionOnChange={disableThemeTransitions}
|
|
139
161
|
>
|
|
140
162
|
<TooltipProvider delayDuration={tooltipDelayDuration}>
|
|
141
|
-
{
|
|
163
|
+
{localizedChildren}
|
|
142
164
|
{toaster}
|
|
143
165
|
</TooltipProvider>
|
|
144
166
|
</ThemeProvider>
|
|
@@ -155,6 +177,7 @@ export function AppProviders({
|
|
|
155
177
|
tooltipDelayDuration,
|
|
156
178
|
toaster,
|
|
157
179
|
disableThemeTransitions,
|
|
180
|
+
i18n,
|
|
158
181
|
children,
|
|
159
182
|
}: AppProvidersProps) {
|
|
160
183
|
const fallback = clientOnlyFallback ?? <DefaultSpinner />;
|
|
@@ -168,6 +191,7 @@ export function AppProviders({
|
|
|
168
191
|
tooltipDelayDuration={tooltipDelayDuration}
|
|
169
192
|
toaster={toaster}
|
|
170
193
|
disableThemeTransitions={disableThemeTransitions}
|
|
194
|
+
i18n={i18n}
|
|
171
195
|
>
|
|
172
196
|
{children}
|
|
173
197
|
</ProvidersInner>
|
|
@@ -183,6 +207,7 @@ export function AppProviders({
|
|
|
183
207
|
tooltipDelayDuration={tooltipDelayDuration}
|
|
184
208
|
toaster={toaster}
|
|
185
209
|
disableThemeTransitions={disableThemeTransitions}
|
|
210
|
+
i18n={i18n}
|
|
186
211
|
>
|
|
187
212
|
{children}
|
|
188
213
|
</ProvidersInner>
|