@agent-native/core 0.75.5 → 0.76.1
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 +48 -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 +38 -2
- package/corpus/core/src/agent/production-agent.ts +54 -0
- package/corpus/core/src/agent/run-manager.ts +27 -0
- package/corpus/core/src/agent/run-store.ts +185 -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/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/agent-chat-plugin.ts +71 -0
- package/corpus/core/src/server/auth.ts +13 -0
- package/corpus/core/src/server/index.ts +8 -0
- 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/CommandPalette.tsx +12 -12
- 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 +28 -26
- 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/pages/analyses/AnalysesList.tsx +2 -2
- 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/knowledge.tsx +6 -6
- package/corpus/templates/brain/app/routes/ops.tsx +4 -4
- package/corpus/templates/brain/app/routes/search.tsx +4 -4
- package/corpus/templates/brain/app/routes/settings.tsx +48 -11
- package/corpus/templates/brain/app/routes/sources.tsx +3 -3
- 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-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/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/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 +15 -0
- package/dist/agent/durable-background.d.ts.map +1 -1
- package/dist/agent/durable-background.js +28 -2
- 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 +34 -1
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts +8 -0
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +18 -1
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/run-store.d.ts +99 -0
- package/dist/agent/run-store.d.ts.map +1 -1
- package/dist/agent/run-store.js +155 -4
- package/dist/agent/run-store.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/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/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +58 -1
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +12 -0
- package/dist/server/auth.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/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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const messages = {
|
|
2
|
+
agent: {
|
|
3
|
+
emptyState: "可以问我任何关于邮件的问题",
|
|
4
|
+
suggestionSummarize: "总结我的未读邮件",
|
|
5
|
+
suggestionReplies: "今天哪些邮件需要我回复?",
|
|
6
|
+
suggestionWidget: "为我的收件箱创建自定义小组件",
|
|
7
|
+
},
|
|
8
|
+
settings: {
|
|
9
|
+
openAgentSettings: "打开代理设置",
|
|
10
|
+
agentDescription:
|
|
11
|
+
"打开代理侧边栏设置,管理模型、API 密钥、自动化、语音和其他代理控制项。",
|
|
12
|
+
agentTitle: "代理设置",
|
|
13
|
+
title: "设置",
|
|
14
|
+
general: "通用",
|
|
15
|
+
generalDescription: "Mail 的语言和账号级偏好设置。",
|
|
16
|
+
languageTitle: "语言",
|
|
17
|
+
languageDescription:
|
|
18
|
+
"选择此账号的界面语言。Mail 会在不同设备上记住你的选择。",
|
|
19
|
+
languageLabel: "界面语言",
|
|
20
|
+
whatsNew: "最新变化",
|
|
21
|
+
whatsNewDescription: "Agent-Native Mail 最近面向用户的更新。",
|
|
22
|
+
drafting: "起草",
|
|
23
|
+
automations: "自动化",
|
|
24
|
+
gmailFilters: "Gmail 筛选器",
|
|
25
|
+
aliases: "别名",
|
|
26
|
+
tracking: "跟踪",
|
|
27
|
+
slack: "Slack",
|
|
28
|
+
team: "团队",
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default messages;
|
|
@@ -7,6 +7,9 @@ import {
|
|
|
7
7
|
useChatModels,
|
|
8
8
|
useChangeVersions,
|
|
9
9
|
ChangelogSettingsCard,
|
|
10
|
+
LanguagePicker,
|
|
11
|
+
openAgentSettings,
|
|
12
|
+
useT,
|
|
10
13
|
} from "@agent-native/core/client";
|
|
11
14
|
import { appApiPath } from "@agent-native/core/client";
|
|
12
15
|
import changelog from "../../CHANGELOG.md?raw";
|
|
@@ -27,6 +30,7 @@ import {
|
|
|
27
30
|
IconFilter,
|
|
28
31
|
IconInfoCircle,
|
|
29
32
|
IconHistory,
|
|
33
|
+
IconSettings,
|
|
30
34
|
} from "@tabler/icons-react";
|
|
31
35
|
import { cn } from "@/lib/utils";
|
|
32
36
|
import { Button } from "@/components/ui/button";
|
|
@@ -1384,15 +1388,60 @@ function SlackIntakeSection() {
|
|
|
1384
1388
|
|
|
1385
1389
|
// ─── What's New Section ──────────────────────────────────────────────────────
|
|
1386
1390
|
|
|
1391
|
+
function GeneralSection() {
|
|
1392
|
+
const t = useT();
|
|
1393
|
+
return (
|
|
1394
|
+
<div className="flex-1 overflow-y-auto p-4 sm:p-8">
|
|
1395
|
+
<div className="mb-6">
|
|
1396
|
+
<h2 className="text-[16px] font-semibold text-foreground">
|
|
1397
|
+
{t("settings.general")}
|
|
1398
|
+
</h2>
|
|
1399
|
+
<p className="mt-0.5 text-[13px] text-muted-foreground">
|
|
1400
|
+
{t("settings.generalDescription")}
|
|
1401
|
+
</p>
|
|
1402
|
+
</div>
|
|
1403
|
+
|
|
1404
|
+
<div className="max-w-2xl rounded-lg border border-border/20 bg-card/50 p-4">
|
|
1405
|
+
<div className="mb-3">
|
|
1406
|
+
<h3 className="text-[13px] font-semibold text-foreground">
|
|
1407
|
+
{t("settings.languageTitle")}
|
|
1408
|
+
</h3>
|
|
1409
|
+
<p className="mt-0.5 text-[12px] text-muted-foreground">
|
|
1410
|
+
{t("settings.languageDescription")}
|
|
1411
|
+
</p>
|
|
1412
|
+
</div>
|
|
1413
|
+
<div className="max-w-sm">
|
|
1414
|
+
<LanguagePicker label={t("settings.languageLabel")} />
|
|
1415
|
+
</div>
|
|
1416
|
+
</div>
|
|
1417
|
+
|
|
1418
|
+
<div className="mt-4 max-w-2xl rounded-lg border border-border/20 bg-card/50 p-4">
|
|
1419
|
+
<div className="mb-3">
|
|
1420
|
+
<h3 className="text-[13px] font-semibold text-foreground">
|
|
1421
|
+
{t("settings.agentTitle")}
|
|
1422
|
+
</h3>
|
|
1423
|
+
<p className="mt-0.5 text-[12px] text-muted-foreground">
|
|
1424
|
+
{t("settings.agentDescription")}
|
|
1425
|
+
</p>
|
|
1426
|
+
</div>
|
|
1427
|
+
<Button variant="outline" size="sm" onClick={() => openAgentSettings()}>
|
|
1428
|
+
{t("settings.openAgentSettings")}
|
|
1429
|
+
</Button>
|
|
1430
|
+
</div>
|
|
1431
|
+
</div>
|
|
1432
|
+
);
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1387
1435
|
function WhatsNewSection() {
|
|
1436
|
+
const t = useT();
|
|
1388
1437
|
return (
|
|
1389
1438
|
<div className="flex-1 overflow-y-auto p-4 sm:p-8">
|
|
1390
1439
|
<div className="mb-6">
|
|
1391
1440
|
<h2 className="text-[16px] font-semibold text-foreground">
|
|
1392
|
-
|
|
1441
|
+
{t("settings.whatsNew")}
|
|
1393
1442
|
</h2>
|
|
1394
1443
|
<p className="mt-0.5 text-[13px] text-muted-foreground">
|
|
1395
|
-
|
|
1444
|
+
{t("settings.whatsNewDescription")}
|
|
1396
1445
|
</p>
|
|
1397
1446
|
</div>
|
|
1398
1447
|
|
|
@@ -1406,6 +1455,7 @@ function WhatsNewSection() {
|
|
|
1406
1455
|
// ─── Settings Page ────────────────────────────────────────────────────────────
|
|
1407
1456
|
|
|
1408
1457
|
type SettingsSection =
|
|
1458
|
+
| "general"
|
|
1409
1459
|
| "whats-new"
|
|
1410
1460
|
| "drafting"
|
|
1411
1461
|
| "automations"
|
|
@@ -1417,17 +1467,18 @@ type SettingsSection =
|
|
|
1417
1467
|
|
|
1418
1468
|
const navItems: {
|
|
1419
1469
|
id: SettingsSection;
|
|
1420
|
-
|
|
1470
|
+
labelKey: string;
|
|
1421
1471
|
icon: React.ComponentType<{ className?: string }>;
|
|
1422
1472
|
}[] = [
|
|
1423
|
-
{ id: "
|
|
1424
|
-
{ id: "
|
|
1425
|
-
{ id: "
|
|
1426
|
-
{ id: "
|
|
1427
|
-
{ id: "
|
|
1428
|
-
{ id: "
|
|
1429
|
-
{ id: "
|
|
1430
|
-
{ id: "
|
|
1473
|
+
{ id: "general", labelKey: "settings.general", icon: IconSettings },
|
|
1474
|
+
{ id: "whats-new", labelKey: "settings.whatsNew", icon: IconHistory },
|
|
1475
|
+
{ id: "drafting", labelKey: "settings.drafting", icon: IconSignature },
|
|
1476
|
+
{ id: "automations", labelKey: "settings.automations", icon: IconBolt },
|
|
1477
|
+
{ id: "gmail-filters", labelKey: "settings.gmailFilters", icon: IconFilter },
|
|
1478
|
+
{ id: "aliases", labelKey: "settings.aliases", icon: IconUsers },
|
|
1479
|
+
{ id: "tracking", labelKey: "settings.tracking", icon: IconChartBar },
|
|
1480
|
+
{ id: "slack", labelKey: "settings.slack", icon: IconBolt },
|
|
1481
|
+
{ id: "team", labelKey: "settings.team", icon: IconUsers },
|
|
1431
1482
|
];
|
|
1432
1483
|
|
|
1433
1484
|
function isSettingsSection(value: string | null): value is SettingsSection {
|
|
@@ -1435,6 +1486,7 @@ function isSettingsSection(value: string | null): value is SettingsSection {
|
|
|
1435
1486
|
}
|
|
1436
1487
|
|
|
1437
1488
|
export function SettingsPage() {
|
|
1489
|
+
const t = useT();
|
|
1438
1490
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
1439
1491
|
const navState = useNavigationState();
|
|
1440
1492
|
const [activeSection, setActiveSection] =
|
|
@@ -1460,11 +1512,12 @@ export function SettingsPage() {
|
|
|
1460
1512
|
{/* Top tabs on mobile, left sidebar on desktop */}
|
|
1461
1513
|
<div className="sm:w-[200px] shrink-0 sm:border-r border-b sm:border-b-0 border-border/30 bg-muted/50 dark:bg-[hsl(220,6%,5%)] sm:p-3 flex sm:flex-col gap-0.5 overflow-x-auto">
|
|
1462
1514
|
<p className="hidden sm:block px-2 py-1.5 text-[10px] font-medium text-muted-foreground/40 uppercase tracking-wider mb-1">
|
|
1463
|
-
|
|
1515
|
+
{t("settings.title")}
|
|
1464
1516
|
</p>
|
|
1465
1517
|
{navItems.map((item) => {
|
|
1466
1518
|
const Icon = item.icon;
|
|
1467
1519
|
const isActive = activeSection === item.id;
|
|
1520
|
+
const label = t(item.labelKey);
|
|
1468
1521
|
return (
|
|
1469
1522
|
<button
|
|
1470
1523
|
key={item.id}
|
|
@@ -1482,7 +1535,7 @@ export function SettingsPage() {
|
|
|
1482
1535
|
isActive ? "text-indigo-400" : "text-muted-foreground/60",
|
|
1483
1536
|
)}
|
|
1484
1537
|
/>
|
|
1485
|
-
{
|
|
1538
|
+
{label}
|
|
1486
1539
|
</button>
|
|
1487
1540
|
);
|
|
1488
1541
|
})}
|
|
@@ -1490,6 +1543,7 @@ export function SettingsPage() {
|
|
|
1490
1543
|
|
|
1491
1544
|
{/* Right content panel */}
|
|
1492
1545
|
<div className="flex flex-1 overflow-hidden bg-background">
|
|
1546
|
+
{activeSection === "general" && <GeneralSection />}
|
|
1493
1547
|
{activeSection === "whats-new" && <WhatsNewSection />}
|
|
1494
1548
|
{activeSection === "drafting" && <DraftingSection />}
|
|
1495
1549
|
{activeSection === "automations" && <AutomationsSection />}
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
appPath,
|
|
19
19
|
appApiPath,
|
|
20
20
|
createAgentNativeQueryClient,
|
|
21
|
+
getLocaleInitScript,
|
|
21
22
|
getThemeInitScript,
|
|
22
23
|
} from "@agent-native/core/client";
|
|
23
24
|
import { TAB_ID } from "@/lib/tab-id";
|
|
@@ -27,6 +28,7 @@ import { Button } from "@/components/ui/button";
|
|
|
27
28
|
import type { LinksFunction } from "react-router";
|
|
28
29
|
import stylesheet from "./global.css?url";
|
|
29
30
|
import { configureTracking } from "@agent-native/core/client";
|
|
31
|
+
import { i18nCatalog } from "./i18n";
|
|
30
32
|
configureTracking({
|
|
31
33
|
getDefaultProps: (_name, properties) => ({
|
|
32
34
|
...properties,
|
|
@@ -39,6 +41,7 @@ export const links: LinksFunction = () => [
|
|
|
39
41
|
];
|
|
40
42
|
|
|
41
43
|
const THEME_INIT_SCRIPT_SELECTOR = "script[data-agent-native-theme-init]";
|
|
44
|
+
const LOCALE_INIT_SCRIPT_SELECTOR = "script[data-agent-native-locale-init]";
|
|
42
45
|
|
|
43
46
|
function getHydrationStableThemeInitScript() {
|
|
44
47
|
if (typeof document !== "undefined") {
|
|
@@ -50,7 +53,18 @@ function getHydrationStableThemeInitScript() {
|
|
|
50
53
|
return getThemeInitScript();
|
|
51
54
|
}
|
|
52
55
|
|
|
56
|
+
function getHydrationStableLocaleInitScript() {
|
|
57
|
+
if (typeof document !== "undefined") {
|
|
58
|
+
const existing = document.querySelector<HTMLScriptElement>(
|
|
59
|
+
LOCALE_INIT_SCRIPT_SELECTOR,
|
|
60
|
+
);
|
|
61
|
+
if (existing?.innerHTML) return existing.innerHTML;
|
|
62
|
+
}
|
|
63
|
+
return getLocaleInitScript();
|
|
64
|
+
}
|
|
65
|
+
|
|
53
66
|
const THEME_INIT_SCRIPT = getHydrationStableThemeInitScript();
|
|
67
|
+
const LOCALE_INIT_SCRIPT = getHydrationStableLocaleInitScript();
|
|
54
68
|
|
|
55
69
|
export function Layout({ children }: { children: React.ReactNode }) {
|
|
56
70
|
return (
|
|
@@ -66,6 +80,11 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
|
|
66
80
|
suppressHydrationWarning
|
|
67
81
|
dangerouslySetInnerHTML={{ __html: THEME_INIT_SCRIPT }}
|
|
68
82
|
/>
|
|
83
|
+
<script
|
|
84
|
+
data-agent-native-locale-init
|
|
85
|
+
suppressHydrationWarning
|
|
86
|
+
dangerouslySetInnerHTML={{ __html: LOCALE_INIT_SCRIPT }}
|
|
87
|
+
/>
|
|
69
88
|
<link rel="icon" type="image/svg+xml" href={appPath("/favicon.svg")} />
|
|
70
89
|
<link rel="manifest" href={appPath("/manifest.json")} />
|
|
71
90
|
<meta name="theme-color" content="#3B82F6" />
|
|
@@ -262,6 +281,7 @@ export default function Root() {
|
|
|
262
281
|
themeAttribute={["class", "data-theme"]}
|
|
263
282
|
tooltipDelayDuration={300}
|
|
264
283
|
toaster={MAIL_TOASTER}
|
|
284
|
+
i18n={{ catalog: i18nCatalog }}
|
|
265
285
|
>
|
|
266
286
|
<RequireSession bypass={isMcpEmbedSurface()}>
|
|
267
287
|
<AutoFocus />
|
|
@@ -86,6 +86,10 @@ Instruction examples may name secret keys like `SLACK_WEBHOOK`, but must use
|
|
|
86
86
|
placeholders such as `${keys.SLACK_WEBHOOK}` or `<SLACK_WEBHOOK>`. Do not paste
|
|
87
87
|
real keys, internal data, or customer data into instructions as examples.
|
|
88
88
|
|
|
89
|
+
If the feature adds or changes visible UI copy, prompts, toasts, labels, empty
|
|
90
|
+
states, or formatting, read `internationalization` and update the app's i18n
|
|
91
|
+
catalogs in the same change.
|
|
92
|
+
|
|
89
93
|
For app-backed skills, declare skill visibility in the app-skill manifest:
|
|
90
94
|
|
|
91
95
|
- `internal` — only the app's own agents should use it.
|
|
@@ -177,3 +181,4 @@ TL;DR: spread `ownableColumns()` into the resource table, pair it with `createSh
|
|
|
177
181
|
- **create-skill** — How to create skills for new patterns (area 3 in detail)
|
|
178
182
|
- **storing-data** — Where to store the feature's data
|
|
179
183
|
- **real-time-sync** — How the UI stays in sync when the agent writes data
|
|
184
|
+
- **internationalization** — How to update localized UI copy and catalogs
|
|
@@ -66,6 +66,11 @@ el.dataset.selectedId = selectedItem?.id || "";
|
|
|
66
66
|
|
|
67
67
|
**Use configuration-driven rendering** — Extract visual decisions (colors, layouts, sizes) into JSON config files in `data/`. The agent can modify the config (Tier 1) instead of the component source (Tier 2).
|
|
68
68
|
|
|
69
|
+
**Keep localized copy in catalogs** — When editing visible UI copy, labels,
|
|
70
|
+
toasts, empty states, prompts, or formatting, read `internationalization` and
|
|
71
|
+
update `app/i18n/en-US.ts` plus existing locale catalogs instead of leaving new
|
|
72
|
+
inline strings in components.
|
|
73
|
+
|
|
69
74
|
## Don't
|
|
70
75
|
|
|
71
76
|
- Don't modify `.env` files or files containing secrets
|
|
@@ -80,3 +85,4 @@ el.dataset.selectedId = selectedItem?.id || "";
|
|
|
80
85
|
- **actions** — The agent can create or modify actions to add new capabilities
|
|
81
86
|
- **delegate-to-agent** — Self-modification requests come through the agent chat
|
|
82
87
|
- **real-time-sync** — Database writes trigger change events to update the UI
|
|
88
|
+
- **internationalization** — UI copy, language catalogs, locale switching, and RTL-safe edits
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
import { useLocation } from "react-router";
|
|
2
2
|
import { IconMenu2 } from "@tabler/icons-react";
|
|
3
3
|
import { useHeaderTitle, useHeaderActions } from "./HeaderActions";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
AgentToggleButton,
|
|
6
|
+
LanguagePicker,
|
|
7
|
+
useT,
|
|
8
|
+
} from "@agent-native/core/client";
|
|
5
9
|
import { APP_TITLE } from "@/lib/app-config";
|
|
6
10
|
|
|
7
|
-
const
|
|
8
|
-
"/": "
|
|
9
|
-
"/plans": "
|
|
10
|
-
"/settings": "
|
|
11
|
-
"/team": "
|
|
11
|
+
const pageTitleKeys: Record<string, string> = {
|
|
12
|
+
"/": "header.plan",
|
|
13
|
+
"/plans": "header.plan",
|
|
14
|
+
"/settings": "header.settings",
|
|
15
|
+
"/team": "header.team",
|
|
12
16
|
};
|
|
13
17
|
|
|
14
18
|
function resolveTitle(pathname: string): string {
|
|
15
|
-
if (
|
|
16
|
-
if (pathname.startsWith("/plans")) return "
|
|
17
|
-
if (pathname.startsWith("/extensions")) return "
|
|
18
|
-
return
|
|
19
|
+
if (pageTitleKeys[pathname]) return pageTitleKeys[pathname];
|
|
20
|
+
if (pathname.startsWith("/plans")) return "header.plan";
|
|
21
|
+
if (pathname.startsWith("/extensions")) return "header.extensions";
|
|
22
|
+
return "header.appTitle";
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
interface HeaderProps {
|
|
@@ -26,6 +30,8 @@ export function Header({ onOpenMobileSidebar }: HeaderProps) {
|
|
|
26
30
|
const location = useLocation();
|
|
27
31
|
const title = useHeaderTitle();
|
|
28
32
|
const actions = useHeaderActions();
|
|
33
|
+
const t = useT();
|
|
34
|
+
const resolvedTitle = resolveTitle(location.pathname);
|
|
29
35
|
|
|
30
36
|
return (
|
|
31
37
|
<header className="flex h-12 items-center gap-3 border-b border-border bg-background px-4 lg:px-6 shrink-0">
|
|
@@ -33,7 +39,7 @@ export function Header({ onOpenMobileSidebar }: HeaderProps) {
|
|
|
33
39
|
<button
|
|
34
40
|
type="button"
|
|
35
41
|
onClick={onOpenMobileSidebar}
|
|
36
|
-
aria-label="
|
|
42
|
+
aria-label={t("sidebar.openNavigation")}
|
|
37
43
|
className="flex h-9 w-9 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-accent md:hidden"
|
|
38
44
|
>
|
|
39
45
|
<IconMenu2 className="h-4 w-4" />
|
|
@@ -42,12 +48,13 @@ export function Header({ onOpenMobileSidebar }: HeaderProps) {
|
|
|
42
48
|
<div className="flex items-center gap-3 flex-1 min-w-0">
|
|
43
49
|
{title ?? (
|
|
44
50
|
<h1 className="text-lg font-semibold tracking-tight truncate">
|
|
45
|
-
{
|
|
51
|
+
{resolvedTitle === "header.appTitle" ? APP_TITLE : t(resolvedTitle)}
|
|
46
52
|
</h1>
|
|
47
53
|
)}
|
|
48
54
|
</div>
|
|
49
55
|
<div className="flex items-center gap-2 shrink-0">
|
|
50
56
|
{actions}
|
|
57
|
+
<LanguagePicker variant="icon" />
|
|
51
58
|
<AgentToggleButton />
|
|
52
59
|
</div>
|
|
53
60
|
</header>
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
AgentSidebar,
|
|
9
9
|
useAgentChatHomeHandoff,
|
|
10
10
|
useAgentChatHomeHandoffLinks,
|
|
11
|
+
useT,
|
|
11
12
|
} from "@agent-native/core/client";
|
|
12
13
|
import {
|
|
13
14
|
Sheet,
|
|
@@ -43,6 +44,7 @@ function isPlanDetailRoute(pathname: string): boolean {
|
|
|
43
44
|
|
|
44
45
|
export function Layout({ children }: LayoutProps) {
|
|
45
46
|
const location = useLocation();
|
|
47
|
+
const t = useT();
|
|
46
48
|
const [mobileSidebarOpen, setMobileSidebarOpen] = useState(false);
|
|
47
49
|
const [sidebarCollapsed, setSidebarCollapsed] = useState(() => {
|
|
48
50
|
if (typeof window === "undefined") return true;
|
|
@@ -136,7 +138,7 @@ export function Layout({ children }: LayoutProps) {
|
|
|
136
138
|
<button
|
|
137
139
|
type="button"
|
|
138
140
|
onClick={() => setMobileSidebarOpen(true)}
|
|
139
|
-
aria-label="
|
|
141
|
+
aria-label={t("sidebar.openNavigation")}
|
|
140
142
|
className="flex h-9 w-9 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-accent"
|
|
141
143
|
>
|
|
142
144
|
<IconMenu2 className="h-4 w-4" />
|
|
@@ -163,9 +165,11 @@ export function Layout({ children }: LayoutProps) {
|
|
|
163
165
|
)}
|
|
164
166
|
<Sheet open={mobileSidebarOpen} onOpenChange={setMobileSidebarOpen}>
|
|
165
167
|
<SheetContent side="left" className="p-0 w-[260px]">
|
|
166
|
-
<SheetTitle className="sr-only">
|
|
168
|
+
<SheetTitle className="sr-only">
|
|
169
|
+
{t("sidebar.navigation")}
|
|
170
|
+
</SheetTitle>
|
|
167
171
|
<SheetDescription className="sr-only">
|
|
168
|
-
|
|
172
|
+
{t("sidebar.navigationDescription")}
|
|
169
173
|
</SheetDescription>
|
|
170
174
|
<Sidebar collapsed={false} collapsible={false} />
|
|
171
175
|
</SheetContent>
|
|
@@ -179,11 +183,11 @@ export function Layout({ children }: LayoutProps) {
|
|
|
179
183
|
chatViewTransition
|
|
180
184
|
storageKey="plans"
|
|
181
185
|
openOnChatRunning={chatHomeHandoffActive}
|
|
182
|
-
emptyStateText="
|
|
186
|
+
emptyStateText={t("agent.emptyState")}
|
|
183
187
|
suggestions={[
|
|
184
|
-
"
|
|
185
|
-
"
|
|
186
|
-
"
|
|
188
|
+
t("agent.suggestionShipped"),
|
|
189
|
+
t("agent.suggestionUi"),
|
|
190
|
+
t("agent.suggestionApi"),
|
|
187
191
|
]}
|
|
188
192
|
>
|
|
189
193
|
{pageContent}
|