@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
|
@@ -10,8 +10,10 @@ import {
|
|
|
10
10
|
configureTracking,
|
|
11
11
|
createAgentNativeQueryClient,
|
|
12
12
|
getBrowserTabId,
|
|
13
|
+
getLocaleInitScript,
|
|
13
14
|
getThemeInitScript,
|
|
14
15
|
useCommandMenuShortcut,
|
|
16
|
+
useT,
|
|
15
17
|
} from "@agent-native/core/client";
|
|
16
18
|
import { Toaster } from "@/components/ui/sonner";
|
|
17
19
|
import { IconSun, IconMoon } from "@tabler/icons-react";
|
|
@@ -19,6 +21,7 @@ import { Layout as AppLayout } from "@/components/layout/Layout";
|
|
|
19
21
|
import changelog from "../CHANGELOG.md?raw";
|
|
20
22
|
import type { LinksFunction } from "react-router";
|
|
21
23
|
import stylesheet from "./global.css?url";
|
|
24
|
+
import { i18nCatalog } from "./i18n";
|
|
22
25
|
|
|
23
26
|
configureTracking({
|
|
24
27
|
getDefaultProps: (_name, properties) => ({
|
|
@@ -32,6 +35,7 @@ export const links: LinksFunction = () => [
|
|
|
32
35
|
];
|
|
33
36
|
|
|
34
37
|
const THEME_INIT_SCRIPT = getThemeInitScript();
|
|
38
|
+
const LOCALE_INIT_SCRIPT = getLocaleInitScript();
|
|
35
39
|
|
|
36
40
|
export function Layout({ children }: { children: React.ReactNode }) {
|
|
37
41
|
return (
|
|
@@ -46,6 +50,11 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
|
|
46
50
|
suppressHydrationWarning
|
|
47
51
|
dangerouslySetInnerHTML={{ __html: THEME_INIT_SCRIPT }}
|
|
48
52
|
/>
|
|
53
|
+
<script
|
|
54
|
+
data-agent-native-locale-init
|
|
55
|
+
suppressHydrationWarning
|
|
56
|
+
dangerouslySetInnerHTML={{ __html: LOCALE_INIT_SCRIPT }}
|
|
57
|
+
/>
|
|
49
58
|
<link rel="manifest" href={appPath("/manifest.json")} />
|
|
50
59
|
<meta name="theme-color" content="#71717A" />
|
|
51
60
|
<meta name="mobile-web-app-capable" content="yes" />
|
|
@@ -87,6 +96,7 @@ function DbSyncSetup() {
|
|
|
87
96
|
|
|
88
97
|
function ThemeToggleItem() {
|
|
89
98
|
const { resolvedTheme, setTheme } = useTheme();
|
|
99
|
+
const t = useT();
|
|
90
100
|
const isDark = resolvedTheme === "dark";
|
|
91
101
|
return (
|
|
92
102
|
<CommandMenu.Item
|
|
@@ -94,32 +104,47 @@ function ThemeToggleItem() {
|
|
|
94
104
|
keywords={["theme", "dark", "light", "mode"]}
|
|
95
105
|
>
|
|
96
106
|
{isDark ? <IconSun size={16} /> : <IconMoon size={16} />}
|
|
97
|
-
|
|
107
|
+
{t("root.toggleTheme")}
|
|
98
108
|
</CommandMenu.Item>
|
|
99
109
|
);
|
|
100
110
|
}
|
|
101
111
|
|
|
112
|
+
function AssetsCommandMenu({
|
|
113
|
+
open,
|
|
114
|
+
onOpenChange,
|
|
115
|
+
}: {
|
|
116
|
+
open: boolean;
|
|
117
|
+
onOpenChange: (open: boolean) => void;
|
|
118
|
+
}) {
|
|
119
|
+
const t = useT();
|
|
120
|
+
return (
|
|
121
|
+
<CommandMenu
|
|
122
|
+
open={open}
|
|
123
|
+
onOpenChange={onOpenChange}
|
|
124
|
+
changelog={changelog}
|
|
125
|
+
changelogKey="assets"
|
|
126
|
+
>
|
|
127
|
+
<CommandMenu.Group heading={t("root.commandActions")}>
|
|
128
|
+
<CommandMenu.Item onSelect={() => {}}>
|
|
129
|
+
{t("root.commandSearch")}
|
|
130
|
+
</CommandMenu.Item>
|
|
131
|
+
</CommandMenu.Group>
|
|
132
|
+
<CommandMenu.Group heading={t("root.commandAppearance")}>
|
|
133
|
+
<ThemeToggleItem />
|
|
134
|
+
</CommandMenu.Group>
|
|
135
|
+
</CommandMenu>
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
102
139
|
export default function Root() {
|
|
103
140
|
const [queryClient] = useState(() => createAgentNativeQueryClient());
|
|
104
141
|
const [cmdkOpen, setCmdkOpen] = useState(false);
|
|
105
142
|
useCommandMenuShortcut(useCallback(() => setCmdkOpen(true), []));
|
|
106
143
|
return (
|
|
107
|
-
<AppProviders queryClient={queryClient}>
|
|
144
|
+
<AppProviders queryClient={queryClient} i18n={{ catalog: i18nCatalog }}>
|
|
108
145
|
<DbSyncSetup />
|
|
109
146
|
<Toaster richColors position="bottom-left" />
|
|
110
|
-
<
|
|
111
|
-
open={cmdkOpen}
|
|
112
|
-
onOpenChange={setCmdkOpen}
|
|
113
|
-
changelog={changelog}
|
|
114
|
-
changelogKey="assets"
|
|
115
|
-
>
|
|
116
|
-
<CommandMenu.Group heading="Actions">
|
|
117
|
-
<CommandMenu.Item onSelect={() => {}}>Search</CommandMenu.Item>
|
|
118
|
-
</CommandMenu.Group>
|
|
119
|
-
<CommandMenu.Group heading="Appearance">
|
|
120
|
-
<ThemeToggleItem />
|
|
121
|
-
</CommandMenu.Group>
|
|
122
|
-
</CommandMenu>
|
|
147
|
+
<AssetsCommandMenu open={cmdkOpen} onOpenChange={setCmdkOpen} />
|
|
123
148
|
<AppLayout>
|
|
124
149
|
<Outlet />
|
|
125
150
|
</AppLayout>
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
markAgentChatHomeHandoff,
|
|
7
7
|
readClientAppState,
|
|
8
8
|
sendToAgentChat,
|
|
9
|
+
useT,
|
|
9
10
|
writeClientAppState,
|
|
10
11
|
} from "@agent-native/core/client";
|
|
11
12
|
import { IconPhoto, IconSparkles, IconVideo } from "@tabler/icons-react";
|
|
@@ -69,6 +70,7 @@ function chatThreadPath(threadId: string | null) {
|
|
|
69
70
|
export default function CreatePage() {
|
|
70
71
|
const { threadId } = useParams();
|
|
71
72
|
const navigate = useNavigate();
|
|
73
|
+
const t = useT();
|
|
72
74
|
const [imageModel, setImageModel] = useState<string>(DEFAULT_IMAGE_MODEL);
|
|
73
75
|
|
|
74
76
|
useEffect(() => {
|
|
@@ -133,26 +135,23 @@ export default function CreatePage() {
|
|
|
133
135
|
label: option.label,
|
|
134
136
|
})),
|
|
135
137
|
onChange: handleImageModelChange,
|
|
136
|
-
label: "
|
|
138
|
+
label: t("create.imageModel"),
|
|
137
139
|
}}
|
|
138
140
|
showHeader={false}
|
|
139
141
|
showTabBar={false}
|
|
140
142
|
dynamicSuggestions={false}
|
|
141
143
|
suggestions={[]}
|
|
142
|
-
emptyStateText="
|
|
144
|
+
emptyStateText={t("create.emptyState")}
|
|
143
145
|
emptyStateDisplay="hidden"
|
|
144
146
|
centerComposerWhenEmpty
|
|
145
147
|
composerLayoutVariant="hero"
|
|
146
|
-
composerPlaceholder="
|
|
148
|
+
composerPlaceholder={t("create.composerPlaceholder")}
|
|
147
149
|
composerSlot={
|
|
148
150
|
<div className="assets-create-chat-intro">
|
|
149
|
-
<h1>
|
|
150
|
-
<p>
|
|
151
|
-
Start with a hero image, product reveal, reference edit, or a
|
|
152
|
-
direction you want to explore.
|
|
153
|
-
</p>
|
|
151
|
+
<h1>{t("create.heroTitle")}</h1>
|
|
152
|
+
<p>{t("create.heroDescription")}</p>
|
|
154
153
|
<div className="assets-create-chat-pill-row">
|
|
155
|
-
{CHAT_STARTERS.map(({ key, Icon,
|
|
154
|
+
{CHAT_STARTERS.map(({ key, Icon, prompt }) => (
|
|
156
155
|
<button
|
|
157
156
|
key={key}
|
|
158
157
|
type="button"
|
|
@@ -165,7 +164,7 @@ export default function CreatePage() {
|
|
|
165
164
|
}
|
|
166
165
|
>
|
|
167
166
|
<Icon className="size-3.5" />
|
|
168
|
-
{
|
|
167
|
+
{t(`create.starters.${key}`)}
|
|
169
168
|
</button>
|
|
170
169
|
))}
|
|
171
170
|
</div>
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ChangelogSettingsCard,
|
|
3
|
+
LanguagePicker,
|
|
3
4
|
agentNativePath,
|
|
5
|
+
openAgentSettings,
|
|
4
6
|
useActionQuery,
|
|
5
7
|
useBuilderConnectFlow,
|
|
6
8
|
useBuilderStatus,
|
|
9
|
+
useT,
|
|
7
10
|
} from "@agent-native/core/client";
|
|
8
11
|
import changelog from "../../CHANGELOG.md?raw";
|
|
9
12
|
import {
|
|
@@ -67,14 +70,15 @@ type ImageGenerationConfig = {
|
|
|
67
70
|
type FormOnboardingMethod = Extract<OnboardingMethod, { kind: "form" }>;
|
|
68
71
|
|
|
69
72
|
export default function SettingsPage() {
|
|
73
|
+
const t = useT();
|
|
70
74
|
const { data } = useActionQuery("list-libraries", { compact: true }) as {
|
|
71
75
|
data?: { count?: number };
|
|
72
76
|
};
|
|
73
77
|
|
|
74
78
|
return (
|
|
75
79
|
<PageShell
|
|
76
|
-
title="
|
|
77
|
-
description="
|
|
80
|
+
title={t("settings.title")}
|
|
81
|
+
description={t("settings.description")}
|
|
78
82
|
className="max-w-4xl space-y-6"
|
|
79
83
|
>
|
|
80
84
|
<div className="max-w-2xl">
|
|
@@ -82,14 +86,41 @@ export default function SettingsPage() {
|
|
|
82
86
|
</div>
|
|
83
87
|
|
|
84
88
|
<div className="max-w-2xl">
|
|
85
|
-
<h2 className="text-lg font-semibold tracking-tight">
|
|
89
|
+
<h2 className="text-lg font-semibold tracking-tight">
|
|
90
|
+
{t("settings.connections")}
|
|
91
|
+
</h2>
|
|
86
92
|
<p className="mt-1 text-sm leading-6 text-muted-foreground">
|
|
87
|
-
|
|
88
|
-
Builder is the simplest path; manual keys stay available when you need
|
|
89
|
-
them.
|
|
93
|
+
{t("settings.connectionsDescription")}
|
|
90
94
|
</p>
|
|
91
95
|
</div>
|
|
92
96
|
|
|
97
|
+
<Card className="max-w-2xl">
|
|
98
|
+
<CardHeader>
|
|
99
|
+
<CardTitle className="text-base">
|
|
100
|
+
{t("settings.languageTitle")}
|
|
101
|
+
</CardTitle>
|
|
102
|
+
<CardDescription>{t("settings.languageDescription")}</CardDescription>
|
|
103
|
+
</CardHeader>
|
|
104
|
+
<CardContent className="max-w-xs space-y-1.5">
|
|
105
|
+
<Label>{t("settings.languageLabel")}</Label>
|
|
106
|
+
<LanguagePicker label={t("settings.languageLabel")} />
|
|
107
|
+
</CardContent>
|
|
108
|
+
</Card>
|
|
109
|
+
|
|
110
|
+
<Card className="max-w-2xl">
|
|
111
|
+
<CardHeader>
|
|
112
|
+
<CardTitle className="text-base">
|
|
113
|
+
{t("settings.agentTitle")}
|
|
114
|
+
</CardTitle>
|
|
115
|
+
<CardDescription>{t("settings.agentDescription")}</CardDescription>
|
|
116
|
+
</CardHeader>
|
|
117
|
+
<CardContent>
|
|
118
|
+
<Button variant="outline" onClick={() => openAgentSettings()}>
|
|
119
|
+
{t("settings.openAgentSettings")}
|
|
120
|
+
</Button>
|
|
121
|
+
</CardContent>
|
|
122
|
+
</Card>
|
|
123
|
+
|
|
93
124
|
<section id="asset-generation-setup" className="scroll-mt-4">
|
|
94
125
|
<AssetsSetupCard libraryCount={data?.count ?? 0} />
|
|
95
126
|
</section>
|
|
@@ -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
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
navigateWithAgentChatViewTransition,
|
|
7
7
|
useAgentChatHomeHandoff,
|
|
8
8
|
useAgentChatHomeHandoffLinks,
|
|
9
|
+
useT,
|
|
9
10
|
} from "@agent-native/core/client";
|
|
10
11
|
import { IconMenu2 } from "@tabler/icons-react";
|
|
11
12
|
import { Sidebar } from "@/components/layout/Sidebar";
|
|
@@ -21,6 +22,7 @@ import { Button } from "@/components/ui/button";
|
|
|
21
22
|
export function Layout({ children }: { children: React.ReactNode }) {
|
|
22
23
|
const location = useLocation();
|
|
23
24
|
const navigate = useNavigate();
|
|
25
|
+
const t = useT();
|
|
24
26
|
const [mobileSidebarOpen, setMobileSidebarOpen] = useState(false);
|
|
25
27
|
const isAskRoute = location.pathname === "/";
|
|
26
28
|
const chatHomeHandoffActive = useAgentChatHomeHandoff({
|
|
@@ -41,9 +43,11 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
|
|
41
43
|
</div>
|
|
42
44
|
<Sheet open={mobileSidebarOpen} onOpenChange={setMobileSidebarOpen}>
|
|
43
45
|
<SheetContent side="left" className="w-[min(18rem,88vw)] p-0">
|
|
44
|
-
<SheetTitle className="sr-only">
|
|
46
|
+
<SheetTitle className="sr-only">
|
|
47
|
+
{t("navigation.brainNavigation")}
|
|
48
|
+
</SheetTitle>
|
|
45
49
|
<SheetDescription className="sr-only">
|
|
46
|
-
|
|
50
|
+
{t("navigation.brainNavigationDescription")}
|
|
47
51
|
</SheetDescription>
|
|
48
52
|
<Sidebar />
|
|
49
53
|
</SheetContent>
|
|
@@ -59,11 +63,11 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
|
|
59
63
|
variant="ghost"
|
|
60
64
|
size="icon"
|
|
61
65
|
onClick={() => setMobileSidebarOpen(true)}
|
|
62
|
-
aria-label="
|
|
66
|
+
aria-label={t("navigation.openNavigation")}
|
|
63
67
|
>
|
|
64
68
|
<IconMenu2 className="size-4" />
|
|
65
69
|
</Button>
|
|
66
|
-
<span className="text-sm font-semibold">
|
|
70
|
+
<span className="text-sm font-semibold">{t("navigation.brand")}</span>
|
|
67
71
|
</div>
|
|
68
72
|
<main className="min-w-0 flex-1 overflow-y-auto overscroll-contain">
|
|
69
73
|
{children}
|
|
@@ -95,11 +99,11 @@ export function Layout({ children }: { children: React.ReactNode }) {
|
|
|
95
99
|
browserTabId={TAB_ID}
|
|
96
100
|
openOnChatRunning={chatHomeHandoffActive}
|
|
97
101
|
onFullscreenRequest={openAskAgentFullscreen}
|
|
98
|
-
emptyStateText="
|
|
102
|
+
emptyStateText={t("chat.emptyState")}
|
|
99
103
|
suggestions={[
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
104
|
+
t("chat.suggestionSecurity"),
|
|
105
|
+
t("chat.suggestionStaleFacts"),
|
|
106
|
+
t("chat.suggestionSyncProblems"),
|
|
103
107
|
]}
|
|
104
108
|
>
|
|
105
109
|
{contentFrame}
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
FeedbackButton,
|
|
15
15
|
navigateWithAgentChatViewTransition,
|
|
16
16
|
useChatThreads,
|
|
17
|
+
useT,
|
|
17
18
|
type ChatThreadSummary,
|
|
18
19
|
} from "@agent-native/core/client";
|
|
19
20
|
import { ExtensionsSidebarSection } from "@agent-native/core/client/extensions";
|
|
@@ -80,6 +81,7 @@ function persistedActiveThreadId() {
|
|
|
80
81
|
|
|
81
82
|
function BrainChatsSection() {
|
|
82
83
|
const navigate = useNavigate();
|
|
84
|
+
const t = useT();
|
|
83
85
|
const {
|
|
84
86
|
threads,
|
|
85
87
|
activeThreadId,
|
|
@@ -156,7 +158,7 @@ function BrainChatsSection() {
|
|
|
156
158
|
threadId === activeThreadId || threadId === persistedActiveThreadId();
|
|
157
159
|
const archived = await archiveThread(threadId);
|
|
158
160
|
if (!archived) {
|
|
159
|
-
toast.error("
|
|
161
|
+
toast.error(t("chat.archiveFailed"));
|
|
160
162
|
return;
|
|
161
163
|
}
|
|
162
164
|
if (wasActive) {
|
|
@@ -186,7 +188,7 @@ function BrainChatsSection() {
|
|
|
186
188
|
setRenameDraft("");
|
|
187
189
|
if (title) {
|
|
188
190
|
const renamed = await renameThread(threadId, title);
|
|
189
|
-
if (!renamed) toast.error("
|
|
191
|
+
if (!renamed) toast.error(t("chat.renameFailed"));
|
|
190
192
|
}
|
|
191
193
|
committingRenameRef.current = false;
|
|
192
194
|
}
|
|
@@ -200,7 +202,7 @@ function BrainChatsSection() {
|
|
|
200
202
|
<div className="mt-2 border-l border-sidebar-border/70 pl-3">
|
|
201
203
|
<div className="mb-1 flex h-7 items-center gap-2 pr-1">
|
|
202
204
|
<div className="min-w-0 flex-1 text-xs font-medium text-sidebar-foreground/70">
|
|
203
|
-
|
|
205
|
+
{t("chat.chats")}
|
|
204
206
|
</div>
|
|
205
207
|
<Tooltip>
|
|
206
208
|
<TooltipTrigger asChild>
|
|
@@ -208,12 +210,12 @@ function BrainChatsSection() {
|
|
|
208
210
|
type="button"
|
|
209
211
|
onClick={handleNewChat}
|
|
210
212
|
className="flex size-6 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/65 transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"
|
|
211
|
-
aria-label="
|
|
213
|
+
aria-label={t("chat.newBrainChat")}
|
|
212
214
|
>
|
|
213
215
|
<IconPlus className="size-3.5" />
|
|
214
216
|
</button>
|
|
215
217
|
</TooltipTrigger>
|
|
216
|
-
<TooltipContent>
|
|
218
|
+
<TooltipContent>{t("chat.newChat")}</TooltipContent>
|
|
217
219
|
</Tooltip>
|
|
218
220
|
</div>
|
|
219
221
|
<div className="grid gap-0.5">
|
|
@@ -247,7 +249,9 @@ function BrainChatsSection() {
|
|
|
247
249
|
}
|
|
248
250
|
}}
|
|
249
251
|
maxLength={160}
|
|
250
|
-
aria-label={
|
|
252
|
+
aria-label={t("chat.renameThread", {
|
|
253
|
+
title: threadTitle(thread),
|
|
254
|
+
})}
|
|
251
255
|
className="h-6 min-w-0 rounded-sm border-sidebar-border bg-background px-1.5 text-xs"
|
|
252
256
|
/>
|
|
253
257
|
</form>
|
|
@@ -270,7 +274,9 @@ function BrainChatsSection() {
|
|
|
270
274
|
<DropdownMenuTrigger asChild>
|
|
271
275
|
<button
|
|
272
276
|
type="button"
|
|
273
|
-
aria-label={
|
|
277
|
+
aria-label={t("chat.optionsFor", {
|
|
278
|
+
title: threadTitle(thread),
|
|
279
|
+
})}
|
|
274
280
|
className="absolute right-1 flex size-6 items-center justify-center rounded-md text-sidebar-foreground/65 opacity-0 transition-opacity hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring group-hover:opacity-100 group-focus-within:opacity-100 data-[state=open]:opacity-100"
|
|
275
281
|
>
|
|
276
282
|
<IconDots className="size-4" />
|
|
@@ -285,7 +291,7 @@ function BrainChatsSection() {
|
|
|
285
291
|
onSelect={() => startRenameThread(thread)}
|
|
286
292
|
>
|
|
287
293
|
<IconEdit className="size-4" />
|
|
288
|
-
|
|
294
|
+
{t("chat.renameChat")}
|
|
289
295
|
</DropdownMenuItem>
|
|
290
296
|
<DropdownMenuItem
|
|
291
297
|
onSelect={() =>
|
|
@@ -293,14 +299,16 @@ function BrainChatsSection() {
|
|
|
293
299
|
}
|
|
294
300
|
>
|
|
295
301
|
<IconPin className="size-4" />
|
|
296
|
-
{thread.pinnedAt
|
|
302
|
+
{thread.pinnedAt
|
|
303
|
+
? t("chat.unpinChat")
|
|
304
|
+
: t("chat.pinChat")}
|
|
297
305
|
</DropdownMenuItem>
|
|
298
306
|
<DropdownMenuItem
|
|
299
307
|
variant="destructive"
|
|
300
308
|
onSelect={() => void handleArchiveThread(thread.id)}
|
|
301
309
|
>
|
|
302
310
|
<IconArchive className="size-4" />
|
|
303
|
-
|
|
311
|
+
{t("chat.archiveChat")}
|
|
304
312
|
</DropdownMenuItem>
|
|
305
313
|
</DropdownMenuContent>
|
|
306
314
|
</DropdownMenu>
|
|
@@ -318,6 +326,7 @@ function BrainChatsSection() {
|
|
|
318
326
|
export function Sidebar() {
|
|
319
327
|
const location = useLocation();
|
|
320
328
|
const navigate = useNavigate();
|
|
329
|
+
const t = useT();
|
|
321
330
|
const isAskRoute = location.pathname === "/";
|
|
322
331
|
const navClass = ({ isActive }: { isActive: boolean }) =>
|
|
323
332
|
cn(
|
|
@@ -348,7 +357,7 @@ export function Sidebar() {
|
|
|
348
357
|
/>
|
|
349
358
|
<div className="min-w-0">
|
|
350
359
|
<p className="truncate text-sm font-semibold text-sidebar-accent-foreground">
|
|
351
|
-
|
|
360
|
+
{t("navigation.brand")}
|
|
352
361
|
</p>
|
|
353
362
|
</div>
|
|
354
363
|
</Link>
|
|
@@ -379,7 +388,9 @@ export function Sidebar() {
|
|
|
379
388
|
className={navClass}
|
|
380
389
|
>
|
|
381
390
|
<Icon className="size-4 shrink-0" />
|
|
382
|
-
<span className="truncate">
|
|
391
|
+
<span className="truncate">
|
|
392
|
+
{t(`navigation.${item.view}`)}
|
|
393
|
+
</span>
|
|
383
394
|
</NavLink>
|
|
384
395
|
{item.view === "ask" && isAskRoute ? (
|
|
385
396
|
<BrainChatsSection />
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import enUS from "./en-US";
|
|
2
|
+
import type { AgentNativeI18nCatalog } from "@agent-native/core/client";
|
|
3
|
+
|
|
4
|
+
export const i18nCatalog = {
|
|
5
|
+
sourceLocale: "en-US",
|
|
6
|
+
messages: enUS,
|
|
7
|
+
loadMessages: async (locale) => {
|
|
8
|
+
switch (locale) {
|
|
9
|
+
case "zh-CN":
|
|
10
|
+
return (await import("./zh-CN")).default;
|
|
11
|
+
case "es-ES":
|
|
12
|
+
return (await import("./es-ES")).default;
|
|
13
|
+
case "fr-FR":
|
|
14
|
+
return (await import("./fr-FR")).default;
|
|
15
|
+
case "de-DE":
|
|
16
|
+
return (await import("./de-DE")).default;
|
|
17
|
+
case "ja-JP":
|
|
18
|
+
return (await import("./ja-JP")).default;
|
|
19
|
+
case "ko-KR":
|
|
20
|
+
return (await import("./ko-KR")).default;
|
|
21
|
+
case "pt-BR":
|
|
22
|
+
return (await import("./pt-BR")).default;
|
|
23
|
+
case "hi-IN":
|
|
24
|
+
return (await import("./hi-IN")).default;
|
|
25
|
+
case "ar-SA":
|
|
26
|
+
return (await import("./ar-SA")).default;
|
|
27
|
+
default:
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
} satisfies AgentNativeI18nCatalog;
|