@agent-native/core 0.16.1 → 0.16.3
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/README.md +21 -5
- package/dist/cli/code-agent-executor.js +1 -1
- package/dist/cli/code-agent-executor.js.map +1 -1
- package/dist/cli/code.d.ts.map +1 -1
- package/dist/cli/code.js +29 -4
- package/dist/cli/code.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +9 -1
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.js +2 -2
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/ConnectBuilderCard.js +1 -1
- package/dist/client/ConnectBuilderCard.js.map +1 -1
- package/dist/client/components/CodeRequiredDialog.d.ts.map +1 -1
- package/dist/client/components/CodeRequiredDialog.js +3 -1
- package/dist/client/components/CodeRequiredDialog.js.map +1 -1
- package/dist/client/composer/AgentComposerFrame.d.ts +3 -1
- package/dist/client/composer/AgentComposerFrame.d.ts.map +1 -1
- package/dist/client/composer/AgentComposerFrame.js +3 -3
- package/dist/client/composer/AgentComposerFrame.js.map +1 -1
- package/dist/client/composer/ComposerPlusMenu.d.ts.map +1 -1
- package/dist/client/composer/ComposerPlusMenu.js +2 -7
- package/dist/client/composer/ComposerPlusMenu.js.map +1 -1
- package/dist/client/composer/PromptComposer.d.ts +4 -1
- package/dist/client/composer/PromptComposer.d.ts.map +1 -1
- package/dist/client/composer/PromptComposer.js +3 -3
- package/dist/client/composer/PromptComposer.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +13 -3
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/useVoiceDictation.d.ts.map +1 -1
- package/dist/client/composer/useVoiceDictation.js +16 -10
- package/dist/client/composer/useVoiceDictation.js.map +1 -1
- package/dist/client/onboarding/OnboardingPanel.js +1 -1
- package/dist/client/onboarding/OnboardingPanel.js.map +1 -1
- package/dist/client/settings/BackgroundAgentSection.d.ts.map +1 -1
- package/dist/client/settings/BackgroundAgentSection.js +9 -2
- package/dist/client/settings/BackgroundAgentSection.js.map +1 -1
- package/dist/client/settings/BrowserSection.d.ts.map +1 -1
- package/dist/client/settings/BrowserSection.js +17 -3
- package/dist/client/settings/BrowserSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +5 -5
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/useBuilderStatus.d.ts +15 -2
- package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
- package/dist/client/settings/useBuilderStatus.js +99 -11
- package/dist/client/settings/useBuilderStatus.js.map +1 -1
- package/dist/client/settings/useBuilderStatus.spec.js +12 -6
- package/dist/client/settings/useBuilderStatus.spec.js.map +1 -1
- package/dist/code-agents/background-controller.d.ts +39 -0
- package/dist/code-agents/background-controller.d.ts.map +1 -0
- package/dist/code-agents/background-controller.js +249 -0
- package/dist/code-agents/background-controller.js.map +1 -0
- package/dist/code-agents/background-run.d.ts +58 -0
- package/dist/code-agents/background-run.d.ts.map +1 -0
- package/dist/code-agents/background-run.js +58 -0
- package/dist/code-agents/background-run.js.map +1 -0
- package/dist/code-agents/index.d.ts +2 -0
- package/dist/code-agents/index.d.ts.map +1 -1
- package/dist/code-agents/index.js +2 -0
- package/dist/code-agents/index.js.map +1 -1
- package/dist/connections/index.d.ts +1 -0
- package/dist/connections/index.d.ts.map +1 -1
- package/dist/connections/index.js +1 -0
- package/dist/connections/index.js.map +1 -1
- package/dist/connections/reader.d.ts +248 -0
- package/dist/connections/reader.d.ts.map +1 -0
- package/dist/connections/reader.js +461 -0
- package/dist/connections/reader.js.map +1 -0
- package/dist/credentials/index.d.ts +11 -0
- package/dist/credentials/index.d.ts.map +1 -1
- package/dist/credentials/index.js +40 -15
- package/dist/credentials/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +18 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +57 -9
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-teams.d.ts +66 -1
- package/dist/server/agent-teams.d.ts.map +1 -1
- package/dist/server/agent-teams.js +433 -16
- package/dist/server/agent-teams.js.map +1 -1
- package/dist/server/builder-browser.d.ts +11 -0
- package/dist/server/builder-browser.d.ts.map +1 -1
- package/dist/server/builder-browser.js +45 -0
- package/dist/server/builder-browser.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +25 -2
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/templates/workspace-root/AGENTS.md +5 -5
- package/dist/templates/workspace-root/README.md +1 -1
- package/dist/workspace-connections/credentials.d.ts +64 -0
- package/dist/workspace-connections/credentials.d.ts.map +1 -0
- package/dist/workspace-connections/credentials.js +378 -0
- package/dist/workspace-connections/credentials.js.map +1 -0
- package/dist/workspace-connections/index.d.ts +2 -1
- package/dist/workspace-connections/index.d.ts.map +1 -1
- package/dist/workspace-connections/index.js +2 -1
- package/dist/workspace-connections/index.js.map +1 -1
- package/dist/workspace-connections/store.d.ts +16 -0
- package/dist/workspace-connections/store.d.ts.map +1 -1
- package/dist/workspace-connections/store.js +57 -1
- package/dist/workspace-connections/store.js.map +1 -1
- package/docs/content/agent-teams.md +22 -5
- package/docs/content/cloneable-saas.md +2 -2
- package/docs/content/code-agents-ui.md +103 -3
- package/docs/content/creating-templates.md +16 -0
- package/docs/content/getting-started.md +40 -14
- package/docs/content/migration-workbench.md +25 -2
- package/docs/content/multi-app-workspace.md +1 -1
- package/docs/content/template-analytics.md +17 -1
- package/docs/content/template-brain.md +57 -28
- package/docs/content/template-dispatch.md +9 -2
- package/docs/content/workspace-connections.md +63 -14
- package/docs/content/workspace-management.md +9 -2
- package/docs/content/workspace.md +12 -5
- package/package.json +1 -1
- package/src/templates/workspace-root/AGENTS.md +5 -5
- package/src/templates/workspace-root/README.md +1 -1
|
@@ -3,13 +3,19 @@ import { agentNativePath } from "../api-path.js";
|
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { IconGitBranch, IconCheck, IconExternalLink, IconLoader2, } from "@tabler/icons-react";
|
|
5
5
|
import { SettingsSection } from "./SettingsSection.js";
|
|
6
|
-
import { useBuilderStatus } from "./useBuilderStatus.js";
|
|
6
|
+
import { useBuilderStatus, withBuilderConnectTrackingParams, } from "./useBuilderStatus.js";
|
|
7
7
|
import { trackEvent } from "../analytics.js";
|
|
8
8
|
export function BackgroundAgentSection() {
|
|
9
9
|
const { status: builder } = useBuilderStatus();
|
|
10
10
|
const connected = builder?.configured ?? false;
|
|
11
11
|
const cloudAgentsAvailable = !!builder?.builderEnabled;
|
|
12
12
|
const builderConnectUrl = builder?.cliAuthUrl ?? builder?.connectUrl;
|
|
13
|
+
const builderConnectHref = builderConnectUrl
|
|
14
|
+
? withBuilderConnectTrackingParams(builderConnectUrl, {
|
|
15
|
+
source: "background_agent_settings",
|
|
16
|
+
flow: "background_agent",
|
|
17
|
+
})
|
|
18
|
+
: null;
|
|
13
19
|
const [projectUrl, setProjectUrl] = useState("");
|
|
14
20
|
const [running, setRunning] = useState(false);
|
|
15
21
|
const [result, setResult] = useState(null);
|
|
@@ -42,11 +48,12 @@ export function BackgroundAgentSection() {
|
|
|
42
48
|
setRunning(false);
|
|
43
49
|
}
|
|
44
50
|
};
|
|
45
|
-
return (_jsx(SettingsSection, { icon: _jsx(IconGitBranch, { size: 14 }), title: "Background Agent", subtitle: "Make code changes from production mode. Builder creates a branch, the agent makes changes, and you get a preview URL.", connected: connected, children: !connected ? (_jsxs("div", { className: "space-y-2", children: [_jsx("p", { className: "text-[10px] text-muted-foreground", children: "Connect Builder to enable code changes from production. The agent will create branches and provide preview URLs." }),
|
|
51
|
+
return (_jsx(SettingsSection, { icon: _jsx(IconGitBranch, { size: 14 }), title: "Background Agent", subtitle: "Make code changes from production mode. Builder creates a branch, the agent makes changes, and you get a preview URL.", connected: connected, children: !connected ? (_jsxs("div", { className: "space-y-2", children: [_jsx("p", { className: "text-[10px] text-muted-foreground", children: "Connect Builder to enable code changes from production. The agent will create branches and provide preview URLs." }), builderConnectHref && (_jsxs("a", { href: builderConnectHref, target: "_blank", rel: "noreferrer", onClick: () => {
|
|
46
52
|
trackEvent("builder connect clicked", {
|
|
47
53
|
feature: "builder",
|
|
48
54
|
stage: "client",
|
|
49
55
|
source: "background_agent_settings",
|
|
56
|
+
flow: "background_agent",
|
|
50
57
|
connect_url_kind: "provided",
|
|
51
58
|
});
|
|
52
59
|
}, className: "inline-flex items-center gap-1 rounded bg-accent px-2 py-1 text-[10px] font-medium text-foreground hover:bg-accent/80", children: ["Connect Builder", _jsx(IconExternalLink, { size: 10 })] }))] })) : !cloudAgentsAvailable ? (_jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-muted-foreground", children: [_jsx(IconCheck, { size: 10 }), "Builder connected", builder?.orgName && (_jsxs("span", { className: "text-muted-foreground", children: ["(", builder.orgName, ")"] }))] }), _jsx("p", { className: "text-[10px] text-muted-foreground", children: "You don't have access to Builder Cloud Agents for this workspace yet; they are not enabled from Builder org settings. Use the desktop app or your local clone for code changes." }), _jsxs("a", { href: "https://www.agent-native.com/download", target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center gap-1 rounded bg-accent px-2 py-1 text-[10px] font-medium text-foreground hover:bg-accent/80", children: ["Download desktop app", _jsx(IconExternalLink, { size: 10 })] })] })) : (_jsxs("div", { className: "space-y-2.5", children: [_jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-green-500", children: [_jsx(IconCheck, { size: 10 }), "Builder connected", builder?.orgName && (_jsxs("span", { className: "text-muted-foreground", children: ["(", builder.orgName, ")"] }))] }), _jsxs("div", { children: [_jsx("label", { className: "text-[10px] font-medium text-foreground block mb-1", children: "Builder Project URL or ID" }), _jsxs("div", { className: "flex gap-1.5", children: [_jsx("input", { type: "text", value: projectUrl, onChange: (e) => setProjectUrl(e.target.value), onKeyDown: (e) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackgroundAgentSection.js","sourceRoot":"","sources":["../../../src/client/settings/BackgroundAgentSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EACL,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAS7C,MAAM,UAAU,sBAAsB;IACpC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAC/C,MAAM,SAAS,GAAG,OAAO,EAAE,UAAU,IAAI,KAAK,CAAC;IAC/C,MAAM,oBAAoB,GAAG,CAAC,CAAC,OAAO,EAAE,cAAc,CAAC;IACvD,MAAM,iBAAiB,GAAG,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,UAAU,CAAC;IAErE,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACjD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAyB,IAAI,CAAC,CAAC;IACnE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAExD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,gBAAO,SAAS,EAAC,oDAAoD,0CAE7D,EACR,eAAK,SAAS,EAAC,cAAc,aAC3B,gBACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC9C,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE;wCACf,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO;4CAAE,kBAAkB,EAAE,CAAC;oCAC9C,CAAC,EACD,WAAW,EAAC,qCAAqC,EACjD,SAAS,EAAC,0KAA0K,GACpL,EACF,iBACE,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,OAAO,EACvC,SAAS,EAAC,4GAA4G,YAErH,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,WAAW,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,cAAc,GAAG,CACnD,CAAC,CAAC,CAAC,CACF,eAAe,CAChB,GACM,IACL,IACF,EAEL,MAAM,IAAI,CACT,eAAK,SAAS,EAAC,mEAAmE,aAChF,cAAK,SAAS,EAAC,6CAA6C,+BAEtD,EACN,aACE,IAAI,EAAE,MAAM,CAAC,GAAG,EAChB,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAC,qEAAqE,aAE9E,MAAM,CAAC,GAAG,EACX,KAAC,gBAAgB,IAAC,IAAI,EAAE,EAAE,GAAI,IAC5B,IACA,CACP,EAEA,KAAK,IAAI,YAAG,SAAS,EAAC,0BAA0B,YAAE,KAAK,GAAK,IACzD,CACP,GACe,CACnB,CAAC;AACJ,CAAC","sourcesContent":["import { agentNativePath } from \"../api-path.js\";\nimport { useState } from \"react\";\nimport {\n IconGitBranch,\n IconCheck,\n IconExternalLink,\n IconLoader2,\n} from \"@tabler/icons-react\";\nimport { SettingsSection } from \"./SettingsSection.js\";\nimport { useBuilderStatus } from \"./useBuilderStatus.js\";\nimport { trackEvent } from \"../analytics.js\";\n\ninterface AgentsRunResult {\n branchName: string | null;\n projectId: string;\n url: string;\n status: string;\n}\n\nexport function BackgroundAgentSection() {\n const { status: builder } = useBuilderStatus();\n const connected = builder?.configured ?? false;\n const cloudAgentsAvailable = !!builder?.builderEnabled;\n const builderConnectUrl = builder?.cliAuthUrl ?? builder?.connectUrl;\n\n const [projectUrl, setProjectUrl] = useState(\"\");\n const [running, setRunning] = useState(false);\n const [result, setResult] = useState<AgentsRunResult | null>(null);\n const [error, setError] = useState<string | null>(null);\n\n const handleCreateBranch = async () => {\n if (!projectUrl.trim()) return;\n setRunning(true);\n setError(null);\n setResult(null);\n try {\n const res = await fetch(\n agentNativePath(\"/_agent-native/builder/agents-run\"),\n {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n userMessage: \"Set up this project for development\",\n projectUrl: projectUrl.trim(),\n }),\n },\n );\n if (!res.ok) {\n const body = await res.json().catch(() => ({}));\n throw new Error(body?.error || `Failed (${res.status})`);\n }\n setResult(await res.json());\n } catch (err: any) {\n setError(err?.message || \"Failed to create branch\");\n } finally {\n setRunning(false);\n }\n };\n\n return (\n <SettingsSection\n icon={<IconGitBranch size={14} />}\n title=\"Background Agent\"\n subtitle=\"Make code changes from production mode. Builder creates a branch, the agent makes changes, and you get a preview URL.\"\n connected={connected}\n >\n {!connected ? (\n <div className=\"space-y-2\">\n <p className=\"text-[10px] text-muted-foreground\">\n Connect Builder to enable code changes from production. The agent\n will create branches and provide preview URLs.\n </p>\n {builderConnectUrl && (\n <a\n href={builderConnectUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={() => {\n trackEvent(\"builder connect clicked\", {\n feature: \"builder\",\n stage: \"client\",\n source: \"background_agent_settings\",\n connect_url_kind: \"provided\",\n });\n }}\n className=\"inline-flex items-center gap-1 rounded bg-accent px-2 py-1 text-[10px] font-medium text-foreground hover:bg-accent/80\"\n >\n Connect Builder\n <IconExternalLink size={10} />\n </a>\n )}\n </div>\n ) : !cloudAgentsAvailable ? (\n <div className=\"space-y-2\">\n <div className=\"flex items-center gap-1.5 text-[10px] text-muted-foreground\">\n <IconCheck size={10} />\n Builder connected\n {builder?.orgName && (\n <span className=\"text-muted-foreground\">({builder.orgName})</span>\n )}\n </div>\n <p className=\"text-[10px] text-muted-foreground\">\n You don't have access to Builder Cloud Agents for this workspace\n yet; they are not enabled from Builder org settings. Use the desktop\n app or your local clone for code changes.\n </p>\n <a\n href=\"https://www.agent-native.com/download\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 rounded bg-accent px-2 py-1 text-[10px] font-medium text-foreground hover:bg-accent/80\"\n >\n Download desktop app\n <IconExternalLink size={10} />\n </a>\n </div>\n ) : (\n <div className=\"space-y-2.5\">\n <div className=\"flex items-center gap-1.5 text-[10px] text-green-500\">\n <IconCheck size={10} />\n Builder connected\n {builder?.orgName && (\n <span className=\"text-muted-foreground\">({builder.orgName})</span>\n )}\n </div>\n\n <div>\n <label className=\"text-[10px] font-medium text-foreground block mb-1\">\n Builder Project URL or ID\n </label>\n <div className=\"flex gap-1.5\">\n <input\n type=\"text\"\n value={projectUrl}\n onChange={(e) => setProjectUrl(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === \"Enter\") handleCreateBranch();\n }}\n placeholder=\"https://builder.io/app/projects/...\"\n className=\"flex-1 rounded border border-border bg-background px-2 py-1 text-[11px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-accent\"\n />\n <button\n onClick={handleCreateBranch}\n disabled={!projectUrl.trim() || running}\n className=\"rounded bg-accent px-2 py-1 text-[10px] font-medium text-foreground hover:bg-accent/80 disabled:opacity-40\"\n >\n {running ? (\n <IconLoader2 size={10} className=\"animate-spin\" />\n ) : (\n \"Create branch\"\n )}\n </button>\n </div>\n </div>\n\n {result && (\n <div className=\"rounded-md border border-green-800/40 bg-green-900/10 px-2.5 py-2\">\n <div className=\"text-[10px] font-medium text-green-400 mb-1\">\n Branch created\n </div>\n <a\n href={result.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-1 text-[10px] text-foreground hover:underline\"\n >\n {result.url}\n <IconExternalLink size={10} />\n </a>\n </div>\n )}\n\n {error && <p className=\"text-[10px] text-red-400\">{error}</p>}\n </div>\n )}\n </SettingsSection>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BackgroundAgentSection.js","sourceRoot":"","sources":["../../../src/client/settings/BackgroundAgentSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EACL,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,gBAAgB,EAChB,gCAAgC,GACjC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAS7C,MAAM,UAAU,sBAAsB;IACpC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAC/C,MAAM,SAAS,GAAG,OAAO,EAAE,UAAU,IAAI,KAAK,CAAC;IAC/C,MAAM,oBAAoB,GAAG,CAAC,CAAC,OAAO,EAAE,cAAc,CAAC;IACvD,MAAM,iBAAiB,GAAG,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,UAAU,CAAC;IACrE,MAAM,kBAAkB,GAAG,iBAAiB;QAC1C,CAAC,CAAC,gCAAgC,CAAC,iBAAiB,EAAE;YAClD,MAAM,EAAE,2BAA2B;YACnC,IAAI,EAAE,kBAAkB;SACzB,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,CAAC,UAAU,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AAC,GAAG,EACX,KAAC,gBAAgB,IAAC,IAAI,EAAE,EAAE,GAAI,IAC5B,IACA,CACP,EAEA,KAAK,IAAI,YAAG,SAAS,EAAC,0BAA0B,YAAE,KAAK,GAAK,IACzD,CACP,GACe,CACnB,CAAC;AACJ,CAAC","sourcesContent":["import { agentNativePath } from \"../api-path.js\";\nimport { useState } from \"react\";\nimport {\n IconGitBranch,\n IconCheck,\n IconExternalLink,\n IconLoader2,\n} from \"@tabler/icons-react\";\nimport { SettingsSection } from \"./SettingsSection.js\";\nimport {\n useBuilderStatus,\n withBuilderConnectTrackingParams,\n} from \"./useBuilderStatus.js\";\nimport { trackEvent } from \"../analytics.js\";\n\ninterface AgentsRunResult {\n branchName: string | null;\n projectId: string;\n url: string;\n status: string;\n}\n\nexport function BackgroundAgentSection() {\n const { status: builder } = useBuilderStatus();\n const connected = builder?.configured ?? false;\n const cloudAgentsAvailable = !!builder?.builderEnabled;\n const builderConnectUrl = builder?.cliAuthUrl ?? builder?.connectUrl;\n const builderConnectHref = builderConnectUrl\n ? withBuilderConnectTrackingParams(builderConnectUrl, {\n source: \"background_agent_settings\",\n flow: \"background_agent\",\n })\n : null;\n\n const [projectUrl, setProjectUrl] = useState(\"\");\n const [running, setRunning] = useState(false);\n const [result, setResult] = useState<AgentsRunResult | null>(null);\n const [error, setError] = useState<string | null>(null);\n\n const handleCreateBranch = async () => {\n if (!projectUrl.trim()) return;\n setRunning(true);\n setError(null);\n setResult(null);\n try {\n const res = await fetch(\n agentNativePath(\"/_agent-native/builder/agents-run\"),\n {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n userMessage: \"Set up this project for development\",\n projectUrl: projectUrl.trim(),\n }),\n },\n );\n if (!res.ok) {\n const body = await res.json().catch(() => ({}));\n throw new Error(body?.error || `Failed (${res.status})`);\n }\n setResult(await res.json());\n } catch (err: any) {\n setError(err?.message || \"Failed to create branch\");\n } finally {\n setRunning(false);\n }\n };\n\n return (\n <SettingsSection\n icon={<IconGitBranch size={14} />}\n title=\"Background Agent\"\n subtitle=\"Make code changes from production mode. Builder creates a branch, the agent makes changes, and you get a preview URL.\"\n connected={connected}\n >\n {!connected ? (\n <div className=\"space-y-2\">\n <p className=\"text-[10px] text-muted-foreground\">\n Connect Builder to enable code changes from production. The agent\n will create branches and provide preview URLs.\n </p>\n {builderConnectHref && (\n <a\n href={builderConnectHref}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={() => {\n trackEvent(\"builder connect clicked\", {\n feature: \"builder\",\n stage: \"client\",\n source: \"background_agent_settings\",\n flow: \"background_agent\",\n connect_url_kind: \"provided\",\n });\n }}\n className=\"inline-flex items-center gap-1 rounded bg-accent px-2 py-1 text-[10px] font-medium text-foreground hover:bg-accent/80\"\n >\n Connect Builder\n <IconExternalLink size={10} />\n </a>\n )}\n </div>\n ) : !cloudAgentsAvailable ? (\n <div className=\"space-y-2\">\n <div className=\"flex items-center gap-1.5 text-[10px] text-muted-foreground\">\n <IconCheck size={10} />\n Builder connected\n {builder?.orgName && (\n <span className=\"text-muted-foreground\">({builder.orgName})</span>\n )}\n </div>\n <p className=\"text-[10px] text-muted-foreground\">\n You don't have access to Builder Cloud Agents for this workspace\n yet; they are not enabled from Builder org settings. Use the desktop\n app or your local clone for code changes.\n </p>\n <a\n href=\"https://www.agent-native.com/download\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 rounded bg-accent px-2 py-1 text-[10px] font-medium text-foreground hover:bg-accent/80\"\n >\n Download desktop app\n <IconExternalLink size={10} />\n </a>\n </div>\n ) : (\n <div className=\"space-y-2.5\">\n <div className=\"flex items-center gap-1.5 text-[10px] text-green-500\">\n <IconCheck size={10} />\n Builder connected\n {builder?.orgName && (\n <span className=\"text-muted-foreground\">({builder.orgName})</span>\n )}\n </div>\n\n <div>\n <label className=\"text-[10px] font-medium text-foreground block mb-1\">\n Builder Project URL or ID\n </label>\n <div className=\"flex gap-1.5\">\n <input\n type=\"text\"\n value={projectUrl}\n onChange={(e) => setProjectUrl(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === \"Enter\") handleCreateBranch();\n }}\n placeholder=\"https://builder.io/app/projects/...\"\n className=\"flex-1 rounded border border-border bg-background px-2 py-1 text-[11px] text-foreground outline-none placeholder:text-muted-foreground/50 focus:ring-1 focus:ring-accent\"\n />\n <button\n onClick={handleCreateBranch}\n disabled={!projectUrl.trim() || running}\n className=\"rounded bg-accent px-2 py-1 text-[10px] font-medium text-foreground hover:bg-accent/80 disabled:opacity-40\"\n >\n {running ? (\n <IconLoader2 size={10} className=\"animate-spin\" />\n ) : (\n \"Create branch\"\n )}\n </button>\n </div>\n </div>\n\n {result && (\n <div className=\"rounded-md border border-green-800/40 bg-green-900/10 px-2.5 py-2\">\n <div className=\"text-[10px] font-medium text-green-400 mb-1\">\n Branch created\n </div>\n <a\n href={result.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-1 text-[10px] text-foreground hover:underline\"\n >\n {result.url}\n <IconExternalLink size={10} />\n </a>\n </div>\n )}\n\n {error && <p className=\"text-[10px] text-red-400\">{error}</p>}\n </div>\n )}\n </SettingsSection>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserSection.d.ts","sourceRoot":"","sources":["../../../src/client/settings/BrowserSection.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BrowserSection.d.ts","sourceRoot":"","sources":["../../../src/client/settings/BrowserSection.tsx"],"names":[],"mappings":"AAaA,wBAAgB,cAAc,4CA+F7B"}
|
|
@@ -1,24 +1,38 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { IconBrowser, IconCheck, IconExternalLink, IconLoader2, } from "@tabler/icons-react";
|
|
3
3
|
import { SettingsSection } from "./SettingsSection.js";
|
|
4
|
-
import { useBuilderStatus } from "./useBuilderStatus.js";
|
|
4
|
+
import { useBuilderStatus, withBuilderConnectTrackingParams, } from "./useBuilderStatus.js";
|
|
5
5
|
import { trackEvent } from "../analytics.js";
|
|
6
6
|
export function BrowserSection() {
|
|
7
7
|
const { status: builder, loading } = useBuilderStatus();
|
|
8
8
|
const connected = builder?.configured ?? false;
|
|
9
9
|
const builderConnectUrl = builder?.cliAuthUrl ?? builder?.connectUrl;
|
|
10
|
-
|
|
10
|
+
const builderConnectHref = builderConnectUrl
|
|
11
|
+
? withBuilderConnectTrackingParams(builderConnectUrl, {
|
|
12
|
+
source: "browser_settings",
|
|
13
|
+
flow: "browser_automation",
|
|
14
|
+
})
|
|
15
|
+
: null;
|
|
16
|
+
const builderReconnectHref = builderConnectUrl
|
|
17
|
+
? withBuilderConnectTrackingParams(builderConnectUrl, {
|
|
18
|
+
source: "browser_settings_reconnect",
|
|
19
|
+
flow: "browser_automation",
|
|
20
|
+
})
|
|
21
|
+
: null;
|
|
22
|
+
return (_jsx(SettingsSection, { icon: _jsx(IconBrowser, { size: 14 }), title: "Browser Automation", subtitle: "Let agents control a real browser for web tasks. Requires Builder connection.", connected: connected, children: loading ? (_jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-muted-foreground", children: [_jsx(IconLoader2, { size: 10, className: "animate-spin" }), "Checking Builder connection..."] })) : connected ? (_jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center gap-1.5 text-[10px] text-green-500", children: [_jsx(IconCheck, { size: 10 }), "Browser access enabled", builder?.orgName && (_jsxs("span", { className: "text-muted-foreground", children: ["(", builder.orgName, ")"] }))] }), _jsxs("p", { className: "text-[10px] text-muted-foreground", children: ["Agents can request live browser sessions via", " ", _jsx("code", { className: "rounded bg-muted px-1 py-0.5 text-[9px]", children: "connect-builder" })] }), builderReconnectHref && (_jsxs("a", { href: builderReconnectHref, target: "_blank", rel: "noreferrer", onClick: () => {
|
|
11
23
|
trackEvent("builder connect clicked", {
|
|
12
24
|
feature: "builder",
|
|
13
25
|
stage: "client",
|
|
14
26
|
source: "browser_settings_reconnect",
|
|
27
|
+
flow: "browser_automation",
|
|
15
28
|
connect_url_kind: "provided",
|
|
16
29
|
});
|
|
17
|
-
}, className: "inline-flex items-center gap-1 rounded border border-border px-2 py-0.5 text-[10px] text-muted-foreground hover:text-foreground hover:bg-accent/40", children: ["Reconnect", _jsx(IconExternalLink, { size: 10 })] }))] })) : (_jsxs("div", { className: "space-y-2", children: [_jsx("p", { className: "text-[10px] text-muted-foreground", children: "Connect Builder to provision browser sessions without wiring browser setup into every app." }),
|
|
30
|
+
}, className: "inline-flex items-center gap-1 rounded border border-border px-2 py-0.5 text-[10px] text-muted-foreground hover:text-foreground hover:bg-accent/40", children: ["Reconnect", _jsx(IconExternalLink, { size: 10 })] }))] })) : (_jsxs("div", { className: "space-y-2", children: [_jsx("p", { className: "text-[10px] text-muted-foreground", children: "Connect Builder to provision browser sessions without wiring browser setup into every app." }), builderConnectHref && (_jsxs("a", { href: builderConnectHref, target: "_blank", rel: "noreferrer", onClick: () => {
|
|
18
31
|
trackEvent("builder connect clicked", {
|
|
19
32
|
feature: "builder",
|
|
20
33
|
stage: "client",
|
|
21
34
|
source: "browser_settings",
|
|
35
|
+
flow: "browser_automation",
|
|
22
36
|
connect_url_kind: "provided",
|
|
23
37
|
});
|
|
24
38
|
}, className: "inline-flex items-center gap-1 rounded bg-accent px-2 py-1 text-[10px] font-medium text-foreground hover:bg-accent/80", children: ["Connect Builder", _jsx(IconExternalLink, { size: 10 })] }))] })) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserSection.js","sourceRoot":"","sources":["../../../src/client/settings/BrowserSection.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,
|
|
1
|
+
{"version":3,"file":"BrowserSection.js","sourceRoot":"","s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AAC,IAAI,EAAE,EAAE,GAAI,IAC5B,CACL,IACG,CACP,GACe,CACnB,CAAC;AACJ,CAAC","sourcesContent":["import {\n IconBrowser,\n IconCheck,\n IconExternalLink,\n IconLoader2,\n} from \"@tabler/icons-react\";\nimport { SettingsSection } from \"./SettingsSection.js\";\nimport {\n useBuilderStatus,\n withBuilderConnectTrackingParams,\n} from \"./useBuilderStatus.js\";\nimport { trackEvent } from \"../analytics.js\";\n\nexport function BrowserSection() {\n const { status: builder, loading } = useBuilderStatus();\n const connected = builder?.configured ?? false;\n const builderConnectUrl = builder?.cliAuthUrl ?? builder?.connectUrl;\n const builderConnectHref = builderConnectUrl\n ? withBuilderConnectTrackingParams(builderConnectUrl, {\n source: \"browser_settings\",\n flow: \"browser_automation\",\n })\n : null;\n const builderReconnectHref = builderConnectUrl\n ? withBuilderConnectTrackingParams(builderConnectUrl, {\n source: \"browser_settings_reconnect\",\n flow: \"browser_automation\",\n })\n : null;\n\n return (\n <SettingsSection\n icon={<IconBrowser size={14} />}\n title=\"Browser Automation\"\n subtitle=\"Let agents control a real browser for web tasks. Requires Builder connection.\"\n connected={connected}\n >\n {loading ? (\n <div className=\"flex items-center gap-1.5 text-[10px] text-muted-foreground\">\n <IconLoader2 size={10} className=\"animate-spin\" />\n Checking Builder connection...\n </div>\n ) : connected ? (\n <div className=\"space-y-2\">\n <div className=\"flex items-center gap-1.5 text-[10px] text-green-500\">\n <IconCheck size={10} />\n Browser access enabled\n {builder?.orgName && (\n <span className=\"text-muted-foreground\">({builder.orgName})</span>\n )}\n </div>\n <p className=\"text-[10px] text-muted-foreground\">\n Agents can request live browser sessions via{\" \"}\n <code className=\"rounded bg-muted px-1 py-0.5 text-[9px]\">\n connect-builder\n </code>\n </p>\n {builderReconnectHref && (\n <a\n href={builderReconnectHref}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={() => {\n trackEvent(\"builder connect clicked\", {\n feature: \"builder\",\n stage: \"client\",\n source: \"browser_settings_reconnect\",\n flow: \"browser_automation\",\n connect_url_kind: \"provided\",\n });\n }}\n className=\"inline-flex items-center gap-1 rounded border border-border px-2 py-0.5 text-[10px] text-muted-foreground hover:text-foreground hover:bg-accent/40\"\n >\n Reconnect\n <IconExternalLink size={10} />\n </a>\n )}\n </div>\n ) : (\n <div className=\"space-y-2\">\n <p className=\"text-[10px] text-muted-foreground\">\n Connect Builder to provision browser sessions without wiring browser\n setup into every app.\n </p>\n {builderConnectHref && (\n <a\n href={builderConnectHref}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={() => {\n trackEvent(\"builder connect clicked\", {\n feature: \"builder\",\n stage: \"client\",\n source: \"browser_settings\",\n flow: \"browser_automation\",\n connect_url_kind: \"provided\",\n });\n }}\n className=\"inline-flex items-center gap-1 rounded bg-accent px-2 py-1 text-[10px] font-medium text-foreground hover:bg-accent/80\"\n >\n Connect Builder\n <IconExternalLink size={10} />\n </a>\n )}\n </div>\n )}\n </SettingsSection>\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsPanel.d.ts","sourceRoot":"","sources":["../../../src/client/settings/SettingsPanel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SettingsPanel.d.ts","sourceRoot":"","sources":["../../../src/client/settings/SettingsPanel.tsx"],"names":[],"mappings":"AAqyDA,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;AAoRD,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,eAAe,EACf,aAAa,EACb,SAAS,EACT,cAAc,EACd,iBAAiB,GAClB,EAAE,kBAAkB,2CA6XpB"}
|
|
@@ -128,14 +128,14 @@ function DisconnectBuilderButton() {
|
|
|
128
128
|
return (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", onClick: handleDisconnectClick, disabled: phase === "busy", className: "inline-flex items-center gap-1 rounded border border-border px-2 py-0.5 text-[10px] text-muted-foreground hover:text-foreground hover:bg-accent/40 disabled:opacity-60 disabled:cursor-wait", "aria-busy": phase === "busy", children: phase === "busy" ? (_jsxs(_Fragment, { children: [_jsx(IconLoader2, { size: 10, className: "animate-spin" }), "Disconnecting\u2026"] })) : ("Disconnect") }), err && _jsx("span", { className: "text-[10px] text-destructive", children: err })] }));
|
|
129
129
|
}
|
|
130
130
|
// ─── "Connect Builder.io" card (shared across all sections) ─────────────────
|
|
131
|
-
function UseBuilderCard({ builderFlow, connectUrl, connected, orgName, envManaged, credentialSource, label = "Connect Builder.io", subtitle = "Free credits to start — no API key needed.", dim, }) {
|
|
131
|
+
function UseBuilderCard({ builderFlow, connectUrl, connected, orgName, envManaged, credentialSource, trackingSource = "settings_panel_builder_card", trackingFlow = "connect_llm", label = "Connect Builder.io", subtitle = "Free credits to start — no API key needed.", dim, }) {
|
|
132
132
|
const effectiveConnected = connected || builderFlow.configured;
|
|
133
133
|
const effectiveOrgName = builderFlow.orgName ?? orgName;
|
|
134
134
|
const bgClass = dim ? "" : "bg-accent/30";
|
|
135
135
|
if (effectiveConnected) {
|
|
136
136
|
return (_jsxs("div", { className: `rounded-md border border-border px-2.5 py-2 ${bgClass}`, children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("div", { className: "text-[11px] font-medium text-foreground", children: "Builder.io" }), _jsxs("span", { className: "flex items-center gap-1 text-[10px] text-green-500", children: [_jsx(IconCheck, { size: 10 }), "Connected"] })] }), effectiveOrgName && (_jsx("p", { className: "text-[10px] text-muted-foreground mt-0.5", children: effectiveOrgName })), envManaged ? (_jsx("p", { className: "text-[10px] text-muted-foreground mt-1", children: credentialSource === "env"
|
|
137
137
|
? "Deployment fallback is available. Connect your own account to override it."
|
|
138
|
-
: "Using your connected Builder account. Deployment fallback is still available." })) : null, connectUrl || credentialSource !== "env" ? (_jsxs("div", { className: "flex items-center gap-2 mt-2.5", children: [connectUrl && (_jsxs("button", { type: "button", onClick: builderFlow.start, disabled: builderFlow.connecting, className: "inline-flex items-center gap-1 rounded border border-border px-2 py-0.5 text-[10px] no-underline text-muted-foreground hover:text-foreground hover:bg-accent/40 disabled:opacity-60", children: [builderFlow.connecting
|
|
138
|
+
: "Using your connected Builder account. Deployment fallback is still available." })) : null, connectUrl || credentialSource !== "env" ? (_jsxs("div", { className: "flex items-center gap-2 mt-2.5", children: [connectUrl && (_jsxs("button", { type: "button", onClick: () => builderFlow.start({ trackingSource, trackingFlow }), disabled: builderFlow.connecting, className: "inline-flex items-center gap-1 rounded border border-border px-2 py-0.5 text-[10px] no-underline text-muted-foreground hover:text-foreground hover:bg-accent/40 disabled:opacity-60", children: [builderFlow.connecting
|
|
139
139
|
? "Connecting..."
|
|
140
140
|
: credentialSource === "env"
|
|
141
141
|
? "Connect account"
|
|
@@ -143,7 +143,7 @@ function UseBuilderCard({ builderFlow, connectUrl, connected, orgName, envManage
|
|
|
143
143
|
}
|
|
144
144
|
if (!connectUrl)
|
|
145
145
|
return null;
|
|
146
|
-
return (_jsx("button", { type: "button", onClick: builderFlow.start, disabled: builderFlow.connecting, className: `block w-full rounded-md border border-border px-3 py-3 text-left no-underline bg-gradient-to-br from-teal-500/10 via-transparent to-transparent hover:border-foreground/30 transition-colors disabled:cursor-wait disabled:opacity-70`, children: _jsxs("div", { className: "flex items-start gap-2.5", children: [_jsx("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-foreground text-background", children: _jsx(BuilderBMark, { className: "h-3.5 w-3.5" }) }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsxs("div", { className: "flex items-center gap-1.5 flex-wrap", children: [_jsx("span", { className: "text-[12px] font-semibold text-foreground", children: builderFlow.connecting ? "Connecting Builder.io..." : label }), builderFlow.connecting && (_jsx(IconLoader2, { size: 12, className: "shrink-0 animate-spin text-muted-foreground" }))] }), _jsx("p", { className: "text-[10.5px] text-muted-foreground mt-0.5 leading-snug", children: subtitle }), builderFlow.error && (_jsx("p", { className: "mt-1 text-[10px] text-destructive", children: builderFlow.error }))] }), _jsx(IconExternalLink, { size: 12, className: "shrink-0 text-muted-foreground mt-0.5" })] }) }));
|
|
146
|
+
return (_jsx("button", { type: "button", onClick: () => builderFlow.start({ trackingSource, trackingFlow }), disabled: builderFlow.connecting, className: `block w-full rounded-md border border-border px-3 py-3 text-left no-underline bg-gradient-to-br from-teal-500/10 via-transparent to-transparent hover:border-foreground/30 transition-colors disabled:cursor-wait disabled:opacity-70`, children: _jsxs("div", { className: "flex items-start gap-2.5", children: [_jsx("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md bg-foreground text-background", children: _jsx(BuilderBMark, { className: "h-3.5 w-3.5" }) }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsxs("div", { className: "flex items-center gap-1.5 flex-wrap", children: [_jsx("span", { className: "text-[12px] font-semibold text-foreground", children: builderFlow.connecting ? "Connecting Builder.io..." : label }), builderFlow.connecting && (_jsx(IconLoader2, { size: 12, className: "shrink-0 animate-spin text-muted-foreground" }))] }), _jsx("p", { className: "text-[10.5px] text-muted-foreground mt-0.5 leading-snug", children: subtitle }), builderFlow.error && (_jsx("p", { className: "mt-1 text-[10px] text-destructive", children: builderFlow.error }))] }), _jsx(IconExternalLink, { size: 12, className: "shrink-0 text-muted-foreground mt-0.5" })] }) }));
|
|
147
147
|
}
|
|
148
148
|
// ─── Manual setup card ──────────────────────────────────────────────────────
|
|
149
149
|
function ManualSetupCard({ hint, docsUrl, docsLabel = "Read the docs", children, dim, sourceBadge, }) {
|
|
@@ -425,7 +425,7 @@ function LLMSectionInner({ builderFlow, builderLoading, connectUrl, connected, o
|
|
|
425
425
|
}
|
|
426
426
|
catch { }
|
|
427
427
|
};
|
|
428
|
-
return (_jsx(SettingsSection, { icon: _jsx(IconBrain, { size: 14 }), title: "LLM", subtitle: "Connect any major LLM \u2014 Claude, GPT, Gemini, and more.", required: true, connected: initialLoading ? undefined : anyKeyConfigured, open: open, onToggle: onToggle, children: initialLoading ? (_jsx(SettingsSkeleton, { lines: 3 })) : (_jsxs("div", { className: "space-y-2", children: [_jsx(UseBuilderCard, { builderFlow: builderFlow, connectUrl: connectUrl, connected: connected, orgName: orgName, envManaged: envManaged, credentialSource: credentialSource, label: "Connect Builder.io" }), !builderConnected && (_jsx(ManualSetupCard, { hint: "Choose your AI provider and model.", docsUrl: PROVIDER_DOCS[selectedEngine], sourceBadge: sourceBadge, docsLabel: "Get an API key", children: _jsxs("div", { className: "space-y-2 mb-1", children: [_jsx(SettingsSelect, { label: "Provider", value: selectedEngine, options: providerOptions, onValueChange: (val) => {
|
|
428
|
+
return (_jsx(SettingsSection, { icon: _jsx(IconBrain, { size: 14 }), title: "LLM", subtitle: "Connect any major LLM \u2014 Claude, GPT, Gemini, and more.", required: true, connected: initialLoading ? undefined : anyKeyConfigured, open: open, onToggle: onToggle, children: initialLoading ? (_jsx(SettingsSkeleton, { lines: 3 })) : (_jsxs("div", { className: "space-y-2", children: [_jsx(UseBuilderCard, { builderFlow: builderFlow, connectUrl: connectUrl, connected: connected, orgName: orgName, envManaged: envManaged, credentialSource: credentialSource, trackingSource: "llm_settings", trackingFlow: "connect_llm", label: "Connect Builder.io" }), !builderConnected && (_jsx(ManualSetupCard, { hint: "Choose your AI provider and model.", docsUrl: PROVIDER_DOCS[selectedEngine], sourceBadge: sourceBadge, docsLabel: "Get an API key", children: _jsxs("div", { className: "space-y-2 mb-1", children: [_jsx(SettingsSelect, { label: "Provider", value: selectedEngine, options: providerOptions, onValueChange: (val) => {
|
|
429
429
|
setSelectedEngine(val);
|
|
430
430
|
const info = engines.find((e) => e.name === val);
|
|
431
431
|
setSelectedModel(info?.defaultModel ?? "");
|
|
@@ -948,6 +948,6 @@ export function SettingsPanel({ isDevMode, onToggleDevMode, showDevToggle, devAp
|
|
|
948
948
|
const nextIsDev = next === "development";
|
|
949
949
|
if (nextIsDev !== isDevMode)
|
|
950
950
|
onToggleDevMode();
|
|
951
|
-
} })) })), _jsx(CapabilityStatusStrip, { isDevMode: isDevMode, builderConnected: connected, builderLoading: builderLoading, builderBranchesAvailable: builderBranchesAvailable, onOpenLlm: () => openSettingsSection("llm", true) }), _jsx(AccountSectionInner, { open: openSection === "account", onToggle: () => toggle("account") }), _jsx(LLMSectionInner, { builderFlow: builderFlow, builderLoading: builderLoading, connectUrl: connectUrl, connected: connected, orgName: orgName, envManaged: envManaged, credentialSource: credentialSource, open: openSection === "llm", onToggle: () => toggle("llm") }), _jsx(AppModelDefaultsSectionInner, { open: openSection === "app-models", onToggle: () => toggle("app-models") }), _jsx(AgentLimitsSectionInner, { open: openSection === "limits", onToggle: () => toggle("limits") }), _jsx(SettingsSection, { 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, {}) }), _jsx(SettingsSection, { icon: _jsx(IconBolt, { size: 14 }), title: "Automations", subtitle: "Event-triggered and scheduled automations.", open: openSection === "automations", onToggle: () => toggle("automations"), children: _jsx(AutomationsSection, {}) }), _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 }) }), _jsx(SettingsSection, { 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 }), _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 })] }) }), _jsx(SettingsSection, { 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 }), _jsx(ManualSetupCard, { hint: "Set DATABASE_URL in your .env to connect Neon, Supabase, Turso, or any Postgres/SQLite database.", docsUrl: "https://www.builder.io/c/docs/agent-native-database", dim: connected })] }) }), _jsx(SettingsSection, { 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 }), _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 })] }) }), _jsx(SettingsSection, { 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 }), _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 })] }) }), _jsx(EmailSectionInner, { open: openSection === "email", onToggle: () => toggle("email") }), _jsx(SettingsSection, { 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 }) }), builderBranchesAvailable && (_jsx(SettingsSection, { 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 }) })), _jsx(SettingsSection, { 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, {}) }) }), _jsx(SettingsSection, { 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, {}) }), _jsx(SettingsSection, { 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, {}) })] }));
|
|
951
|
+
} })) })), _jsx(CapabilityStatusStrip, { isDevMode: isDevMode, builderConnected: connected, builderLoading: builderLoading, builderBranchesAvailable: builderBranchesAvailable, onOpenLlm: () => openSettingsSection("llm", true) }), _jsx(AccountSectionInner, { open: openSection === "account", onToggle: () => toggle("account") }), _jsx(LLMSectionInner, { builderFlow: builderFlow, builderLoading: builderLoading, connectUrl: connectUrl, connected: connected, orgName: orgName, envManaged: envManaged, credentialSource: credentialSource, open: openSection === "llm", onToggle: () => toggle("llm") }), _jsx(AppModelDefaultsSectionInner, { open: openSection === "app-models", onToggle: () => toggle("app-models") }), _jsx(AgentLimitsSectionInner, { open: openSection === "limits", onToggle: () => toggle("limits") }), _jsx(SettingsSection, { 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, {}) }), _jsx(SettingsSection, { icon: _jsx(IconBolt, { size: 14 }), title: "Automations", subtitle: "Event-triggered and scheduled automations.", open: openSection === "automations", onToggle: () => toggle("automations"), children: _jsx(AutomationsSection, {}) }), _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 }) }), _jsx(SettingsSection, { 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 })] }) }), _jsx(SettingsSection, { 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, or any Postgres/SQLite database.", docsUrl: "https://www.builder.io/c/docs/agent-native-database", dim: connected })] }) }), _jsx(SettingsSection, { 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 })] }) }), _jsx(SettingsSection, { 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 })] }) }), _jsx(EmailSectionInner, { open: openSection === "email", onToggle: () => toggle("email") }), _jsx(SettingsSection, { 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 && (_jsx(SettingsSection, { 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" }) })), _jsx(SettingsSection, { 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, {}) }) }), _jsx(SettingsSection, { 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, {}) }), _jsx(SettingsSection, { 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, {}) })] }));
|
|
952
952
|
}
|
|
953
953
|
//# sourceMappingURL=SettingsPanel.js.map
|