@agent-native/core 0.98.2 → 0.98.4
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 +23 -0
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/production-agent.ts +2 -2
- package/corpus/core/src/client/analytics.ts +12 -0
- package/corpus/core/src/client/index.ts +2 -0
- package/corpus/core/src/client/session-replay.ts +612 -26
- package/corpus/core/src/client/settings/DemoModeSection.tsx +6 -6
- package/corpus/core/src/client/settings/SettingsPanel.tsx +31 -211
- package/corpus/core/src/client/settings/agent-settings-search.ts +219 -0
- package/corpus/core/src/client/settings/index.ts +4 -0
- package/corpus/core/src/demo/actions/toggle-demo-mode.ts +2 -2
- package/corpus/core/src/demo/config.ts +6 -6
- package/corpus/core/src/demo/fetch-interceptor.ts +25 -2
- package/corpus/core/src/demo/redact.ts +57 -66
- package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +65 -6
- package/corpus/templates/analytics/AGENTS.md +6 -6
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +429 -244
- package/corpus/templates/analytics/app/components/layout/command-palette-search.ts +93 -0
- package/corpus/templates/analytics/app/global.css +4 -62
- package/corpus/templates/analytics/app/hooks/use-replay-storage-status.ts +2 -1
- package/corpus/templates/analytics/app/lib/demo-chart-trend.ts +46 -33
- package/corpus/templates/analytics/app/pages/Settings.tsx +8 -45
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +413 -105
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +32 -16
- package/corpus/templates/analytics/app/pages/settings/settings-search.ts +126 -0
- package/corpus/templates/analytics/changelog/2026-07-12-command-menu-loading-placeholders-now-stay-below-available-r.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-12-command-menu-search-now-prioritizes-the-best-match.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-12-demo-charts-preserve-source-movement.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-12-fixed-session-replays-that-appeared-ultra-wide-hid-recorded-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-12-replay-storage-settings-stay-readable-at-narrow-widths.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-12-session-replays-load-faster-in-demo-mode-while-visitor-email.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-12-session-replays-preserve-recorded-styling-and-keep-malformed.md +6 -0
- package/corpus/templates/calendar/app/components/calendar/DeleteEventDialog.tsx +11 -2
- package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +14 -2
- package/corpus/templates/calendar/changelog/2026-07-12-calendar-responses-can-now-be-saved-with-command-enter-or-ct.md +6 -0
- package/dist/agent/production-agent.js +2 -2
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +11 -0
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/session-replay.d.ts +12 -3
- package/dist/client/session-replay.d.ts.map +1 -1
- package/dist/client/session-replay.js +488 -23
- package/dist/client/session-replay.js.map +1 -1
- package/dist/client/settings/DemoModeSection.d.ts +3 -3
- package/dist/client/settings/DemoModeSection.js +4 -4
- package/dist/client/settings/DemoModeSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +41 -191
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/agent-settings-search.d.ts +16 -0
- package/dist/client/settings/agent-settings-search.d.ts.map +1 -0
- package/dist/client/settings/agent-settings-search.js +178 -0
- package/dist/client/settings/agent-settings-search.js.map +1 -0
- package/dist/client/settings/index.d.ts +1 -0
- package/dist/client/settings/index.d.ts.map +1 -1
- package/dist/client/settings/index.js +1 -0
- package/dist/client/settings/index.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/demo/actions/toggle-demo-mode.js +2 -2
- package/dist/demo/actions/toggle-demo-mode.js.map +1 -1
- package/dist/demo/config.js +6 -6
- package/dist/demo/config.js.map +1 -1
- package/dist/demo/fetch-interceptor.d.ts +1 -0
- package/dist/demo/fetch-interceptor.d.ts.map +1 -1
- package/dist/demo/fetch-interceptor.js +19 -2
- package/dist/demo/fetch-interceptor.js.map +1 -1
- package/dist/demo/redact.d.ts +14 -5
- package/dist/demo/redact.d.ts.map +1 -1
- package/dist/demo/redact.js +30 -56
- package/dist/demo/redact.js.map +1 -1
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* <DemoModeSection /> — toggle that replaces
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* <DemoModeSection /> — toggle that replaces emails and numbers with realistic
|
|
3
|
+
* fake data everywhere (UI + what the agent sees) while preserving names,
|
|
4
|
+
* free text, labels, IDs, and structure so the app keeps working.
|
|
5
5
|
*
|
|
6
6
|
* The toggle is stored in application_state under `demo-mode`
|
|
7
7
|
* (`{ enabled: boolean }`) and written via `PUT
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
|
-
* <DemoModeSection /> — toggle that replaces
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* <DemoModeSection /> — toggle that replaces emails and numbers with realistic
|
|
4
|
+
* fake data everywhere (UI + what the agent sees) while preserving names,
|
|
5
|
+
* free text, labels, IDs, and structure so the app keeps working.
|
|
6
6
|
*
|
|
7
7
|
* The toggle is stored in application_state under `demo-mode`
|
|
8
8
|
* (`{ enabled: boolean }`) and written via `PUT
|
|
@@ -52,7 +52,7 @@ export function DemoModeSection() {
|
|
|
52
52
|
setEnabled(previous);
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
return (_jsxs("div", { className: "flex items-start justify-between gap-3 rounded-md border border-border bg-accent/30 px-2.5 py-2", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "text-[11px] font-medium text-foreground", children: "Enable demo mode" }), _jsx("p", { className: "text-[10px] text-muted-foreground mt-0.5", children: "
|
|
55
|
+
return (_jsxs("div", { className: "flex items-start justify-between gap-3 rounded-md border border-border bg-accent/30 px-2.5 py-2", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("div", { className: "text-[11px] font-medium text-foreground", children: "Enable demo mode" }), _jsx("p", { className: "text-[10px] text-muted-foreground mt-0.5", children: "Anonymize emails in the UI and reshape supported dashboard charts for presentations. Agent-visible emails and numbers are also anonymized. Names, labels, IDs, and structure stay intact." }), forced && (_jsxs("p", { className: "text-[10px] text-muted-foreground mt-0.5", children: ["Enforced by the ", _jsx("code", { children: "DEMO_MODE" }), " environment variable \u2014 can't be turned off here."] }))] }), _jsx("button", { type: "button", role: "switch", "aria-checked": !!enabled, "aria-label": "Enable demo mode", disabled: enabled === null || forced, onClick: () => toggle(!enabled),
|
|
56
56
|
// Theme tokens; streaming agent owns layout.
|
|
57
57
|
className: `relative inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full transition-colors ${enabled
|
|
58
58
|
? "bg-primary"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DemoModeSection.js","sourceRoot":"","sources":["../../../src/client/settings/DemoModeSection.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,mBAAmB,GAAG,eAAe,CACzC,4CAA4C,CAC7C,C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CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,EAAE,YAEpD,eACE,SAAS,EAAE,kFACT,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,iBAChC,EAAE,GACF,GACK,IACL,CACP,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,KAAC,UAAU,IAAC,IAAI,EAAE,EAAE,GAAI,CAAC;AAClC,CAAC","sourcesContent":["/**\n * <DemoModeSection /> — toggle that replaces emails and numbers with realistic\n * fake data everywhere (UI + what the agent sees) while preserving names,\n * free text, labels, IDs, and structure so the app keeps working.\n *\n * The toggle is stored in application_state under `demo-mode`\n * (`{ enabled: boolean }`) and written via `PUT\n * /_agent-native/application-state/demo-mode` (optimistic — flip first,\n * write in the background). It READS from `/_agent-native/demo/status`\n * instead, which ORs the per-user toggle with the `DEMO_MODE` env: a hosted\n * demo deployment is forced on and the switch is locked so it can't be\n * accidentally turned off on stage.\n */\n\nimport { IconEyeOff } from \"@tabler/icons-react\";\nimport { useEffect, useState } from \"react\";\n\nimport { agentNativePath } from \"../api-path.js\";\nimport { useDemoModeStatus } from \"../use-demo-mode-status.js\";\n\nconst DEMO_MODE_WRITE_URL = agentNativePath(\n \"/_agent-native/application-state/demo-mode\",\n);\n\nexport function DemoModeSection() {\n const [enabled, setEnabled] = useState<boolean | null>(null);\n const { enabled: serverEnabled, forced, isLoading } = useDemoModeStatus();\n\n // Surface the server value once it arrives (and on subsequent polls), but\n // never clobber an in-flight optimistic toggle with a stale read. When\n // forced by env, always reflect the locked-on state.\n useEffect(() => {\n if (forced) {\n setEnabled(true);\n } else if (!isLoading) {\n setEnabled((prev) => (prev === null ? serverEnabled : prev));\n }\n }, [serverEnabled, forced, isLoading]);\n\n const toggle = async (next: boolean) => {\n if (forced) return;\n const previous = enabled;\n // Optimistic: flip immediately, write in the background.\n setEnabled(next);\n try {\n const res = await fetch(DEMO_MODE_WRITE_URL, {\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\" },\n credentials: \"include\",\n body: JSON.stringify({ enabled: next }),\n });\n if (!res.ok) {\n throw new Error(`HTTP ${res.status}`);\n }\n } catch {\n setEnabled(previous);\n }\n };\n\n return (\n <div className=\"flex items-start justify-between gap-3 rounded-md border border-border bg-accent/30 px-2.5 py-2\">\n <div className=\"min-w-0\">\n <div className=\"text-[11px] font-medium text-foreground\">\n Enable demo mode\n </div>\n <p className=\"text-[10px] text-muted-foreground mt-0.5\">\n Anonymize emails in the UI and reshape supported dashboard charts for\n presentations. Agent-visible emails and numbers are also anonymized.\n Names, labels, IDs, and structure stay intact.\n </p>\n {forced && (\n <p className=\"text-[10px] text-muted-foreground mt-0.5\">\n Enforced by the <code>DEMO_MODE</code> environment variable — can't\n be turned off here.\n </p>\n )}\n </div>\n <button\n type=\"button\"\n role=\"switch\"\n aria-checked={!!enabled}\n aria-label=\"Enable demo mode\"\n disabled={enabled === null || forced}\n onClick={() => toggle(!enabled)}\n // Theme tokens; streaming agent owns layout.\n className={`relative inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full transition-colors ${\n enabled\n ? \"bg-primary\"\n : \"bg-muted-foreground/30 hover:bg-muted-foreground/50\"\n } ${enabled === null || forced ? \"opacity-60\" : \"\"}`}\n >\n <span\n className={`inline-block h-3 w-3 transform rounded-full bg-background transition-transform ${\n enabled ? \"translate-x-3.5\" : \"translate-x-0.5\"\n }`}\n />\n </button>\n </div>\n );\n}\n\nexport function DemoModeIcon() {\n return <IconEyeOff size={14} />;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsPanel.d.ts","sourceRoot":"","sources":["../../../src/client/settings/SettingsPanel.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAQN,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SettingsPanel.d.ts","sourceRoot":"","sources":["../../../src/client/settings/SettingsPanel.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAQN,MAAM,OAAO,CAAC;AAoCf,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAwoB7D,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,MAAM,EACN,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,OAAO,GACR,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,qBAqDA;AAs+CD,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AA8uBD,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qBAEtD;AAED,wBAAgB,oBAAoB,IAAI,eAAe,EAAE,CAiFxD"}
|
|
@@ -13,6 +13,7 @@ import { uploadAvatar, useAvatarUrl } from "../use-avatar.js";
|
|
|
13
13
|
import { useDevMode } from "../use-dev-mode.js";
|
|
14
14
|
import { useSession } from "../use-session.js";
|
|
15
15
|
import { cn } from "../utils.js";
|
|
16
|
+
import { AGENT_SETTINGS_SECTIONS, ALL_SETTINGS_SECTIONS, CONNECTION_SETTINGS_SECTIONS, SETTINGS_SECTION_IDS, WORKSPACE_SETTINGS_SECTIONS, getAgentSettingsSearchTabs, } from "./agent-settings-search.js";
|
|
16
17
|
import { AgentsSection } from "./AgentsSection.js";
|
|
17
18
|
import { AutomationsSection } from "./AutomationsSection.js";
|
|
18
19
|
import { DemoModeSection } from "./DemoModeSection.js";
|
|
@@ -886,159 +887,6 @@ function AgentLimitsSectionInner({ open, onToggle, }) {
|
|
|
886
887
|
saving ||
|
|
887
888
|
settings.maxIterations === settings.defaultMaxIterations, className: pillButtonClass(isPage, "outline"), children: "Reset" })] }), !settings.canUpdate && (_jsx("p", { className: cn("mt-2 text-muted-foreground", noteTextClass(isPage)), children: "Only organization owners and admins can change this limit." })), error && (_jsx("p", { className: cn("mt-2 text-destructive", noteTextClass(isPage)), children: error }))] }) })) : (_jsx("p", { className: cn("text-muted-foreground", noteTextClass(isPage)), children: "Agent limit settings are unavailable." })) }));
|
|
888
889
|
}
|
|
889
|
-
const SETTINGS_SECTION_IDS = new Set([
|
|
890
|
-
"account",
|
|
891
|
-
"llm",
|
|
892
|
-
"app-models",
|
|
893
|
-
"limits",
|
|
894
|
-
"voice",
|
|
895
|
-
"demo-mode",
|
|
896
|
-
"automations",
|
|
897
|
-
"secrets",
|
|
898
|
-
"hosting",
|
|
899
|
-
"database",
|
|
900
|
-
"uploads",
|
|
901
|
-
"auth",
|
|
902
|
-
"email",
|
|
903
|
-
"browser",
|
|
904
|
-
"background",
|
|
905
|
-
"integrations",
|
|
906
|
-
"usage",
|
|
907
|
-
"a2a",
|
|
908
|
-
]);
|
|
909
|
-
const ALL_SETTINGS_SECTIONS = [
|
|
910
|
-
"account",
|
|
911
|
-
"llm",
|
|
912
|
-
"app-models",
|
|
913
|
-
"limits",
|
|
914
|
-
"voice",
|
|
915
|
-
"demo-mode",
|
|
916
|
-
"automations",
|
|
917
|
-
"secrets",
|
|
918
|
-
"hosting",
|
|
919
|
-
"database",
|
|
920
|
-
"uploads",
|
|
921
|
-
"auth",
|
|
922
|
-
"email",
|
|
923
|
-
"browser",
|
|
924
|
-
"background",
|
|
925
|
-
"integrations",
|
|
926
|
-
"usage",
|
|
927
|
-
"a2a",
|
|
928
|
-
];
|
|
929
|
-
const AGENT_SETTINGS_SECTIONS = [
|
|
930
|
-
"llm",
|
|
931
|
-
"app-models",
|
|
932
|
-
"limits",
|
|
933
|
-
"voice",
|
|
934
|
-
"automations",
|
|
935
|
-
"background",
|
|
936
|
-
"a2a",
|
|
937
|
-
];
|
|
938
|
-
const CONNECTION_SETTINGS_SECTIONS = [
|
|
939
|
-
"secrets",
|
|
940
|
-
"integrations",
|
|
941
|
-
"email",
|
|
942
|
-
"browser",
|
|
943
|
-
"usage",
|
|
944
|
-
];
|
|
945
|
-
const WORKSPACE_SETTINGS_SECTIONS = [
|
|
946
|
-
"account",
|
|
947
|
-
"demo-mode",
|
|
948
|
-
"hosting",
|
|
949
|
-
"database",
|
|
950
|
-
"uploads",
|
|
951
|
-
"auth",
|
|
952
|
-
];
|
|
953
|
-
// Search metadata for each section so settings search can deep-link straight
|
|
954
|
-
// to a section from any tab. Labels mirror the section headers; keywords add
|
|
955
|
-
// synonyms and provider names the header doesn't spell out.
|
|
956
|
-
const SETTINGS_SECTION_SEARCH_META = {
|
|
957
|
-
account: {
|
|
958
|
-
label: "Account",
|
|
959
|
-
keywords: "profile photo avatar identity signed in email name",
|
|
960
|
-
},
|
|
961
|
-
llm: {
|
|
962
|
-
label: "LLM",
|
|
963
|
-
keywords: "model claude gpt openai anthropic gemini api key provider ai engine llm",
|
|
964
|
-
},
|
|
965
|
-
"app-models": {
|
|
966
|
-
label: "App Default Model",
|
|
967
|
-
keywords: "default model provider app template composer",
|
|
968
|
-
},
|
|
969
|
-
limits: {
|
|
970
|
-
label: "Agent Limits",
|
|
971
|
-
keywords: "max iterations budget loop timeout runtime",
|
|
972
|
-
},
|
|
973
|
-
voice: {
|
|
974
|
-
label: "Voice Transcription",
|
|
975
|
-
keywords: "microphone dictation speech to text whisper",
|
|
976
|
-
},
|
|
977
|
-
"demo-mode": {
|
|
978
|
-
label: "Demo mode",
|
|
979
|
-
keywords: "fake data anonymize redact screenshot privacy mask",
|
|
980
|
-
},
|
|
981
|
-
automations: {
|
|
982
|
-
label: "Automations",
|
|
983
|
-
keywords: "triggers scheduled events cron jobs",
|
|
984
|
-
},
|
|
985
|
-
secrets: {
|
|
986
|
-
label: "API Keys & Connections",
|
|
987
|
-
keywords: "secrets credentials tokens api keys environment variables",
|
|
988
|
-
},
|
|
989
|
-
hosting: {
|
|
990
|
-
label: "Hosting",
|
|
991
|
-
keywords: "deploy netlify vercel cloudflare builder nitro",
|
|
992
|
-
},
|
|
993
|
-
database: {
|
|
994
|
-
label: "Database",
|
|
995
|
-
keywords: "postgres sqlite neon supabase turso storage sql pglite",
|
|
996
|
-
},
|
|
997
|
-
uploads: {
|
|
998
|
-
label: "File uploads",
|
|
999
|
-
keywords: "files storage s3 avatars attachments bucket blob",
|
|
1000
|
-
},
|
|
1001
|
-
auth: {
|
|
1002
|
-
label: "Authentication",
|
|
1003
|
-
keywords: "login signup oauth google github better auth access sso",
|
|
1004
|
-
},
|
|
1005
|
-
email: {
|
|
1006
|
-
label: "Email",
|
|
1007
|
-
keywords: "resend sendgrid smtp transactional notifications reports",
|
|
1008
|
-
},
|
|
1009
|
-
browser: {
|
|
1010
|
-
label: "Browser Automation",
|
|
1011
|
-
keywords: "web scraping playwright chrome headless",
|
|
1012
|
-
},
|
|
1013
|
-
background: {
|
|
1014
|
-
label: "Background Agent",
|
|
1015
|
-
keywords: "code changes branches builder production async",
|
|
1016
|
-
},
|
|
1017
|
-
integrations: {
|
|
1018
|
-
label: "Integrations",
|
|
1019
|
-
keywords: "slack telegram whatsapp discord messaging connect",
|
|
1020
|
-
},
|
|
1021
|
-
usage: {
|
|
1022
|
-
label: "Usage",
|
|
1023
|
-
keywords: "tokens cost spend billing consumption",
|
|
1024
|
-
},
|
|
1025
|
-
a2a: {
|
|
1026
|
-
label: "Connected Agents (A2A)",
|
|
1027
|
-
keywords: "remote agents protocol a2a connected",
|
|
1028
|
-
},
|
|
1029
|
-
};
|
|
1030
|
-
function buildSectionSearchEntries(sections) {
|
|
1031
|
-
return sections.map((section) => {
|
|
1032
|
-
const meta = SETTINGS_SECTION_SEARCH_META[section];
|
|
1033
|
-
return {
|
|
1034
|
-
id: `section:${section}`,
|
|
1035
|
-
label: meta.label,
|
|
1036
|
-
keywords: meta.keywords,
|
|
1037
|
-
description: meta.description,
|
|
1038
|
-
hash: section,
|
|
1039
|
-
};
|
|
1040
|
-
});
|
|
1041
|
-
}
|
|
1042
890
|
function normalizeSettingsSection(value) {
|
|
1043
891
|
const normalized = value?.replace(/^#/, "").toLowerCase() ?? "";
|
|
1044
892
|
if (!normalized)
|
|
@@ -1218,7 +1066,7 @@ function SettingsPanelContent({ isDevMode, onToggleDevMode, showDevToggle, devAp
|
|
|
1218
1066
|
const nextIsDev = next === "development";
|
|
1219
1067
|
if (nextIsDev !== isDevMode)
|
|
1220
1068
|
onToggleDevMode();
|
|
1221
|
-
} })) })), showCapabilityStrip && (_jsx(CapabilityStatusStrip, { isDevMode: isDevMode, builderConnected: connected, builderLoading: builderLoading, builderBranchesAvailable: builderBranchesAvailable, onOpenLlm: () => openSettingsSection("llm", true) })), shouldShowSection("account") && (_jsx(AccountSectionInner, { open: openSection === "account", onToggle: () => toggle("account") })), shouldShowSection("llm") && (_jsx(LLMSectionInner, { builderFlow: builderFlow, builderLoading: builderLoading, connectUrl: connectUrl, connected: connected, orgName: orgName, envManaged: envManaged, credentialSource: credentialSource, open: openSection === "llm", onToggle: () => toggle("llm") })), shouldShowSection("app-models") && (_jsx(AppModelDefaultsSectionInner, { open: openSection === "app-models", onToggle: () => toggle("app-models") })), shouldShowSection("limits") && (_jsx(AgentLimitsSectionInner, { open: openSection === "limits", onToggle: () => toggle("limits") })), shouldShowSection("voice") && (_jsx(SettingsSection, { id: settingsSectionDomId("voice"), icon: _jsx(IconMicrophone, { size: 14 }), title: "Voice Transcription", subtitle: "How the composer microphone turns your voice into text.", open: openSection === "voice", onToggle: () => toggle("voice"), children: _jsx(VoiceTranscriptionSection, {}) })), shouldShowSection("demo-mode") && (_jsx(SettingsSection, { id: settingsSectionDomId("demo-mode"), icon: _jsx(IconEyeOff, { size: 14 }), title: "Demo mode", subtitle: "Replace
|
|
1069
|
+
} })) })), showCapabilityStrip && (_jsx(CapabilityStatusStrip, { isDevMode: isDevMode, builderConnected: connected, builderLoading: builderLoading, builderBranchesAvailable: builderBranchesAvailable, onOpenLlm: () => openSettingsSection("llm", true) })), shouldShowSection("account") && (_jsx(AccountSectionInner, { open: openSection === "account", onToggle: () => toggle("account") })), shouldShowSection("llm") && (_jsx(LLMSectionInner, { builderFlow: builderFlow, builderLoading: builderLoading, connectUrl: connectUrl, connected: connected, orgName: orgName, envManaged: envManaged, credentialSource: credentialSource, open: openSection === "llm", onToggle: () => toggle("llm") })), shouldShowSection("app-models") && (_jsx(AppModelDefaultsSectionInner, { open: openSection === "app-models", onToggle: () => toggle("app-models") })), shouldShowSection("limits") && (_jsx(AgentLimitsSectionInner, { open: openSection === "limits", onToggle: () => toggle("limits") })), shouldShowSection("voice") && (_jsx(SettingsSection, { id: settingsSectionDomId("voice"), icon: _jsx(IconMicrophone, { size: 14 }), title: "Voice Transcription", subtitle: "How the composer microphone turns your voice into text.", open: openSection === "voice", onToggle: () => toggle("voice"), children: _jsx(VoiceTranscriptionSection, {}) })), shouldShowSection("demo-mode") && (_jsx(SettingsSection, { id: settingsSectionDomId("demo-mode"), icon: _jsx(IconEyeOff, { size: 14 }), title: "Demo mode", subtitle: "Replace emails and numbers with realistic fake data everywhere \u2014 in the UI and what the agent sees. Names, free text, labels, IDs, and structure are preserved so the app keeps working.", open: openSection === "demo-mode", onToggle: () => toggle("demo-mode"), children: _jsx(DemoModeSection, {}) })), shouldShowSection("automations") && (_jsx(SettingsSection, { id: settingsSectionDomId("automations"), icon: _jsx(IconBolt, { size: 14 }), title: "Automations", subtitle: "Event-triggered and scheduled automations.", open: openSection === "automations", onToggle: () => toggle("automations"), children: _jsx(AutomationsSection, {}) })), shouldShowSection("secrets") && (_jsx(SettingsSection, { id: settingsSectionDomId("secrets"), icon: _jsx(IconKey, { size: 14 }), title: "API Keys & Connections", subtitle: "Service credentials and automation keys.", open: openSection === "secrets", onToggle: () => toggle("secrets"), children: _jsx(SecretsSection, { focusKey: focusSecretKey }) })), shouldShowSection("hosting") && (_jsx(SettingsSection, { id: settingsSectionDomId("hosting"), icon: _jsx(IconCloud, { size: 14 }), title: "Hosting", subtitle: "Deploy your app to the cloud.", connected: connected, open: openSection === "hosting", onToggle: () => toggle("hosting"), children: _jsxs("div", { className: "space-y-2", children: [_jsx(UseBuilderCard, { builderFlow: builderFlow, connectUrl: connectUrl, connected: connected, orgName: orgName, envManaged: envManaged, credentialSource: credentialSource, trackingSource: "hosting_settings", trackingFlow: "hosting" }), _jsx(ManualSetupCard, { hint: "Deploy manually to Netlify, Vercel, Cloudflare, or any Nitro-supported target.", docsUrl: "https://www.builder.io/c/docs/agent-native-deployment", dim: connected })] }) })), shouldShowSection("database") && (_jsx(SettingsSection, { id: settingsSectionDomId("database"), icon: _jsx(IconDatabase, { size: 14 }), title: "Database", subtitle: "Connect a cloud database for persistent storage.", connected: connected, open: openSection === "database", onToggle: () => toggle("database"), children: _jsxs("div", { className: "space-y-2", children: [_jsx(UseBuilderCard, { builderFlow: builderFlow, connectUrl: connectUrl, connected: connected, orgName: orgName, envManaged: envManaged, credentialSource: credentialSource, trackingSource: "database_settings", trackingFlow: "database" }), _jsx(ManualSetupCard, { hint: "Set DATABASE_URL in your .env to connect Neon, Supabase, Turso, any Postgres/SQLite database, or local PGlite with pglite:./data/pglite.", docsUrl: "https://www.builder.io/c/docs/agent-native-database", dim: connected })] }) })), shouldShowSection("uploads") && (_jsx(SettingsSection, { id: settingsSectionDomId("uploads"), icon: _jsx(IconUpload, { size: 14 }), title: "File uploads", subtitle: "Where user-uploaded files (avatars, chat attachments) are stored.", connected: connected, open: openSection === "uploads", onToggle: () => toggle("uploads"), children: _jsxs("div", { className: "space-y-2", children: [_jsx(UseBuilderCard, { builderFlow: builderFlow, connectUrl: connectUrl, connected: connected, orgName: orgName, envManaged: envManaged, credentialSource: credentialSource, trackingSource: "file_upload_settings", trackingFlow: "file_upload" }), _jsx(ManualSetupCard, { hint: "Without a provider, files are stored as base64 in your database. Fine for dev, not recommended for production.", docsUrl: "https://www.builder.io/c/docs/agent-native-file-uploads", dim: connected })] }) })), shouldShowSection("auth") && (_jsx(SettingsSection, { id: settingsSectionDomId("auth"), icon: _jsx(IconShield, { size: 14 }), title: "Authentication", subtitle: "Set up user authentication and access control.", connected: connected, open: openSection === "auth", onToggle: () => toggle("auth"), children: _jsxs("div", { className: "space-y-2", children: [_jsx(UseBuilderCard, { builderFlow: builderFlow, connectUrl: connectUrl, connected: connected, orgName: orgName, envManaged: envManaged, credentialSource: credentialSource, trackingSource: "auth_settings", trackingFlow: "auth" }), _jsx(ManualSetupCard, { hint: "Configure Better Auth with BETTER_AUTH_SECRET and optional Google/GitHub OAuth providers.", docsUrl: "https://www.builder.io/c/docs/agent-native-authentication", dim: connected })] }) })), shouldShowSection("email") && (_jsx(EmailSectionInner, { open: openSection === "email", onToggle: () => toggle("email") })), shouldShowSection("browser") && (_jsx(SettingsSection, { id: settingsSectionDomId("browser"), icon: _jsx(IconBrowser, { size: 14 }), title: "Browser Automation", subtitle: "Let agents control a real browser for web tasks.", connected: connected, open: openSection === "browser", onToggle: () => toggle("browser"), children: _jsx(UseBuilderCard, { builderFlow: builderFlow, connectUrl: connectUrl, connected: connected, orgName: orgName, envManaged: envManaged, credentialSource: credentialSource, trackingSource: "browser_settings", trackingFlow: "browser_automation" }) })), builderBranchesAvailable && shouldShowSection("background") && (_jsx(SettingsSection, { id: settingsSectionDomId("background"), icon: _jsx(IconGitBranch, { size: 14 }), title: "Background Agent", subtitle: "Make code changes from production mode via Builder.", connected: connected, open: openSection === "background", onToggle: () => toggle("background"), children: _jsx(UseBuilderCard, { builderFlow: builderFlow, connectUrl: connectUrl, connected: connected, orgName: orgName, envManaged: envManaged, credentialSource: credentialSource, trackingSource: "background_agent_settings", trackingFlow: "background_agent" }) })), shouldShowSection("integrations") && (_jsx(SettingsSection, { id: settingsSectionDomId("integrations"), icon: _jsx(IconPlugConnected, { size: 14 }), title: "Integrations", subtitle: "Connect messaging platforms and external services.", open: openSection === "integrations", onToggle: () => toggle("integrations"), children: _jsx(Suspense, { fallback: null, children: _jsx(IntegrationsPanel, {}) }) })), shouldShowSection("usage") && (_jsx(SettingsSection, { id: settingsSectionDomId("usage"), icon: _jsx(IconCoin, { size: 14 }), title: "Usage", subtitle: "Track token consumption and estimated cost \u2014 broken down by chat, automations, and background jobs.", open: openSection === "usage", onToggle: () => toggle("usage"), children: _jsx(UsageSection, {}) })), shouldShowSection("a2a") && (_jsx(SettingsSection, { id: settingsSectionDomId("a2a"), icon: _jsx(IconTopologyRing2, { size: 14 }), title: "Connected Agents (A2A)", subtitle: "Manage remote agents connected via the A2A protocol.", open: openSection === "a2a", onToggle: () => toggle("a2a"), children: _jsx(AgentsSection, {}) }))] }) }));
|
|
1222
1070
|
}
|
|
1223
1071
|
export function SettingsPanel(props) {
|
|
1224
1072
|
return _jsx(SettingsPanelContent, { ...props });
|
|
@@ -1232,42 +1080,44 @@ export function useAgentSettingsTabs() {
|
|
|
1232
1080
|
},
|
|
1233
1081
|
showDevToggle: canToggle,
|
|
1234
1082
|
}), [canToggle, isDevMode, setDevMode]);
|
|
1235
|
-
return useMemo(() =>
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1083
|
+
return useMemo(() => {
|
|
1084
|
+
const searchTabs = getAgentSettingsSearchTabs();
|
|
1085
|
+
const searchTab = (id) => {
|
|
1086
|
+
const tab = searchTabs.find((candidate) => candidate.id === id);
|
|
1087
|
+
if (!tab)
|
|
1088
|
+
throw new Error(`Missing agent settings tab: ${id}`);
|
|
1089
|
+
return tab;
|
|
1090
|
+
};
|
|
1091
|
+
const agent = searchTab("agent");
|
|
1092
|
+
const connections = searchTab("connections");
|
|
1093
|
+
const organization = searchTab("organization");
|
|
1094
|
+
const workspace = searchTab("workspace");
|
|
1095
|
+
return [
|
|
1096
|
+
{
|
|
1097
|
+
...agent,
|
|
1098
|
+
icon: IconBrain,
|
|
1099
|
+
group: "agent",
|
|
1100
|
+
content: (_jsx(SettingsPanelContent, { ...baseProps, surface: "page", sections: AGENT_SETTINGS_SECTIONS, showCapabilityStrip: false, className: "mx-auto w-full max-w-2xl" })),
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
...connections,
|
|
1104
|
+
icon: IconPlugConnected,
|
|
1105
|
+
group: "agent",
|
|
1106
|
+
content: (_jsx(SettingsPanelContent, { ...baseProps, surface: "page", sections: CONNECTION_SETTINGS_SECTIONS, showCapabilityStrip: false, className: "mx-auto w-full max-w-2xl" })),
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
...organization,
|
|
1110
|
+
icon: IconUsersGroup,
|
|
1111
|
+
group: "workspace",
|
|
1112
|
+
content: (_jsx("div", { className: "mx-auto w-full max-w-2xl", children: _jsx(TeamPage, { showTitle: false }) })),
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
...workspace,
|
|
1116
|
+
icon: IconCloud,
|
|
1117
|
+
group: "workspace",
|
|
1118
|
+
content: (_jsx(SettingsPanelContent, { ...baseProps, surface: "page", sections: WORKSPACE_SETTINGS_SECTIONS, showCapabilityStrip: false, className: "mx-auto w-full max-w-2xl" })),
|
|
1119
|
+
},
|
|
1120
|
+
];
|
|
1121
|
+
}, [baseProps]);
|
|
1272
1122
|
}
|
|
1273
1123
|
//# sourceMappingURL=SettingsPanel.js.map
|