@agent-native/core 0.119.3 → 0.119.5
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 +21 -0
- package/corpus/core/package.json +3 -3
- package/corpus/core/src/agent/engine/index.ts +2 -0
- package/corpus/core/src/agent/engine/registry.ts +95 -2
- package/corpus/core/src/agent/production-agent.ts +107 -125
- package/corpus/core/src/agent/run-manager.ts +45 -2
- package/corpus/core/src/agent/thread-data-builder.ts +85 -8
- package/corpus/core/src/client/AssistantChat.tsx +37 -9
- package/corpus/core/src/client/chat/message-components.tsx +9 -1
- package/corpus/core/src/client/chat/repo-helpers.ts +77 -0
- package/corpus/core/src/client/chat/tool-call-display.tsx +51 -15
- package/corpus/core/src/scripts/agent-engines/list-agent-engines.ts +8 -0
- package/corpus/core/src/scripts/agent-engines/manage-agent-engine.ts +5 -1
- package/corpus/core/src/scripts/agent-engines/set-agent-engine.ts +9 -1
- package/corpus/core/src/server/agent-chat/framework-prompts.ts +3 -1
- package/corpus/core/src/server/agent-chat/plugin-options.ts +9 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +12 -3
- package/corpus/core/src/templates/chat/.agents/skills/actions/SKILL.md +512 -0
- package/corpus/core/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +189 -0
- package/corpus/core/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +115 -0
- package/corpus/core/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +177 -0
- package/corpus/core/src/templates/chat/.agents/skills/capture-learnings/SKILL.md +89 -0
- package/corpus/core/src/templates/chat/.agents/skills/create-skill/SKILL.md +221 -0
- package/corpus/core/src/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +220 -0
- package/corpus/core/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +263 -0
- package/corpus/core/src/templates/chat/.agents/skills/feature-flags/SKILL.md +169 -0
- package/corpus/core/src/templates/chat/.agents/skills/frontend-design/SKILL.md +160 -0
- package/corpus/core/src/templates/chat/.agents/skills/real-time-sync/SKILL.md +232 -0
- package/corpus/core/src/templates/chat/.agents/skills/security/SKILL.md +280 -0
- package/corpus/core/src/templates/chat/.agents/skills/self-modifying-code/SKILL.md +118 -0
- package/corpus/core/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +119 -0
- package/corpus/core/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +100 -0
- package/corpus/core/src/templates/chat/.env.example +5 -0
- package/corpus/core/src/templates/chat/.ignore +0 -0
- package/corpus/core/src/templates/chat/.oxfmtrc.json +8 -0
- package/corpus/core/src/templates/chat/AGENTS.md +69 -0
- package/corpus/core/src/templates/chat/CHANGELOG.md +10 -0
- package/corpus/core/src/templates/chat/DEVELOPING.md +185 -0
- package/corpus/core/src/templates/chat/README.md +32 -0
- package/corpus/core/src/templates/chat/_gitignore +43 -0
- package/corpus/core/src/templates/chat/actions/hello.ts +13 -0
- package/corpus/core/src/templates/chat/actions/navigate.ts +41 -0
- package/corpus/core/src/templates/chat/actions/run.ts +2 -0
- package/corpus/core/src/templates/chat/actions/view-screen.ts +31 -0
- package/corpus/core/src/templates/chat/app/components/layout/Header.tsx +60 -0
- package/corpus/core/src/templates/chat/app/components/layout/Layout.tsx +185 -0
- package/corpus/core/src/templates/chat/app/components/layout/Sidebar.tsx +450 -0
- package/corpus/core/src/templates/chat/app/components/ui/button.tsx +1 -0
- package/corpus/core/src/templates/chat/app/components/ui/card.tsx +1 -0
- package/corpus/core/src/templates/chat/app/components/ui/dropdown-menu.tsx +1 -0
- package/corpus/core/src/templates/chat/app/components/ui/input.tsx +1 -0
- package/corpus/core/src/templates/chat/app/components/ui/label.tsx +1 -0
- package/corpus/core/src/templates/chat/app/components/ui/sheet.tsx +1 -0
- package/corpus/core/src/templates/chat/app/components/ui/toolkit-provider.tsx +17 -0
- package/corpus/core/src/templates/chat/app/components/ui/tooltip.tsx +1 -0
- package/corpus/core/src/templates/chat/app/design-system.ts +3 -0
- package/corpus/core/src/templates/chat/app/entry.client.tsx +19 -0
- package/corpus/core/src/templates/chat/app/entry.server.tsx +10 -0
- package/corpus/core/src/templates/chat/app/global.css +93 -0
- package/corpus/core/src/templates/chat/app/hooks/use-navigation-state.ts +93 -0
- package/corpus/core/src/templates/chat/app/i18n/ar-SA.ts +68 -0
- package/corpus/core/src/templates/chat/app/i18n/de-DE.ts +71 -0
- package/corpus/core/src/templates/chat/app/i18n/en-US.ts +70 -0
- package/corpus/core/src/templates/chat/app/i18n/es-ES.ts +71 -0
- package/corpus/core/src/templates/chat/app/i18n/fr-FR.ts +71 -0
- package/corpus/core/src/templates/chat/app/i18n/hi-IN.ts +69 -0
- package/corpus/core/src/templates/chat/app/i18n/index.ts +34 -0
- package/corpus/core/src/templates/chat/app/i18n/ja-JP.ts +70 -0
- package/corpus/core/src/templates/chat/app/i18n/ko-KR.ts +70 -0
- package/corpus/core/src/templates/chat/app/i18n/pt-BR.ts +71 -0
- package/corpus/core/src/templates/chat/app/i18n/zh-CN.ts +66 -0
- package/corpus/core/src/templates/chat/app/i18n/zh-TW.ts +66 -0
- package/corpus/core/src/templates/chat/app/i18n-data.ts +556 -0
- package/corpus/core/src/templates/chat/app/lib/agent-page.tsx +49 -0
- package/corpus/core/src/templates/chat/app/lib/app-config.ts +11 -0
- package/corpus/core/src/templates/chat/app/lib/tab-id.ts +1 -0
- package/corpus/core/src/templates/chat/app/lib/utils.ts +1 -0
- package/corpus/core/src/templates/chat/app/root.tsx +173 -0
- package/corpus/core/src/templates/chat/app/routes/_index.tsx +94 -0
- package/corpus/core/src/templates/chat/app/routes/agent.tsx +24 -0
- package/corpus/core/src/templates/chat/app/routes/chat.$threadId.tsx +1 -0
- package/corpus/core/src/templates/chat/app/routes/database.tsx +17 -0
- package/corpus/core/src/templates/chat/app/routes/extensions.$id.$slug.tsx +2 -0
- package/corpus/core/src/templates/chat/app/routes/extensions.$id.tsx +11 -0
- package/corpus/core/src/templates/chat/app/routes/extensions._index.tsx +11 -0
- package/corpus/core/src/templates/chat/app/routes/extensions.tsx +5 -0
- package/corpus/core/src/templates/chat/app/routes/observability.tsx +19 -0
- package/corpus/core/src/templates/chat/app/routes/settings.tsx +89 -0
- package/corpus/core/src/templates/chat/app/routes/team.tsx +11 -0
- package/corpus/core/src/templates/chat/app/routes.ts +4 -0
- package/corpus/core/src/templates/chat/app/vite-env.d.ts +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-14-chat-opens-reliably-on-hosted-deployments-instead-of-failing.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-15-chat-navigation-focuses-on-chat-and-agent.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-22-compact-sidebar-footer.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-22-manage-agent-navigation-now-uses-the-connected-nodes-icon.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-22-recent-chats-are-easier-to-scan-and-expand.md +6 -0
- package/corpus/core/src/templates/chat/changelog/2026-07-23-full-page-chat-is-better-centered-with-quieter-chat-history-.md +6 -0
- package/corpus/core/src/templates/chat/components.json +20 -0
- package/corpus/core/src/templates/chat/learnings.defaults.md +5 -0
- package/corpus/core/src/templates/chat/netlify.toml +10 -0
- package/corpus/core/src/templates/chat/package.json +92 -0
- package/corpus/core/src/templates/chat/public/agent-native-icon-dark.svg +10 -0
- package/corpus/core/src/templates/chat/public/agent-native-icon-light.svg +10 -0
- package/corpus/core/src/templates/chat/public/agent-native-logo-dark.svg +21 -0
- package/corpus/core/src/templates/chat/public/agent-native-logo-light.svg +21 -0
- package/corpus/core/src/templates/chat/public/favicon.svg +1 -0
- package/corpus/core/src/templates/chat/public/icon-180.svg +1 -0
- package/corpus/core/src/templates/chat/public/icon-192.svg +1 -0
- package/corpus/core/src/templates/chat/public/icon-512.svg +1 -0
- package/corpus/core/src/templates/chat/public/manifest.json +21 -0
- package/corpus/core/src/templates/chat/react-router.config.ts +7 -0
- package/corpus/core/src/templates/chat/server/middleware/auth.ts +15 -0
- package/corpus/core/src/templates/chat/server/plugins/agent-chat.ts +21 -0
- package/corpus/core/src/templates/chat/server/plugins/auth.ts +17 -0
- package/corpus/core/src/templates/chat/server/routes/[...page].get.ts +5 -0
- package/corpus/core/src/templates/chat/ssr-entry.ts +15 -0
- package/corpus/core/src/templates/chat/tsconfig.json +21 -0
- package/corpus/core/src/templates/chat/vite.config.ts +19 -0
- package/corpus/templates/analytics/AGENTS.md +19 -11
- package/corpus/templates/analytics/actions/list-data-dictionary.ts +3 -1
- package/corpus/templates/analytics/actions/save-data-dictionary-entry.ts +14 -0
- package/corpus/templates/analytics/actions/search-analytics-query-catalog.ts +41 -0
- package/corpus/templates/analytics/app/components/dashboard/DashboardPanelSkeleton.tsx +13 -0
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +12 -11
- package/corpus/templates/analytics/app/pages/adhoc/DashboardSkeleton.tsx +3 -3
- package/corpus/templates/analytics/changelog/2026-07-23-dashboard-chart-loading-placeholders-are-easier-to-see-in-da.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-23-routine-analytics-lookups-reuse-existing-query-definitions.md +6 -0
- package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +1 -12
- package/corpus/templates/analytics/server/lib/analytics-query-catalog.ts +405 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +11 -16
- package/corpus/templates/content/changelog/2026-07-23-database-toolbar-sort-and-filter-controls-open-reliably.md +6 -0
- package/corpus/templates/forms/app/lib/public-form-link.ts +14 -0
- package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +6 -14
- package/corpus/templates/forms/changelog/2026-07-23-published-form-links-can-be-copied-without-being-asked-to-re.md +6 -0
- package/corpus/templates/mail/changelog/2026-07-23-scheduled-emails-now-send-only-once-when-multiple-requests-r.md +6 -0
- package/corpus/templates/mail/server/lib/jobs.ts +13 -4
- package/corpus/templates/mail/server/plugins/mail-jobs.ts +1 -1
- package/corpus/templates/slides/actions/patch-deck.ts +2 -1
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +7 -18
- package/corpus/templates/slides/app/lib/agent-visible-message.ts +28 -0
- package/corpus/templates/slides/app/pages/Index.tsx +6 -34
- package/corpus/templates/slides/changelog/2026-07-23-full-prompts-stay-visible-in-chat-when-creating-decks-or-add.md +6 -0
- package/corpus/templates/slides/changelog/2026-07-23-opening-or-refining-a-deck-no-longer-crashes-with-a-blank-er.md +6 -0
- package/corpus/templates/slides/shared/aspect-ratios.ts +4 -1
- package/corpus/templates/tasks/.oxfmtrc.json +8 -0
- package/corpus/templates/tasks/AGENTS.md +34 -41
- package/corpus/templates/tasks/README.md +13 -6
- package/corpus/templates/tasks/actions/bulk-delete-inbox-items.ts +10 -8
- package/corpus/templates/tasks/actions/bulk-delete-tasks.ts +10 -8
- package/corpus/templates/tasks/actions/bulk-mark-inbox-items-ready.ts +1 -1
- package/corpus/templates/tasks/actions/bulk-update-tasks.ts +12 -10
- package/corpus/templates/tasks/actions/create-inbox-item.ts +7 -4
- package/corpus/templates/tasks/actions/create-task.ts +2 -1
- package/corpus/templates/tasks/actions/delete-inbox-item.ts +6 -4
- package/corpus/templates/tasks/actions/delete-task.ts +1 -1
- package/corpus/templates/tasks/actions/list-inbox-items.ts +4 -2
- package/corpus/templates/tasks/actions/list-visible-task-fields.ts +3 -1
- package/corpus/templates/tasks/actions/mark-inbox-item-ready.ts +6 -4
- package/corpus/templates/tasks/actions/navigate.ts +16 -14
- package/corpus/templates/tasks/actions/reorder-inbox-items.ts +9 -7
- package/corpus/templates/tasks/actions/update-inbox-item.ts +6 -4
- package/corpus/templates/tasks/actions/update-task.ts +12 -9
- package/corpus/templates/tasks/actions/update-visible-task-fields.ts +10 -8
- package/corpus/templates/tasks/actions/view-screen.ts +1 -1
- package/corpus/templates/tasks/app/components/tasks/fields/TaskFieldsSidebar.tsx +15 -0
- package/corpus/templates/tasks/changelog/2026-07-23-task-detail-extensions.md +6 -0
- package/corpus/templates/tasks/drizzle.config.ts +3 -0
- package/corpus/templates/tasks/package.json +4 -1
- package/corpus/templates/tasks/server/db/schema.ts +0 -10
- package/corpus/templates/tasks/server/db/test-tasks-table.ts +0 -5
- package/corpus/templates/tasks/server/plugins/agent-chat.ts +1 -1
- package/corpus/templates/tasks/server/plugins/db.ts +43 -10
- package/corpus/templates/tasks/server/user-config/store.ts +42 -81
- package/corpus/templates/tasks/tsconfig.json +1 -2
- package/corpus/templates/tasks/vitest.config.ts +10 -1
- package/corpus/toolkit/CHANGELOG.md +13 -0
- package/corpus/toolkit/package.json +1 -1
- package/corpus/toolkit/src/editor/SharedRichEditor.tsx +23 -2
- package/corpus/toolkit/src/editor/SlashCommandMenu.tsx +68 -2
- package/corpus/toolkit/src/editor/index.ts +1 -0
- package/corpus/toolkit/src/editor.css +75 -0
- package/corpus/toolkit/src/ui/button.tsx +3 -2
- package/dist/agent/engine/index.d.ts +1 -1
- package/dist/agent/engine/index.d.ts.map +1 -1
- package/dist/agent/engine/index.js +1 -1
- package/dist/agent/engine/index.js.map +1 -1
- package/dist/agent/engine/registry.d.ts +32 -1
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +75 -3
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +96 -115
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/run-manager.d.ts +9 -1
- package/dist/agent/run-manager.d.ts.map +1 -1
- package/dist/agent/run-manager.js +26 -0
- package/dist/agent/run-manager.js.map +1 -1
- package/dist/agent/thread-data-builder.d.ts +2 -0
- package/dist/agent/thread-data-builder.d.ts.map +1 -1
- package/dist/agent/thread-data-builder.js +69 -9
- package/dist/agent/thread-data-builder.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +32 -10
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/chat/message-components.d.ts +2 -1
- package/dist/client/chat/message-components.d.ts.map +1 -1
- package/dist/client/chat/message-components.js +9 -3
- package/dist/client/chat/message-components.js.map +1 -1
- package/dist/client/chat/repo-helpers.d.ts +4 -0
- package/dist/client/chat/repo-helpers.d.ts.map +1 -1
- package/dist/client/chat/repo-helpers.js +61 -0
- package/dist/client/chat/repo-helpers.js.map +1 -1
- package/dist/client/chat/tool-call-display.d.ts +2 -1
- package/dist/client/chat/tool-call-display.d.ts.map +1 -1
- package/dist/client/chat/tool-call-display.js +10 -9
- package/dist/client/chat/tool-call-display.js.map +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +5 -5
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +7 -7
- package/dist/provider-api/actions/provider-api.d.ts +7 -7
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/scripts/agent-engines/list-agent-engines.d.ts.map +1 -1
- package/dist/scripts/agent-engines/list-agent-engines.js +8 -2
- package/dist/scripts/agent-engines/list-agent-engines.js.map +1 -1
- package/dist/scripts/agent-engines/manage-agent-engine.d.ts.map +1 -1
- package/dist/scripts/agent-engines/manage-agent-engine.js +5 -2
- package/dist/scripts/agent-engines/manage-agent-engine.js.map +1 -1
- package/dist/scripts/agent-engines/set-agent-engine.d.ts.map +1 -1
- package/dist/scripts/agent-engines/set-agent-engine.js +9 -2
- package/dist/scripts/agent-engines/set-agent-engine.js.map +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-chat/framework-prompts.d.ts.map +1 -1
- package/dist/server/agent-chat/framework-prompts.js +3 -1
- package/dist/server/agent-chat/framework-prompts.js.map +1 -1
- package/dist/server/agent-chat/plugin-options.d.ts +9 -0
- package/dist/server/agent-chat/plugin-options.d.ts.map +1 -1
- package/dist/server/agent-chat/plugin-options.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +11 -2
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/package.json +4 -4
- package/src/agent/engine/index.ts +2 -0
- package/src/agent/engine/registry.ts +95 -2
- package/src/agent/production-agent.ts +107 -125
- package/src/agent/run-manager.ts +45 -2
- package/src/agent/thread-data-builder.ts +85 -8
- package/src/client/AssistantChat.tsx +37 -9
- package/src/client/chat/message-components.tsx +9 -1
- package/src/client/chat/repo-helpers.ts +77 -0
- package/src/client/chat/tool-call-display.tsx +51 -15
- package/src/scripts/agent-engines/list-agent-engines.ts +8 -0
- package/src/scripts/agent-engines/manage-agent-engine.ts +5 -1
- package/src/scripts/agent-engines/set-agent-engine.ts +9 -1
- package/src/server/agent-chat/framework-prompts.ts +3 -1
- package/src/server/agent-chat/plugin-options.ts +9 -0
- package/src/server/agent-chat-plugin.ts +12 -3
- package/corpus/templates/tasks/.prettierrc +0 -5
- package/src/templates/chat/actions/hello.spec.ts +0 -23
- package/src/templates/chat/actions/navigate.spec.ts +0 -68
- package/src/templates/chat/actions/view-screen.spec.ts +0 -40
- package/src/templates/chat/app/lib/agent-page.spec.tsx +0 -61
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { configureTracking } from "@agent-native/core/client/analytics";
|
|
2
|
+
import { appPath } from "@agent-native/core/client/api-path";
|
|
3
|
+
import { useDbSync } from "@agent-native/core/client/hooks";
|
|
4
|
+
import {
|
|
5
|
+
AppProviders,
|
|
6
|
+
createAgentNativeQueryClient,
|
|
7
|
+
} from "@agent-native/core/client/hooks";
|
|
8
|
+
import { getLocaleInitScript, useT } from "@agent-native/core/client/i18n";
|
|
9
|
+
import {
|
|
10
|
+
CommandMenu,
|
|
11
|
+
useCommandMenuShortcut,
|
|
12
|
+
} from "@agent-native/core/client/navigation";
|
|
13
|
+
import { getThemeInitScript } from "@agent-native/core/client/ui";
|
|
14
|
+
import { IconHierarchy2, IconSun, IconMoon } from "@tabler/icons-react";
|
|
15
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
16
|
+
import { useTheme } from "next-themes";
|
|
17
|
+
import { useCallback, useState } from "react";
|
|
18
|
+
import {
|
|
19
|
+
Links,
|
|
20
|
+
Meta,
|
|
21
|
+
Outlet,
|
|
22
|
+
Scripts,
|
|
23
|
+
ScrollRestoration,
|
|
24
|
+
useNavigate,
|
|
25
|
+
} from "react-router";
|
|
26
|
+
import type { LinksFunction } from "react-router";
|
|
27
|
+
|
|
28
|
+
import { Layout as AppLayout } from "@/components/layout/Layout";
|
|
29
|
+
import { AppToolkitProvider } from "@/components/ui/toolkit-provider";
|
|
30
|
+
import { useNavigationState } from "@/hooks/use-navigation-state";
|
|
31
|
+
import { APP_TITLE } from "@/lib/app-config";
|
|
32
|
+
import { TAB_ID } from "@/lib/tab-id";
|
|
33
|
+
|
|
34
|
+
import changelog from "../CHANGELOG.md?raw";
|
|
35
|
+
import { i18nCatalog } from "./i18n";
|
|
36
|
+
|
|
37
|
+
import stylesheet from "./global.css?url";
|
|
38
|
+
|
|
39
|
+
configureTracking({
|
|
40
|
+
getDefaultProps: (_name, properties) => ({
|
|
41
|
+
...properties,
|
|
42
|
+
app: "chat",
|
|
43
|
+
}),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export const links: LinksFunction = () => [
|
|
47
|
+
{ rel: "stylesheet", href: stylesheet },
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
const THEME_INIT_SCRIPT = getThemeInitScript();
|
|
51
|
+
const LOCALE_INIT_SCRIPT = getLocaleInitScript();
|
|
52
|
+
|
|
53
|
+
export function Layout({ children }: { children: React.ReactNode }) {
|
|
54
|
+
return (
|
|
55
|
+
<html lang="en" suppressHydrationWarning>
|
|
56
|
+
<head>
|
|
57
|
+
<meta charSet="utf-8" />
|
|
58
|
+
<meta
|
|
59
|
+
name="viewport"
|
|
60
|
+
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
|
|
61
|
+
/>
|
|
62
|
+
<script
|
|
63
|
+
suppressHydrationWarning
|
|
64
|
+
dangerouslySetInnerHTML={{ __html: THEME_INIT_SCRIPT }}
|
|
65
|
+
/>
|
|
66
|
+
<script
|
|
67
|
+
data-agent-native-locale-init
|
|
68
|
+
suppressHydrationWarning
|
|
69
|
+
dangerouslySetInnerHTML={{ __html: LOCALE_INIT_SCRIPT }}
|
|
70
|
+
/>
|
|
71
|
+
<link rel="manifest" href={appPath("/manifest.json")} />
|
|
72
|
+
<meta name="theme-color" content="#18181B" />
|
|
73
|
+
<meta name="mobile-web-app-capable" content="yes" />
|
|
74
|
+
<meta
|
|
75
|
+
name="apple-mobile-web-app-status-bar-style"
|
|
76
|
+
content="black-translucent"
|
|
77
|
+
/>
|
|
78
|
+
<meta name="apple-mobile-web-app-title" content={APP_TITLE} />
|
|
79
|
+
<link rel="icon" type="image/svg+xml" href={appPath("/favicon.svg")} />
|
|
80
|
+
<link rel="apple-touch-icon" href={appPath("/icon-180.svg")} />
|
|
81
|
+
<Meta />
|
|
82
|
+
<Links />
|
|
83
|
+
</head>
|
|
84
|
+
<body>
|
|
85
|
+
{children}
|
|
86
|
+
<ScrollRestoration />
|
|
87
|
+
<Scripts />
|
|
88
|
+
</body>
|
|
89
|
+
</html>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function DbSyncSetup() {
|
|
94
|
+
const qc = useQueryClient();
|
|
95
|
+
useNavigationState();
|
|
96
|
+
useDbSync({
|
|
97
|
+
queryClient: qc,
|
|
98
|
+
ignoreSource: TAB_ID,
|
|
99
|
+
});
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function ThemeToggleItem() {
|
|
104
|
+
const { resolvedTheme, setTheme } = useTheme();
|
|
105
|
+
const t = useT();
|
|
106
|
+
const isDark = resolvedTheme === "dark";
|
|
107
|
+
return (
|
|
108
|
+
<CommandMenu.Item
|
|
109
|
+
onSelect={() => setTheme(isDark ? "light" : "dark")}
|
|
110
|
+
keywords={["theme", "dark", "light", "mode"]}
|
|
111
|
+
>
|
|
112
|
+
{isDark ? <IconSun size={16} /> : <IconMoon size={16} />}
|
|
113
|
+
{t("root.toggleTheme")}
|
|
114
|
+
</CommandMenu.Item>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function AppContent() {
|
|
119
|
+
const [cmdkOpen, setCmdkOpen] = useState(false);
|
|
120
|
+
const navigate = useNavigate();
|
|
121
|
+
const t = useT();
|
|
122
|
+
useCommandMenuShortcut(useCallback(() => setCmdkOpen(true), []));
|
|
123
|
+
return (
|
|
124
|
+
<>
|
|
125
|
+
<CommandMenu
|
|
126
|
+
open={cmdkOpen}
|
|
127
|
+
onOpenChange={setCmdkOpen}
|
|
128
|
+
changelog={changelog}
|
|
129
|
+
changelogKey="chat"
|
|
130
|
+
>
|
|
131
|
+
<CommandMenu.Group heading={t("root.commandActions")}>
|
|
132
|
+
<CommandMenu.Item onSelect={() => {}}>
|
|
133
|
+
{t("root.commandSearch")}
|
|
134
|
+
</CommandMenu.Item>
|
|
135
|
+
<CommandMenu.Item
|
|
136
|
+
onSelect={() => navigate("/agent")}
|
|
137
|
+
keywords={[
|
|
138
|
+
"agent",
|
|
139
|
+
"context",
|
|
140
|
+
"files",
|
|
141
|
+
"connections",
|
|
142
|
+
"jobs",
|
|
143
|
+
"access",
|
|
144
|
+
]}
|
|
145
|
+
>
|
|
146
|
+
<IconHierarchy2 size={16} />
|
|
147
|
+
{t("settings.openAgentSettings")}
|
|
148
|
+
</CommandMenu.Item>
|
|
149
|
+
</CommandMenu.Group>
|
|
150
|
+
<CommandMenu.Group heading={t("root.commandAppearance")}>
|
|
151
|
+
<ThemeToggleItem />
|
|
152
|
+
</CommandMenu.Group>
|
|
153
|
+
</CommandMenu>
|
|
154
|
+
<AppLayout>
|
|
155
|
+
<Outlet />
|
|
156
|
+
</AppLayout>
|
|
157
|
+
</>
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export default function Root() {
|
|
162
|
+
const [queryClient] = useState(() => createAgentNativeQueryClient());
|
|
163
|
+
return (
|
|
164
|
+
<AppToolkitProvider>
|
|
165
|
+
<AppProviders queryClient={queryClient} i18n={{ catalog: i18nCatalog }}>
|
|
166
|
+
<DbSyncSetup />
|
|
167
|
+
<AppContent />
|
|
168
|
+
</AppProviders>
|
|
169
|
+
</AppToolkitProvider>
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export { ErrorBoundary } from "@agent-native/core/client/ui";
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AgentChatSurface,
|
|
3
|
+
markAgentChatHomeHandoff,
|
|
4
|
+
} from "@agent-native/core/client/agent-chat";
|
|
5
|
+
import { useT } from "@agent-native/core/client/i18n";
|
|
6
|
+
import { useEffect } from "react";
|
|
7
|
+
import { useNavigate, useParams } from "react-router";
|
|
8
|
+
|
|
9
|
+
import { APP_TITLE } from "@/lib/app-config";
|
|
10
|
+
import { TAB_ID } from "@/lib/tab-id";
|
|
11
|
+
|
|
12
|
+
const SEO_TITLE = `${APP_TITLE} - Open Source AI app starter with actions`;
|
|
13
|
+
const SEO_DESCRIPTION =
|
|
14
|
+
"Open Source starter for agent-native apps with durable chat, shared actions, UI state, tools, and a backend your agent can extend.";
|
|
15
|
+
|
|
16
|
+
export function meta() {
|
|
17
|
+
return [
|
|
18
|
+
{ title: SEO_TITLE },
|
|
19
|
+
{
|
|
20
|
+
name: "description",
|
|
21
|
+
content: SEO_DESCRIPTION,
|
|
22
|
+
},
|
|
23
|
+
{ property: "og:title", content: SEO_TITLE },
|
|
24
|
+
{ property: "og:description", content: SEO_DESCRIPTION },
|
|
25
|
+
{ name: "twitter:card", content: "summary" },
|
|
26
|
+
{ name: "twitter:title", content: SEO_TITLE },
|
|
27
|
+
{ name: "twitter:description", content: SEO_DESCRIPTION },
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function chatThreadPath(threadId: string | null) {
|
|
32
|
+
return threadId ? `/chat/${encodeURIComponent(threadId)}` : "/";
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default function ChatRoute() {
|
|
36
|
+
const { threadId } = useParams();
|
|
37
|
+
const navigate = useNavigate();
|
|
38
|
+
const t = useT();
|
|
39
|
+
const threadUrlSync = threadId
|
|
40
|
+
? {
|
|
41
|
+
routeThreadId: threadId,
|
|
42
|
+
getPath: chatThreadPath,
|
|
43
|
+
navigate,
|
|
44
|
+
}
|
|
45
|
+
: undefined;
|
|
46
|
+
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
function handleChatRunning(event: Event) {
|
|
49
|
+
const detail = (event as CustomEvent).detail;
|
|
50
|
+
if (detail?.isRunning === true) markAgentChatHomeHandoff("chat");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
window.addEventListener("agentNative.chatRunning", handleChatRunning);
|
|
54
|
+
return () =>
|
|
55
|
+
window.removeEventListener("agentNative.chatRunning", handleChatRunning);
|
|
56
|
+
}, []);
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<div className="flex h-full min-h-0 flex-col bg-background">
|
|
60
|
+
<AgentChatSurface
|
|
61
|
+
mode="page"
|
|
62
|
+
chatViewTransition
|
|
63
|
+
className="h-full"
|
|
64
|
+
defaultMode="chat"
|
|
65
|
+
storageKey="chat"
|
|
66
|
+
threadUrlSync={threadUrlSync}
|
|
67
|
+
browserTabId={TAB_ID}
|
|
68
|
+
showHeader={false}
|
|
69
|
+
showTabBar={false}
|
|
70
|
+
dynamicSuggestions={false}
|
|
71
|
+
suggestions={[
|
|
72
|
+
t("chat.suggestionCapabilities"),
|
|
73
|
+
t("chat.suggestionCustomize"),
|
|
74
|
+
t("chat.suggestionActions"),
|
|
75
|
+
]}
|
|
76
|
+
emptyStateText={t("chat.emptyState")}
|
|
77
|
+
emptyStateDisplay="hidden"
|
|
78
|
+
centerComposerWhenEmpty
|
|
79
|
+
composerLayoutVariant="hero"
|
|
80
|
+
composerPlaceholder={t("chat.composerPlaceholder")}
|
|
81
|
+
composerSlot={
|
|
82
|
+
<div className="mx-auto mb-5 max-w-xl px-4 text-center">
|
|
83
|
+
<h1 className="text-2xl font-semibold tracking-normal text-foreground sm:text-3xl">
|
|
84
|
+
{t("chat.heroTitle")}
|
|
85
|
+
</h1>
|
|
86
|
+
<p className="mt-2 text-sm leading-6 text-muted-foreground">
|
|
87
|
+
{t("chat.heroDescription")}
|
|
88
|
+
</p>
|
|
89
|
+
</div>
|
|
90
|
+
}
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AgentChatSurface,
|
|
3
|
+
AgentTabsPage,
|
|
4
|
+
} from "@agent-native/core/client/agent-chat";
|
|
5
|
+
import { useT } from "@agent-native/core/client/i18n";
|
|
6
|
+
import { useSetPageTitle } from "@agent-native/toolkit/app-shell";
|
|
7
|
+
|
|
8
|
+
import { resolveAgentPageComponent } from "@/lib/agent-page";
|
|
9
|
+
import { APP_TITLE } from "@/lib/app-config";
|
|
10
|
+
|
|
11
|
+
export function meta() {
|
|
12
|
+
return [{ title: `Agent - ${APP_TITLE}` }];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default function AgentRoute() {
|
|
16
|
+
const t = useT();
|
|
17
|
+
useSetPageTitle(t("settings.agentTitle"));
|
|
18
|
+
|
|
19
|
+
const AgentPage = resolveAgentPageComponent({
|
|
20
|
+
AgentChatSurface,
|
|
21
|
+
AgentTabsPage,
|
|
22
|
+
});
|
|
23
|
+
return <AgentPage appName={APP_TITLE} />;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, meta } from "./_index";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DbAdminPage } from "@agent-native/core/client/db-admin";
|
|
2
|
+
import { useT } from "@agent-native/core/client/i18n";
|
|
3
|
+
import { useSetPageTitle } from "@agent-native/toolkit/app-shell";
|
|
4
|
+
|
|
5
|
+
export function meta() {
|
|
6
|
+
return [{ title: "Database" }];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default function DatabasePage() {
|
|
10
|
+
const t = useT();
|
|
11
|
+
useSetPageTitle(t("pages.databaseTitle"));
|
|
12
|
+
return (
|
|
13
|
+
<div className="h-full">
|
|
14
|
+
<DbAdminPage />
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ExtensionViewerPage } from "@agent-native/core/client/extensions";
|
|
2
|
+
|
|
3
|
+
import { APP_TITLE } from "@/lib/app-config";
|
|
4
|
+
|
|
5
|
+
export function meta() {
|
|
6
|
+
return [{ title: `Extension — ${APP_TITLE}` }];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default function ExtensionViewerRoute() {
|
|
10
|
+
return <ExtensionViewerPage />;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ExtensionsListPage } from "@agent-native/core/client/extensions";
|
|
2
|
+
|
|
3
|
+
import { APP_TITLE } from "@/lib/app-config";
|
|
4
|
+
|
|
5
|
+
export function meta() {
|
|
6
|
+
return [{ title: `Extensions — ${APP_TITLE}` }];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default function ExtensionsRoute() {
|
|
10
|
+
return <ExtensionsListPage />;
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useT } from "@agent-native/core/client/i18n";
|
|
2
|
+
import { ObservabilityDashboard } from "@agent-native/core/client/observability";
|
|
3
|
+
import { useSetPageTitle } from "@agent-native/toolkit/app-shell";
|
|
4
|
+
|
|
5
|
+
import enUS from "@/i18n/en-US";
|
|
6
|
+
|
|
7
|
+
export function meta() {
|
|
8
|
+
return [{ title: enUS.pages.observabilityPageTitle }];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function ObservabilityPage() {
|
|
12
|
+
const t = useT();
|
|
13
|
+
useSetPageTitle(t("pages.observabilityPageTitle"));
|
|
14
|
+
return (
|
|
15
|
+
<div className="p-6">
|
|
16
|
+
<ObservabilityDashboard />
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ChangelogSettingsCard } from "@agent-native/core/client/changelog";
|
|
2
|
+
import { LanguagePicker, useT } from "@agent-native/core/client/i18n";
|
|
3
|
+
import { TeamPage } from "@agent-native/core/client/org";
|
|
4
|
+
import {
|
|
5
|
+
AccountSettingsCard,
|
|
6
|
+
SettingsTabsPage,
|
|
7
|
+
useAgentSettingsTabs,
|
|
8
|
+
type SettingsSearchEntry,
|
|
9
|
+
} from "@agent-native/core/client/settings";
|
|
10
|
+
import { useSetPageTitle } from "@agent-native/toolkit/app-shell";
|
|
11
|
+
import { useMemo } from "react";
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
Card,
|
|
15
|
+
CardContent,
|
|
16
|
+
CardDescription,
|
|
17
|
+
CardHeader,
|
|
18
|
+
CardTitle,
|
|
19
|
+
} from "@/components/ui/card";
|
|
20
|
+
import { Label } from "@/components/ui/label";
|
|
21
|
+
import { APP_TITLE } from "@/lib/app-config";
|
|
22
|
+
|
|
23
|
+
import changelog from "../../CHANGELOG.md?raw";
|
|
24
|
+
|
|
25
|
+
export function meta() {
|
|
26
|
+
return [{ title: `Settings - ${APP_TITLE}` }];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default function SettingsRoute() {
|
|
30
|
+
const t = useT();
|
|
31
|
+
const agentSettingsTabs = useAgentSettingsTabs();
|
|
32
|
+
useSetPageTitle(t("settings.title"));
|
|
33
|
+
|
|
34
|
+
const generalSearchEntries = useMemo<SettingsSearchEntry[]>(
|
|
35
|
+
() => [
|
|
36
|
+
{
|
|
37
|
+
id: "chat-language",
|
|
38
|
+
label: t("settings.languageTitle"),
|
|
39
|
+
keywords: "language locale translation i18n",
|
|
40
|
+
hash: "language",
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
[t],
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<SettingsTabsPage
|
|
48
|
+
account={<AccountSettingsCard />}
|
|
49
|
+
teamLabel={t("navigation.team")}
|
|
50
|
+
extraTabs={agentSettingsTabs}
|
|
51
|
+
generalSearchEntries={generalSearchEntries}
|
|
52
|
+
general={
|
|
53
|
+
<div className="mx-auto w-full max-w-2xl space-y-6">
|
|
54
|
+
<p className="text-sm leading-6 text-muted-foreground">
|
|
55
|
+
{t("settings.description")}
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
<Card id="language" className="scroll-mt-16">
|
|
59
|
+
<CardHeader>
|
|
60
|
+
<CardTitle className="text-base">
|
|
61
|
+
{t("settings.languageTitle")}
|
|
62
|
+
</CardTitle>
|
|
63
|
+
<CardDescription>
|
|
64
|
+
{t("settings.languageDescription")}
|
|
65
|
+
</CardDescription>
|
|
66
|
+
</CardHeader>
|
|
67
|
+
<CardContent className="max-w-xs space-y-1.5">
|
|
68
|
+
<Label>{t("settings.languageLabel")}</Label>
|
|
69
|
+
<LanguagePicker label={t("settings.languageLabel")} />
|
|
70
|
+
</CardContent>
|
|
71
|
+
</Card>
|
|
72
|
+
</div>
|
|
73
|
+
}
|
|
74
|
+
team={
|
|
75
|
+
<div className="mx-auto w-full max-w-3xl">
|
|
76
|
+
<TeamPage
|
|
77
|
+
showTitle={false}
|
|
78
|
+
createOrgDescription={t("pages.teamCreateOrgDescription")}
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
}
|
|
82
|
+
whatsNew={
|
|
83
|
+
<div className="mx-auto w-full max-w-2xl">
|
|
84
|
+
<ChangelogSettingsCard markdown={changelog} />
|
|
85
|
+
</div>
|
|
86
|
+
}
|
|
87
|
+
/>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Navigate } from "react-router";
|
|
2
|
+
|
|
3
|
+
import { APP_TITLE } from "@/lib/app-config";
|
|
4
|
+
|
|
5
|
+
export function meta() {
|
|
6
|
+
return [{ title: `Team — ${APP_TITLE}` }];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default function TeamRoute() {
|
|
10
|
+
return <Navigate to="/settings#organization" replace />;
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "default",
|
|
4
|
+
"rsc": false,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "",
|
|
8
|
+
"css": "app/global.css",
|
|
9
|
+
"baseColor": "slate",
|
|
10
|
+
"cssVariables": true,
|
|
11
|
+
"prefix": ""
|
|
12
|
+
},
|
|
13
|
+
"aliases": {
|
|
14
|
+
"components": "@/components",
|
|
15
|
+
"utils": "@/lib/utils",
|
|
16
|
+
"ui": "@/components/ui",
|
|
17
|
+
"lib": "@/lib",
|
|
18
|
+
"hooks": "@/hooks"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Learnings
|
|
2
|
+
|
|
3
|
+
<!-- This file is your app's memory. The AI reads it at the start of every conversation and updates it when it learns something new. -->
|
|
4
|
+
<!-- Your personal learnings.md is gitignored so preferences and private info stay local. -->
|
|
5
|
+
<!-- This defaults file is what new checkouts start with. -->
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[build]
|
|
2
|
+
ignore = "node ./scripts/netlify-ignore-build.mjs chat"
|
|
3
|
+
command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && NITRO_PRESET=netlify pnpm --filter chat build"
|
|
4
|
+
publish = "templates/chat/dist"
|
|
5
|
+
functions = "templates/chat/.netlify/functions-internal"
|
|
6
|
+
|
|
7
|
+
[build.environment]
|
|
8
|
+
GA_MEASUREMENT_ID = "G-ESF7FYXGN9"
|
|
9
|
+
NITRO_PRESET = "netlify"
|
|
10
|
+
NPM_CONFIG_PRODUCTION = "false"
|