@agent-native/core 0.146.4 → 0.146.6

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.
Files changed (113) hide show
  1. package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +1 -1
  2. package/corpus/templates/analytics/app/components/layout/Layout.tsx +1 -1
  3. package/corpus/templates/analytics/app/pages/Settings.tsx +5 -1
  4. package/corpus/templates/analytics/app/routes/agent.tsx +7 -5
  5. package/corpus/templates/analytics/server/jobs/analytics-bigquery-backfill.ts +13 -9
  6. package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +69 -33
  7. package/corpus/templates/assets/app/components/layout/Layout.tsx +1 -1
  8. package/corpus/templates/assets/app/routes/agent.tsx +7 -5
  9. package/corpus/templates/assets/app/routes/settings.tsx +7 -2
  10. package/corpus/templates/assets/server/plugins/creative-context.ts +1 -1
  11. package/corpus/templates/brain/app/components/layout/Layout.tsx +1 -1
  12. package/corpus/templates/brain/app/lib/brain.ts +4 -2
  13. package/corpus/templates/brain/app/root.tsx +1 -1
  14. package/corpus/templates/brain/app/routes/agent.tsx +10 -2
  15. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +1 -1
  16. package/corpus/templates/calendar/app/root.tsx +1 -2
  17. package/corpus/templates/calendar/app/routes/_app.agent.tsx +8 -16
  18. package/corpus/templates/chat/app/hooks/use-navigation-state.ts +5 -2
  19. package/corpus/templates/chat/app/routes/agent.tsx +7 -31
  20. package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -1
  21. package/corpus/templates/clips/app/root.tsx +1 -2
  22. package/corpus/templates/clips/app/routes/_app.agent.tsx +9 -7
  23. package/corpus/templates/content/app/components/layout/Layout.tsx +1 -1
  24. package/corpus/templates/content/app/root.tsx +1 -2
  25. package/corpus/templates/content/app/routes/_app.agent.tsx +9 -8
  26. package/corpus/templates/content/app/routes/_app.settings.tsx +7 -2
  27. package/corpus/templates/content/server/plugins/creative-context.ts +1 -1
  28. package/corpus/templates/crm/app/components/crm/RecordActions.tsx +4 -1
  29. package/corpus/templates/crm/app/components/layout/CrmLayout.tsx +1 -1
  30. package/corpus/templates/crm/app/routes/agent.tsx +10 -2
  31. package/corpus/templates/design/app/components/layout/Layout.tsx +1 -1
  32. package/corpus/templates/design/app/root.tsx +1 -1
  33. package/corpus/templates/design/app/routes/agent.tsx +9 -7
  34. package/corpus/templates/design/app/routes/settings.tsx +7 -2
  35. package/corpus/templates/design/server/plugins/creative-context.ts +1 -1
  36. package/corpus/templates/dispatch/app/root.tsx +5 -2
  37. package/corpus/templates/dispatch/app/routes/agent.tsx +7 -7
  38. package/corpus/templates/factory/app/components/layout/Layout.tsx +1 -1
  39. package/corpus/templates/factory/app/hooks/use-navigation-state.ts +5 -2
  40. package/corpus/templates/factory/app/root.tsx +1 -1
  41. package/corpus/templates/factory/app/routes/agent.tsx +9 -14
  42. package/corpus/templates/forms/app/components/layout/Layout.tsx +1 -1
  43. package/corpus/templates/forms/app/root.tsx +1 -1
  44. package/corpus/templates/forms/app/routes/_app.agent.tsx +9 -7
  45. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +5 -3
  46. package/corpus/templates/macros/app/root.tsx +1 -1
  47. package/corpus/templates/macros/app/routes/agent.tsx +9 -6
  48. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +8 -2
  49. package/corpus/templates/mail/app/components/layout/CommandPalette.tsx +1 -1
  50. package/corpus/templates/mail/app/routes/agent.tsx +9 -6
  51. package/corpus/templates/plan/app/components/layout/Layout.tsx +1 -1
  52. package/corpus/templates/plan/app/root.tsx +1 -1
  53. package/corpus/templates/plan/app/routes/agent.tsx +9 -6
  54. package/corpus/templates/slides/app/components/editor/ImageGenPanel.tsx +8 -12
  55. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +39 -2
  56. package/corpus/templates/slides/app/components/layout/Layout.tsx +1 -1
  57. package/corpus/templates/slides/app/i18n/en-US.ts +1 -0
  58. package/corpus/templates/slides/app/lib/create-deck-generation.ts +22 -5
  59. package/corpus/templates/slides/app/pages/Index.tsx +20 -5
  60. package/corpus/templates/slides/app/root.tsx +1 -1
  61. package/corpus/templates/slides/app/routes/agent.tsx +6 -9
  62. package/corpus/templates/slides/app/routes/settings.tsx +7 -2
  63. package/corpus/templates/slides/server/plugins/creative-context.ts +1 -1
  64. package/corpus/templates/tasks/app/components/layout/Layout.tsx +1 -1
  65. package/corpus/templates/tasks/app/routes/agent.tsx +10 -2
  66. package/dist/client/index.d.ts +1 -1
  67. package/dist/client/navigation/index.d.ts +1 -1
  68. package/dist/client/navigation/index.js +1 -1
  69. package/dist/client/org/OrgSwitcher.js +1 -1
  70. package/dist/client/settings/SettingsPanel.d.ts +8 -0
  71. package/dist/client/settings/SettingsPanel.js +16 -1
  72. package/dist/client/settings/index.d.ts +1 -1
  73. package/dist/collab/awareness.d.ts +2 -2
  74. package/dist/collab/routes.d.ts +1 -1
  75. package/dist/deploy/build.d.ts +21 -0
  76. package/dist/deploy/build.js +185 -10
  77. package/dist/jobs/background-automation-runner.d.ts +1 -1
  78. package/dist/jobs/background-automation-runner.js +1 -1
  79. package/dist/jobs/scheduler-health.d.ts +4 -0
  80. package/dist/jobs/scheduler-health.js +33 -0
  81. package/dist/localization/server.d.ts +0 -1
  82. package/dist/localization/server.js +3 -1
  83. package/dist/mcp-client/index.d.ts +1 -1
  84. package/dist/mcp-client/index.js +1 -1
  85. package/dist/mcp-client/routes.d.ts +11 -0
  86. package/dist/mcp-client/routes.js +26 -1
  87. package/dist/navigation/index.d.ts +1 -0
  88. package/dist/navigation/index.js +34 -0
  89. package/dist/notifications/routes.d.ts +2 -2
  90. package/dist/observability/routes.d.ts +3 -3
  91. package/dist/provider-api/actions/custom-provider-registration.d.ts +6 -6
  92. package/dist/provider-api/actions/provider-api.d.ts +5 -5
  93. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  94. package/dist/secrets/routes.d.ts +6 -6
  95. package/dist/server/agent-chat/mcp-glue.js +12 -3
  96. package/dist/server/agent-chat-plugin.js +73 -48
  97. package/dist/server/http-response-telemetry.js +112 -5
  98. package/dist/server/realtime-token.d.ts +1 -1
  99. package/dist/server/release-migrations.js +2 -0
  100. package/dist/server/ssr-handler.js +8 -0
  101. package/dist/server/transcribe-voice.d.ts +1 -1
  102. package/dist/templates/chat/app/hooks/use-navigation-state.ts +5 -2
  103. package/dist/templates/chat/app/routes/agent.tsx +7 -31
  104. package/dist/templates/default/app/routes/_index.tsx +1 -1
  105. package/dist/templates/default/app/routes/agent.tsx +7 -25
  106. package/dist/templates/workspace-core/.agents/skills/performance/SKILL.md +54 -3
  107. package/dist/vite/client.js +5 -1
  108. package/package.json +1 -1
  109. package/src/templates/chat/app/hooks/use-navigation-state.ts +5 -2
  110. package/src/templates/chat/app/routes/agent.tsx +7 -31
  111. package/src/templates/default/app/routes/_index.tsx +1 -1
  112. package/src/templates/default/app/routes/agent.tsx +7 -25
  113. package/src/templates/workspace-core/.agents/skills/performance/SKILL.md +54 -3
@@ -601,7 +601,10 @@ function CallEvidenceAutomationDialog({ record }: { record: CrmRecordDetail }) {
601
601
  </div>
602
602
  <DialogFooter className="flex-row flex-wrap justify-end gap-2 sm:justify-end">
603
603
  <Button asChild variant="ghost" size="sm" className="gap-1.5">
604
- <Link to="/agent#jobs" onClick={() => setOpen(false)}>
604
+ <Link
605
+ to="/settings/agent/automations"
606
+ onClick={() => setOpen(false)}
607
+ >
605
608
  <IconExternalLink className="size-4" />{" "}
606
609
  {t("recordActions.manageAutomations")}
607
610
  </Link>
@@ -121,7 +121,7 @@ export function CrmLayout({ children }: { children: React.ReactNode }) {
121
121
  "Summarize this account",
122
122
  "Which opportunities need attention?",
123
123
  ]}
124
- agentPageHref="/agent"
124
+ agentPageHref="/settings/agent"
125
125
  >
126
126
  {shell}
127
127
  </AgentSidebar>
@@ -1,5 +1,13 @@
1
- import { AgentTabsPage } from "@agent-native/core/client/agent-chat";
1
+ import { buildLegacyAgentSettingsRoute } from "@agent-native/core/client/navigation";
2
+ import { Navigate, useLocation } from "react-router";
2
3
 
3
4
  export default function AgentRoute() {
4
- return <AgentTabsPage appName="CRM" />;
5
+ const location = useLocation();
6
+
7
+ return (
8
+ <Navigate
9
+ to={buildLegacyAgentSettingsRoute(location.hash, location.search)}
10
+ replace
11
+ />
12
+ );
5
13
  }
@@ -153,7 +153,7 @@ export function Layout({ children }: LayoutProps) {
153
153
  <AgentSidebar
154
154
  position="right"
155
155
  storageKey={DESIGN_CHAT_STORAGE_KEY}
156
- agentPageHref="/agent"
156
+ agentPageHref="/settings/agent"
157
157
  emptyStateText={t("chat.emptyState")}
158
158
  suggestions={[
159
159
  t("chat.suggestionLandingPage"),
@@ -145,7 +145,7 @@ function DesignCommandMenu({
145
145
  changelogKey="design"
146
146
  >
147
147
  <CommandMenu.Group heading={t("root.commandActions")}>
148
- <CommandMenu.Item onSelect={() => navigate("/agent")}>
148
+ <CommandMenu.Item onSelect={() => navigate("/settings/agent")}>
149
149
  <IconHierarchy2 size={16} />
150
150
  {t("root.openAgent")}
151
151
  </CommandMenu.Item>
@@ -1,7 +1,5 @@
1
- import { AgentTabsPage } from "@agent-native/core/client/agent-chat";
2
- import { useT } from "@agent-native/core/client/i18n";
3
- import { createCreativeContextAgentTab } from "@agent-native/creative-context/client";
4
- import { useSetPageTitle } from "@agent-native/toolkit/app-shell";
1
+ import { buildLegacyAgentSettingsRoute } from "@agent-native/core/client/navigation";
2
+ import { Navigate, useLocation } from "react-router";
5
3
 
6
4
  import messages from "@/i18n/en-US";
7
5
 
@@ -10,8 +8,12 @@ export function meta() {
10
8
  }
11
9
 
12
10
  export default function AgentRoute() {
13
- const t = useT();
14
- useSetPageTitle(t("settings.agentTitle"));
11
+ const location = useLocation();
15
12
 
16
- return <AgentTabsPage extraTabFactories={[createCreativeContextAgentTab]} />;
13
+ return (
14
+ <Navigate
15
+ to={buildLegacyAgentSettingsRoute(location.hash, location.search)}
16
+ replace
17
+ />
18
+ );
17
19
  }
@@ -9,7 +9,10 @@ import {
9
9
  useAgentSettingsTabs,
10
10
  type SettingsSearchEntry,
11
11
  } from "@agent-native/core/client/settings";
12
- import { CreativeContextSettingsLink } from "@agent-native/creative-context/client";
12
+ import {
13
+ CreativeContextSettingsLink,
14
+ createCreativeContextAgentTab,
15
+ } from "@agent-native/creative-context/client";
13
16
  import { useMemo } from "react";
14
17
 
15
18
  import { messagesByLocale } from "@/i18n-data";
@@ -21,7 +24,9 @@ export function meta() {
21
24
  }
22
25
 
23
26
  export default function SettingsRoute() {
24
- const agentSettingsTabs = useAgentSettingsTabs();
27
+ const agentSettingsTabs = useAgentSettingsTabs({
28
+ agentAdditionalTabFactories: [createCreativeContextAgentTab],
29
+ });
25
30
  const t = useT();
26
31
 
27
32
  const generalSearchEntries = useMemo<SettingsSearchEntry[]>(
@@ -20,7 +20,7 @@ registerOnboardingStep({
20
20
  kind: "link",
21
21
  primary: true,
22
22
  label: "Open Library",
23
- payload: { url: "/agent#library", external: false },
23
+ payload: { url: "/settings/library", external: false },
24
24
  },
25
25
  ],
26
26
  isComplete: async () => {
@@ -191,7 +191,7 @@ function AppContent() {
191
191
  changelogKey="dispatch"
192
192
  >
193
193
  <CommandMenu.Group heading={t("root.commandActions")}>
194
- <CommandMenu.Item onSelect={() => navigate("/agent")}>
194
+ <CommandMenu.Item onSelect={() => navigate("/settings/agent")}>
195
195
  <IconHierarchy2 size={16} />
196
196
  {t("root.openAgent")}
197
197
  </CommandMenu.Item>
@@ -203,7 +203,10 @@ function AppContent() {
203
203
  <ThemeToggleItem />
204
204
  </CommandMenu.Group>
205
205
  </CommandMenu>
206
- <AppLayout extensions={dispatchExtensions} agentPageHref="/agent">
206
+ <AppLayout
207
+ extensions={dispatchExtensions}
208
+ agentPageHref="/settings/agent"
209
+ >
207
210
  <Outlet />
208
211
  </AppLayout>
209
212
  </>
@@ -1,6 +1,5 @@
1
- import { AgentTabsPage } from "@agent-native/core/client/agent-chat";
2
- import { useT } from "@agent-native/core/client/i18n";
3
- import { DispatchShell } from "@agent-native/dispatch/components";
1
+ import { buildLegacyAgentSettingsRoute } from "@agent-native/core/client/navigation";
2
+ import { Navigate, useLocation } from "react-router";
4
3
 
5
4
  import { messagesByLocale } from "@/i18n-data";
6
5
 
@@ -9,11 +8,12 @@ export function meta() {
9
8
  }
10
9
 
11
10
  export default function AgentRoute() {
12
- const t = useT();
11
+ const location = useLocation();
13
12
 
14
13
  return (
15
- <DispatchShell title={t("settings.agentTitle")}>
16
- <AgentTabsPage />
17
- </DispatchShell>
14
+ <Navigate
15
+ to={buildLegacyAgentSettingsRoute(location.hash, location.search)}
16
+ replace
17
+ />
18
18
  );
19
19
  }
@@ -174,7 +174,7 @@ export function Layout({ children }: LayoutProps) {
174
174
  openOnChatRunning={chatHomeHandoffActive}
175
175
  onFullscreenRequest={openAskAgentFullscreen}
176
176
  emptyStateText={t("chat.inspectEmptyState")}
177
- agentPageHref="/agent"
177
+ agentPageHref="/settings/agent"
178
178
  suggestions={[
179
179
  t("chat.inspectSuggestionCapabilities"),
180
180
  t("chat.inspectSuggestionHello"),
@@ -67,7 +67,10 @@ function viewForPath(pathname: string): string {
67
67
  if (pathname.startsWith("/extensions")) return "extensions";
68
68
  if (pathname.startsWith("/observability")) return "observability";
69
69
  if (pathname.startsWith("/factory")) return "factory";
70
- if (pathname.startsWith("/agent")) return "agent";
70
+ if (pathname.startsWith("/settings/agent") || pathname.startsWith("/agent")) {
71
+ return "agent";
72
+ }
73
+ if (pathname.startsWith("/settings")) return "settings";
71
74
  if (pathname.startsWith("/team")) return "settings";
72
75
  return "chat";
73
76
  }
@@ -87,7 +90,7 @@ function pathForView(view?: string): string {
87
90
  case "factory":
88
91
  return "/factory";
89
92
  case "agent":
90
- return "/agent";
93
+ return "/settings/agent";
91
94
  case "settings":
92
95
  return "/settings";
93
96
  case "team":
@@ -135,7 +135,7 @@ function AppContent() {
135
135
  {t("root.commandSearch")}
136
136
  </CommandMenu.Item>
137
137
  <CommandMenu.Item
138
- onSelect={() => navigate("/agent")}
138
+ onSelect={() => navigate("/settings/agent")}
139
139
  keywords={[
140
140
  "agent",
141
141
  "context",
@@ -1,11 +1,6 @@
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";
1
+ import { buildLegacyAgentSettingsRoute } from "@agent-native/core/client/navigation";
2
+ import { Navigate, useLocation } from "react-router";
7
3
 
8
- import { resolveAgentPageComponent } from "@/lib/agent-page";
9
4
  import { APP_TITLE } from "@/lib/app-config";
10
5
 
11
6
  export function meta() {
@@ -13,12 +8,12 @@ export function meta() {
13
8
  }
14
9
 
15
10
  export default function AgentRoute() {
16
- const t = useT();
17
- useSetPageTitle(t("settings.agentTitle"));
11
+ const location = useLocation();
18
12
 
19
- const AgentPage = resolveAgentPageComponent({
20
- AgentChatSurface,
21
- AgentTabsPage,
22
- });
23
- return <AgentPage appName={APP_TITLE} />;
13
+ return (
14
+ <Navigate
15
+ to={buildLegacyAgentSettingsRoute(location.hash, location.search)}
16
+ replace
17
+ />
18
+ );
24
19
  }
@@ -89,7 +89,7 @@ export function Layout({ children }: LayoutProps) {
89
89
  ) : (
90
90
  <AgentSidebar
91
91
  position="right"
92
- agentPageHref="/agent"
92
+ agentPageHref="/settings/agent"
93
93
  defaultOpen={false}
94
94
  chatViewTransition
95
95
  chatViewTransitionHandoff={chatHomeHandoffPending}
@@ -244,7 +244,7 @@ function FormsCommandMenu({
244
244
  <CommandMenu.Item onSelect={() => {}}>
245
245
  {t("root.searchForms")}
246
246
  </CommandMenu.Item>
247
- <CommandMenu.Item onSelect={() => navigate("/agent")}>
247
+ <CommandMenu.Item onSelect={() => navigate("/settings/agent")}>
248
248
  <IconHierarchy2 size={16} />
249
249
  {t("root.openAgent")}
250
250
  </CommandMenu.Item>
@@ -1,6 +1,5 @@
1
- import { AgentTabsPage } from "@agent-native/core/client/agent-chat";
2
- import { useT } from "@agent-native/core/client/i18n";
3
- import { useSetPageTitle } from "@agent-native/toolkit/app-shell";
1
+ import { buildLegacyAgentSettingsRoute } from "@agent-native/core/client/navigation";
2
+ import { Navigate, useLocation } from "react-router";
4
3
 
5
4
  import messages from "@/i18n/en-US";
6
5
 
@@ -9,8 +8,11 @@ export function meta() {
9
8
  }
10
9
 
11
10
  export default function AgentRoute() {
12
- const t = useT();
13
- useSetPageTitle(t("settings.agentTitle"));
14
-
15
- return <AgentTabsPage />;
11
+ const location = useLocation();
12
+ return (
13
+ <Navigate
14
+ to={buildLegacyAgentSettingsRoute(location.hash, location.search)}
15
+ replace
16
+ />
17
+ );
16
18
  }
@@ -62,7 +62,9 @@ export function AppLayout({ children }: { children: React.ReactNode }) {
62
62
 
63
63
  const isAnalytics = location.pathname === "/analytics";
64
64
  const isSettings = location.pathname.startsWith("/settings");
65
- const isAgent = location.pathname.startsWith("/agent");
65
+ const isAgent =
66
+ location.pathname.startsWith("/settings/agent") ||
67
+ location.pathname.startsWith("/agent");
66
68
 
67
69
  // Auto-close sidebar on route change (mobile)
68
70
  useEffect(() => {
@@ -120,7 +122,7 @@ export function AppLayout({ children }: { children: React.ReactNode }) {
120
122
  } else if (cmd.view === "settings") {
121
123
  navigate("/settings");
122
124
  } else if (cmd.view === "agent") {
123
- navigate("/agent");
125
+ navigate("/settings/agent");
124
126
  } else if (cmd.view === "entry") {
125
127
  navigate("/");
126
128
  }
@@ -144,7 +146,7 @@ export function AppLayout({ children }: { children: React.ReactNode }) {
144
146
  t("agent.suggestionMacros"),
145
147
  t("agent.suggestionRun"),
146
148
  ]}
147
- agentPageHref="/agent"
149
+ agentPageHref="/settings/agent"
148
150
  >
149
151
  <div className="agent-layout-shell flex flex-1 overflow-hidden">
150
152
  {/* Desktop sidebar */}
@@ -166,7 +166,7 @@ function MacrosCommandMenu({
166
166
  {t("root.search")}
167
167
  </CommandMenu.Item>
168
168
  <CommandMenu.Item
169
- onSelect={() => navigate("/agent")}
169
+ onSelect={() => navigate("/settings/agent")}
170
170
  keywords={["agent", "context", "connections", "jobs", "access"]}
171
171
  >
172
172
  <IconHierarchy2 size={16} />
@@ -1,6 +1,5 @@
1
- import { AgentTabsPage } from "@agent-native/core/client/agent-chat";
2
- import { useT } from "@agent-native/core/client/i18n";
3
- import { useSetPageTitle } from "@agent-native/toolkit/app-shell";
1
+ import { buildLegacyAgentSettingsRoute } from "@agent-native/core/client/navigation";
2
+ import { Navigate, useLocation } from "react-router";
4
3
 
5
4
  import messages from "@/i18n/en-US";
6
5
 
@@ -9,8 +8,12 @@ export function meta() {
9
8
  }
10
9
 
11
10
  export default function AgentRoute() {
12
- const t = useT();
13
- useSetPageTitle(t("settings.agentTitle"));
11
+ const location = useLocation();
14
12
 
15
- return <AgentTabsPage appName="Macros" />;
13
+ return (
14
+ <Navigate
15
+ to={buildLegacyAgentSettingsRoute(location.hash, location.search)}
16
+ replace
17
+ />
18
+ );
16
19
  }
@@ -149,6 +149,7 @@ function AccountAvatar({
149
149
  function isStandardLayoutPath(pathname: string): boolean {
150
150
  return (
151
151
  pathname === "/settings" ||
152
+ pathname.startsWith("/settings/") ||
152
153
  pathname === "/agent" ||
153
154
  pathname === "/team" ||
154
155
  pathname === "/draft-queue" ||
@@ -201,7 +202,7 @@ export function AppLayout({ children }: AppLayoutProps) {
201
202
  <AgentSidebar
202
203
  position="right"
203
204
  defaultOpen={false}
204
- agentPageHref="/agent"
205
+ agentPageHref="/settings/agent"
205
206
  emptyStateText={t("agent.emptyState")}
206
207
  suggestions={[
207
208
  t("agent.suggestionSummarize"),
@@ -2042,7 +2043,12 @@ function StandardLayout({ children }: AppLayoutProps) {
2042
2043
 
2043
2044
  const fallbackTitle = (() => {
2044
2045
  if (location.pathname === "/settings") return t("settings.title");
2045
- if (location.pathname === "/agent") return t("settings.agentTitle");
2046
+ if (
2047
+ location.pathname === "/agent" ||
2048
+ location.pathname.startsWith("/settings/agent")
2049
+ ) {
2050
+ return t("settings.agentTitle");
2051
+ }
2046
2052
  if (location.pathname === "/team") return t("mail.pages.team");
2047
2053
  if (location.pathname.startsWith("/draft-queue"))
2048
2054
  return t("mail.views.draftQueue");
@@ -79,7 +79,7 @@ const navCommands = [
79
79
  {
80
80
  labelKey: "settings.openAgentSettings",
81
81
  icon: IconHierarchy2,
82
- route: "/agent",
82
+ route: "/settings/agent",
83
83
  },
84
84
  ];
85
85
 
@@ -1,6 +1,5 @@
1
- import { AgentTabsPage } from "@agent-native/core/client/agent-chat";
2
- import { useT } from "@agent-native/core/client/i18n";
3
- import { useSetPageTitle } from "@agent-native/toolkit/app-shell";
1
+ import { buildLegacyAgentSettingsRoute } from "@agent-native/core/client/navigation";
2
+ import { Navigate, useLocation } from "react-router";
4
3
 
5
4
  import messages from "@/i18n/en-US";
6
5
 
@@ -9,8 +8,12 @@ export function meta() {
9
8
  }
10
9
 
11
10
  export default function AgentRoute() {
12
- const t = useT();
13
- useSetPageTitle(t("settings.agentTitle"));
11
+ const location = useLocation();
14
12
 
15
- return <AgentTabsPage appName="Mail" />;
13
+ return (
14
+ <Navigate
15
+ to={buildLegacyAgentSettingsRoute(location.hash, location.search)}
16
+ replace
17
+ />
18
+ );
16
19
  }
@@ -211,7 +211,7 @@ export function Layout({ children }: LayoutProps) {
211
211
  chatViewTransitionHandoff={chatHomeHandoffPending}
212
212
  storageKey="plans"
213
213
  openOnChatRunning={chatHomeHandoffActive}
214
- agentPageHref="/agent"
214
+ agentPageHref="/settings/agent"
215
215
  emptyStateText={t("agent.emptyState")}
216
216
  suggestions={[
217
217
  t("agent.suggestionShipped"),
@@ -177,7 +177,7 @@ function AppContent() {
177
177
  {t("root.openRecaps")}
178
178
  </CommandMenu.Item>
179
179
  <CommandMenu.Item
180
- onSelect={() => go("/agent")}
180
+ onSelect={() => go("/settings/agent")}
181
181
  keywords={["agent", "context", "connections", "jobs", "access"]}
182
182
  >
183
183
  <IconHierarchy2 size={16} />
@@ -1,6 +1,5 @@
1
- import { AgentTabsPage } from "@agent-native/core/client/agent-chat";
2
- import { useT } from "@agent-native/core/client/i18n";
3
- import { useSetPageTitle } from "@agent-native/toolkit/app-shell";
1
+ import { buildLegacyAgentSettingsRoute } from "@agent-native/core/client/navigation";
2
+ import { Navigate, useLocation } from "react-router";
4
3
 
5
4
  import messages from "@/i18n/en-US";
6
5
 
@@ -9,8 +8,12 @@ export function meta() {
9
8
  }
10
9
 
11
10
  export default function AgentRoute() {
12
- const t = useT();
13
- useSetPageTitle(t("settings.agentTitle"));
11
+ const location = useLocation();
14
12
 
15
- return <AgentTabsPage appName="Plan" />;
13
+ return (
14
+ <Navigate
15
+ to={buildLegacyAgentSettingsRoute(location.hash, location.search)}
16
+ replace
17
+ />
18
+ );
16
19
  }
@@ -4,7 +4,6 @@ import {
4
4
  normalizeReferenceUrls,
5
5
  } from "@shared/api";
6
6
  import { IconX } from "@tabler/icons-react";
7
- import { IconLoader2 } from "@tabler/icons-react";
8
7
  import { useState, useEffect, useRef } from "react";
9
8
  import { createPortal } from "react-dom";
10
9
 
@@ -98,7 +97,7 @@ export default function ImageGenPanel({
98
97
  const [disabledDefaults, setDisabledDefaults] = useState<Set<number>>(
99
98
  new Set(),
100
99
  );
101
- const { generating, submit: agentSubmit } = useAgentGenerating();
100
+ const { submit: agentSubmit } = useAgentGenerating();
102
101
  const panelRef = useRef<HTMLDivElement>(null);
103
102
 
104
103
  useEffect(() => {
@@ -148,6 +147,11 @@ export default function ImageGenPanel({
148
147
 
149
148
  agentSubmit(label, context);
150
149
  setPrompt("");
150
+ // Generation happens asynchronously in the agent chat, which already
151
+ // surfaces its own progress/failure state — keeping this popup open with
152
+ // a separate loading flag risks it getting stuck if the two states
153
+ // diverge (e.g. the chat run keeps going after this request finishes).
154
+ onOpenChange(false);
151
155
  };
152
156
 
153
157
  if (!open) return null;
@@ -246,17 +250,9 @@ export default function ImageGenPanel({
246
250
  {/* Generate button */}
247
251
  <button
248
252
  onClick={handleGenerate}
249
- disabled={generating}
250
- className="w-full px-4 py-2 rounded-lg bg-[#609FF8] hover:bg-[#7AB2FA] disabled:opacity-70 disabled:cursor-not-allowed text-black text-sm font-medium transition-colors flex items-center justify-center gap-2"
253
+ className="w-full px-4 py-2 rounded-lg bg-[#609FF8] hover:bg-[#7AB2FA] text-black text-sm font-medium transition-colors flex items-center justify-center gap-2"
251
254
  >
252
- {generating ? (
253
- <>
254
- <IconLoader2 className="w-4 h-4 animate-spin" />
255
- {t("raw.generatingImage")}
256
- </>
257
- ) : (
258
- "Generate"
259
- )}
255
+ Generate
260
256
  </button>
261
257
  </div>
262
258
  </div>,
@@ -17,7 +17,12 @@ import {
17
17
  } from "@agent-native/toolkit/collab-ui";
18
18
  import { appStateKeyForBrowserTab } from "@shared/app-state-tabs";
19
19
  import { hashSlideContent } from "@shared/slide-fit";
20
- import { IconMaximize, IconZoomIn, IconZoomOut } from "@tabler/icons-react";
20
+ import {
21
+ IconMaximize,
22
+ IconX,
23
+ IconZoomIn,
24
+ IconZoomOut,
25
+ } from "@tabler/icons-react";
21
26
  import {
22
27
  useState,
23
28
  useCallback,
@@ -136,6 +141,25 @@ import { SlideContextToolbar } from "./SlideContextToolbar";
136
141
  import { SlideOverflowWarning } from "./SlideOverflowWarning";
137
142
  import { SpeakerNotesPanel } from "./SpeakerNotesPanel";
138
143
 
144
+ function ExcalidrawExitButton(props: { onExit: () => void; label: string }) {
145
+ return (
146
+ <Tooltip>
147
+ <TooltipTrigger asChild>
148
+ <Button
149
+ variant="ghost"
150
+ size="icon"
151
+ className="absolute right-3 top-3 z-20 h-8 w-8 cursor-pointer border border-border bg-popover/95 shadow-lg backdrop-blur"
152
+ onClick={props.onExit}
153
+ aria-label={props.label}
154
+ >
155
+ <IconX className="h-4 w-4" />
156
+ </Button>
157
+ </TooltipTrigger>
158
+ <TooltipContent side="bottom">{props.label}</TooltipContent>
159
+ </Tooltip>
160
+ );
161
+ }
162
+
139
163
  let builderIdCounter = 0;
140
164
  const CANVAS_ZOOM_PRESETS = [10, 25, 50, 75, 100, 125, 150, 200] as const;
141
165
 
@@ -4184,10 +4208,23 @@ export default function SlideEditor({
4184
4208
  <div className="flex min-h-0 flex-1 overflow-hidden">
4185
4209
  <div className="min-w-0 flex-1 overflow-hidden">
4186
4210
  {slide.excalidrawData ? (
4187
- <div className="h-full bg-background">
4211
+ <div className="relative h-full bg-background">
4212
+ {!readOnly && (
4213
+ <ExcalidrawExitButton
4214
+ // JSON.stringify drops `undefined` properties before the patch
4215
+ // reaches the network request, so the server's
4216
+ // `fields.excalidrawData !== undefined` merge check never sees
4217
+ // the clear — the canvas would reappear after reload. "" is a
4218
+ // serializable value that survives the round trip and is
4219
+ // already treated as "no data" everywhere excalidrawData is read.
4220
+ onExit={() => onUpdateSlide({ excalidrawData: "" })}
4221
+ label={t("raw.exitExcalidrawCanvas")}
4222
+ />
4223
+ )}
4188
4224
  <ExcalidrawSlide
4189
4225
  initialData={slide.excalidrawData}
4190
4226
  onChange={(data) => onUpdateSlide({ excalidrawData: data })}
4227
+ readOnly={readOnly}
4191
4228
  />
4192
4229
  </div>
4193
4230
  ) : (
@@ -117,7 +117,7 @@ export function Layout({ children }: LayoutProps) {
117
117
  ]}
118
118
  scope={deckScope}
119
119
  browserTabId={TAB_ID}
120
- agentPageHref="/agent"
120
+ agentPageHref="/settings/agent"
121
121
  suppressFirstRunOnboarding={isSlidesEditorRoute(location.pathname)}
122
122
  composerSlot={<CreativeContextComposerChip />}
123
123
  threadFooterSlot={<GoogleDriveConnectionCta />}
@@ -77,6 +77,7 @@ const messages = {
77
77
  zoomIn: "Zoom in",
78
78
  fitSlideToScreen: "Fit slide to screen",
79
79
  fitToScreen: "Fit to screen",
80
+ exitExcalidrawCanvas: "Exit drawing canvas",
80
81
  agentWorking: "Agent is working",
81
82
  openChat: "Open chat",
82
83
  cloudAuthToken: "Auth token",