@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.
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/analytics/app/pages/Settings.tsx +5 -1
- package/corpus/templates/analytics/app/routes/agent.tsx +7 -5
- package/corpus/templates/analytics/server/jobs/analytics-bigquery-backfill.ts +13 -9
- package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +69 -33
- package/corpus/templates/assets/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/assets/app/routes/agent.tsx +7 -5
- package/corpus/templates/assets/app/routes/settings.tsx +7 -2
- package/corpus/templates/assets/server/plugins/creative-context.ts +1 -1
- package/corpus/templates/brain/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/brain/app/lib/brain.ts +4 -2
- package/corpus/templates/brain/app/root.tsx +1 -1
- package/corpus/templates/brain/app/routes/agent.tsx +10 -2
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +1 -1
- package/corpus/templates/calendar/app/root.tsx +1 -2
- package/corpus/templates/calendar/app/routes/_app.agent.tsx +8 -16
- package/corpus/templates/chat/app/hooks/use-navigation-state.ts +5 -2
- package/corpus/templates/chat/app/routes/agent.tsx +7 -31
- package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -1
- package/corpus/templates/clips/app/root.tsx +1 -2
- package/corpus/templates/clips/app/routes/_app.agent.tsx +9 -7
- package/corpus/templates/content/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/content/app/root.tsx +1 -2
- package/corpus/templates/content/app/routes/_app.agent.tsx +9 -8
- package/corpus/templates/content/app/routes/_app.settings.tsx +7 -2
- package/corpus/templates/content/server/plugins/creative-context.ts +1 -1
- package/corpus/templates/crm/app/components/crm/RecordActions.tsx +4 -1
- package/corpus/templates/crm/app/components/layout/CrmLayout.tsx +1 -1
- package/corpus/templates/crm/app/routes/agent.tsx +10 -2
- package/corpus/templates/design/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/design/app/root.tsx +1 -1
- package/corpus/templates/design/app/routes/agent.tsx +9 -7
- package/corpus/templates/design/app/routes/settings.tsx +7 -2
- package/corpus/templates/design/server/plugins/creative-context.ts +1 -1
- package/corpus/templates/dispatch/app/root.tsx +5 -2
- package/corpus/templates/dispatch/app/routes/agent.tsx +7 -7
- package/corpus/templates/factory/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/factory/app/hooks/use-navigation-state.ts +5 -2
- package/corpus/templates/factory/app/root.tsx +1 -1
- package/corpus/templates/factory/app/routes/agent.tsx +9 -14
- package/corpus/templates/forms/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/forms/app/root.tsx +1 -1
- package/corpus/templates/forms/app/routes/_app.agent.tsx +9 -7
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +5 -3
- package/corpus/templates/macros/app/root.tsx +1 -1
- package/corpus/templates/macros/app/routes/agent.tsx +9 -6
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +8 -2
- package/corpus/templates/mail/app/components/layout/CommandPalette.tsx +1 -1
- package/corpus/templates/mail/app/routes/agent.tsx +9 -6
- package/corpus/templates/plan/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/plan/app/root.tsx +1 -1
- package/corpus/templates/plan/app/routes/agent.tsx +9 -6
- package/corpus/templates/slides/app/components/editor/ImageGenPanel.tsx +8 -12
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +39 -2
- package/corpus/templates/slides/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/slides/app/i18n/en-US.ts +1 -0
- package/corpus/templates/slides/app/lib/create-deck-generation.ts +22 -5
- package/corpus/templates/slides/app/pages/Index.tsx +20 -5
- package/corpus/templates/slides/app/root.tsx +1 -1
- package/corpus/templates/slides/app/routes/agent.tsx +6 -9
- package/corpus/templates/slides/app/routes/settings.tsx +7 -2
- package/corpus/templates/slides/server/plugins/creative-context.ts +1 -1
- package/corpus/templates/tasks/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/tasks/app/routes/agent.tsx +10 -2
- package/dist/client/index.d.ts +1 -1
- package/dist/client/navigation/index.d.ts +1 -1
- package/dist/client/navigation/index.js +1 -1
- package/dist/client/org/OrgSwitcher.js +1 -1
- package/dist/client/settings/SettingsPanel.d.ts +8 -0
- package/dist/client/settings/SettingsPanel.js +16 -1
- package/dist/client/settings/index.d.ts +1 -1
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/routes.d.ts +1 -1
- package/dist/deploy/build.d.ts +21 -0
- package/dist/deploy/build.js +185 -10
- package/dist/jobs/background-automation-runner.d.ts +1 -1
- package/dist/jobs/background-automation-runner.js +1 -1
- package/dist/jobs/scheduler-health.d.ts +4 -0
- package/dist/jobs/scheduler-health.js +33 -0
- package/dist/localization/server.d.ts +0 -1
- package/dist/localization/server.js +3 -1
- package/dist/mcp-client/index.d.ts +1 -1
- package/dist/mcp-client/index.js +1 -1
- package/dist/mcp-client/routes.d.ts +11 -0
- package/dist/mcp-client/routes.js +26 -1
- package/dist/navigation/index.d.ts +1 -0
- package/dist/navigation/index.js +34 -0
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/observability/routes.d.ts +3 -3
- package/dist/provider-api/actions/custom-provider-registration.d.ts +6 -6
- package/dist/provider-api/actions/provider-api.d.ts +5 -5
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/secrets/routes.d.ts +6 -6
- package/dist/server/agent-chat/mcp-glue.js +12 -3
- package/dist/server/agent-chat-plugin.js +73 -48
- package/dist/server/http-response-telemetry.js +112 -5
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/release-migrations.js +2 -0
- package/dist/server/ssr-handler.js +8 -0
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/templates/chat/app/hooks/use-navigation-state.ts +5 -2
- package/dist/templates/chat/app/routes/agent.tsx +7 -31
- package/dist/templates/default/app/routes/_index.tsx +1 -1
- package/dist/templates/default/app/routes/agent.tsx +7 -25
- package/dist/templates/workspace-core/.agents/skills/performance/SKILL.md +54 -3
- package/dist/vite/client.js +5 -1
- package/package.json +1 -1
- package/src/templates/chat/app/hooks/use-navigation-state.ts +5 -2
- package/src/templates/chat/app/routes/agent.tsx +7 -31
- package/src/templates/default/app/routes/_index.tsx +1 -1
- package/src/templates/default/app/routes/agent.tsx +7 -25
- 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
|
|
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 {
|
|
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
|
-
|
|
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 {
|
|
2
|
-
import {
|
|
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
|
|
14
|
-
useSetPageTitle(t("settings.agentTitle"));
|
|
11
|
+
const location = useLocation();
|
|
15
12
|
|
|
16
|
-
return
|
|
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 {
|
|
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[]>(
|
|
@@ -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
|
|
206
|
+
<AppLayout
|
|
207
|
+
extensions={dispatchExtensions}
|
|
208
|
+
agentPageHref="/settings/agent"
|
|
209
|
+
>
|
|
207
210
|
<Outlet />
|
|
208
211
|
</AppLayout>
|
|
209
212
|
</>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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
|
|
11
|
+
const location = useLocation();
|
|
13
12
|
|
|
14
13
|
return (
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
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")
|
|
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":
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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
|
|
17
|
-
useSetPageTitle(t("settings.agentTitle"));
|
|
11
|
+
const location = useLocation();
|
|
18
12
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
return (
|
|
14
|
+
<Navigate
|
|
15
|
+
to={buildLegacyAgentSettingsRoute(location.hash, location.search)}
|
|
16
|
+
replace
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
24
19
|
}
|
|
@@ -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 {
|
|
2
|
-
import {
|
|
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
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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 =
|
|
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 {
|
|
2
|
-
import {
|
|
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
|
|
13
|
-
useSetPageTitle(t("settings.agentTitle"));
|
|
11
|
+
const location = useLocation();
|
|
14
12
|
|
|
15
|
-
return
|
|
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 (
|
|
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");
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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
|
|
13
|
-
useSetPageTitle(t("settings.agentTitle"));
|
|
11
|
+
const location = useLocation();
|
|
14
12
|
|
|
15
|
-
return
|
|
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 {
|
|
2
|
-
import {
|
|
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
|
|
13
|
-
useSetPageTitle(t("settings.agentTitle"));
|
|
11
|
+
const location = useLocation();
|
|
14
12
|
|
|
15
|
-
return
|
|
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 {
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|
|
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 />}
|