bazilion 0.22.0 → 0.23.0
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 +4 -2
- package/dist/cli-main.js +9163 -0
- package/dist/cli-main.js.map +1 -0
- package/dist/cli.js +2 -8733
- package/dist/daemon-main.js +42862 -0
- package/dist/daemon-main.js.map +1 -0
- package/dist/daemon.js +2 -58003
- package/dist/migrations/0001_init.sql +1 -1
- package/dist/runtime-version.js +28 -0
- package/dist/runtime-version.js.map +1 -0
- package/dist/web/client/assets/{AgentTabs-CBFT1Qg2.js → AgentTabs-ZozvE4RV.js} +1 -1
- package/dist/web/client/assets/{ChatPane-2r2r-Ac6.js → ChatPane-nv9xOKnM.js} +1 -1
- package/dist/web/client/assets/{ConfigPage-Cv0KGMX2.js → ConfigPage-D_3AsSG4.js} +1 -1
- package/dist/web/client/assets/{ConfirmDialog-DEwIcBm4.js → ConfirmDialog-CH2zTXuo.js} +1 -1
- package/dist/web/client/assets/{FieldRow-C2ZAwThs.js → FieldRow-CcrDV3An.js} +1 -1
- package/dist/web/client/assets/{ProductionTeamPolicyEditor-CziOzJPc.js → ProductionTeamPolicyEditor-DNJsrcW8.js} +1 -1
- package/dist/web/client/assets/{ProfileCommunicationEditor-DRasiT4-.js → ProfileCommunicationEditor-B2SthMNH.js} +1 -1
- package/dist/web/client/assets/{RecoveryState-BZVq08km.js → RecoveryState-DlaJiGZs.js} +1 -1
- package/dist/web/client/assets/{ResultCard-Dv5E8nX2.js → ResultCard-CF7a0iFy.js} +1 -1
- package/dist/web/client/assets/{ResultSourceConversation-DutMGQB2.js → ResultSourceConversation-X5SuheW6.js} +1 -1
- package/dist/web/client/assets/{SectionTabs-mrflsPU-.js → SectionTabs-CCHDsNpe.js} +1 -1
- package/dist/web/client/assets/{TeamTabs-DMVP5Hce.js → TeamTabs-BplbR2LB.js} +1 -1
- package/dist/web/client/assets/{TemplatesTabs-PxjxEiJG.js → TemplatesTabs-DsnlhO7j.js} +1 -1
- package/dist/web/client/assets/{UnsavedChangesGuard-DfuiWMQ_.js → UnsavedChangesGuard-BFGfvKOY.js} +1 -1
- package/dist/web/client/assets/{_id-DqfO8lgv.js → _id-C75PSTfh.js} +1 -1
- package/dist/web/client/assets/{_id-CgRuUtaW.js → _id-CHE9wjEm.js} +1 -1
- package/dist/web/client/assets/{_id-BTqFkUlB.js → _id-CM4HcwqG.js} +1 -1
- package/dist/web/client/assets/{_id-AcER9d-z.js → _id-HgkOZjnh.js} +1 -1
- package/dist/web/client/assets/{_id-CrshYgbI.js → _id-I4COPqTO.js} +1 -1
- package/dist/web/client/assets/_id-W8yP8QHB.js +1 -0
- package/dist/web/client/assets/{_id-Btgd0eQD.js → _id-eKsjDym9.js} +1 -1
- package/dist/web/client/assets/_id-fxbpjlEa.js +1 -0
- package/dist/web/client/assets/{activity-CMaTYBPw.js → activity-BCYUctkB.js} +1 -1
- package/dist/web/client/assets/{activity-TilqK2MN.js → activity-jvvmbNos.js} +1 -1
- package/dist/web/client/assets/{agents-D2gE-ZHl.js → agents-C6mJyZUx.js} +1 -1
- package/dist/web/client/assets/{agents-DPFzFgU2.js → agents-CpusMfSn.js} +1 -1
- package/dist/web/client/assets/{agents-D5_60Do4.js → agents-CvLzI7m_.js} +1 -1
- package/dist/web/client/assets/{approvals-BfoaMnwC.js → approvals-C2R4qUbS.js} +1 -1
- package/dist/web/client/assets/{approvals-Du7G-YHg.js → approvals-Cd2np6JM.js} +1 -1
- package/dist/web/client/assets/{attention-C11m4NJY.js → attention-CFwT25yC.js} +1 -1
- package/dist/web/client/assets/{attention-Cv18TBIb.js → attention-Q_sRUULz.js} +1 -1
- package/dist/web/client/assets/chevron-right-BfSr7R_L.js +1 -0
- package/dist/web/client/assets/{config-crruyOmj.js → config-B7UhhXW6.js} +1 -1
- package/dist/web/client/assets/{context-JT1dYNoO.js → context-Cjb1-4nB.js} +1 -1
- package/dist/web/client/assets/{inbox-DC5XSXiy.js → inbox-CX0alCy_.js} +1 -1
- package/dist/web/client/assets/{inbox-OQ0QyvzA.js → inbox-QoBXXR8s.js} +1 -1
- package/dist/web/client/assets/{index-DThtB1z2.js → index-Du-fy_6d.js} +2 -2
- package/dist/web/client/assets/{learning-MO7fDBpd.js → learning-C1n4NTM1.js} +1 -1
- package/dist/web/client/assets/{learning-CeMSJbAY.js → learning-VwXsV_lU.js} +1 -1
- package/dist/web/client/assets/{login-B1mPI9h5.js → login-CqnOW-JM.js} +1 -1
- package/dist/web/client/assets/{mcp-CmzHMhei.js → mcp-B02-ofb9.js} +1 -1
- package/dist/web/client/assets/mcp-DMpVmmfU.js +1 -0
- package/dist/web/client/assets/{members-C7bazwZU.js → members-CEkRCNto.js} +1 -1
- package/dist/web/client/assets/{members-sxSJCxkS.js → members-va8WzU_O.js} +1 -1
- package/dist/web/client/assets/{memory-BiBOuBA1.js → memory-DejWBeGz.js} +1 -1
- package/dist/web/client/assets/{memory-VYCztjts.js → memory-DiGxdDEp.js} +1 -1
- package/dist/web/client/assets/{policy-C8SKHMJc.js → policy-CEiX5AXJ.js} +1 -1
- package/dist/web/client/assets/{policy-CxN-ZrEm.js → policy-DgIcquCb.js} +1 -1
- package/dist/web/client/assets/{results-DnrL5Mvt.js → results-BBBBjgd1.js} +1 -1
- package/dist/web/client/assets/results-DsK9IvTu.js +1 -0
- package/dist/web/client/assets/{review-D_F2VNul.js → review-BGbU_GAW.js} +1 -1
- package/dist/web/client/assets/{review-CtGjuoBA.js → review-X2RHaLwW.js} +1 -1
- package/dist/web/client/assets/{routes-CLcJb0Gu.js → routes-CNz-oflx.js} +1 -1
- package/dist/web/client/assets/{services-D3rWjxvT.js → services-D7TEP2JX.js} +1 -1
- package/dist/web/client/assets/{services-Ca1LbXwW.js → services-dcsfVgOY.js} +1 -1
- package/dist/web/client/assets/{skills-CbaN9DoR.js → skills-CnI7SkP2.js} +1 -1
- package/dist/web/client/assets/{skills-xLrt1IKk.js → skills-NDtAsHyl.js} +1 -1
- package/dist/web/client/assets/styles-CjCML-UX.css +2 -0
- package/dist/web/client/assets/{teams-tpI7S4u0.js → teams-DETtQypB.js} +1 -1
- package/dist/web/client/assets/{teams-WVfQMDzi.js → teams-DErd3Weq.js} +1 -1
- package/dist/web/client/assets/{teams-DagnWLAA.js → teams-DPgdJBly.js} +1 -1
- package/dist/web/client/assets/{teams-DwSzsbr8.js → teams-Dyll0JrQ.js} +1 -1
- package/dist/web/client/assets/{telegram-hnIzZf3m.js → telegram-CAGu-kLc.js} +1 -1
- package/dist/web/client/assets/{templates-dmFNbHkN.js → templates-CgOQU6RS.js} +1 -1
- package/dist/web/client/assets/{tokens-DMbCr1_1.js → tokens-BYVE1y6V.js} +1 -1
- package/dist/web/client/assets/{tokens-DUx-zUYt.js → tokens-CvjME9aI.js} +1 -1
- package/dist/web/client/assets/{triggers-BwjNuh-V.js → triggers-BeZ7olEG.js} +1 -1
- package/dist/web/client/assets/{triggers-CM4j23G4.js → triggers-Dmli752j.js} +1 -1
- package/dist/web/client/assets/{verifications-DGVTf-_3.js → verifications-CnLEVFoZ.js} +1 -1
- package/dist/web/client/assets/{verifications-bgpZuwOC.js → verifications-qQz5-X-o.js} +1 -1
- package/dist/web/client/assets/{welcome-p8_5r05g.js → welcome-BF3pg5U5.js} +1 -1
- package/dist/web/client/assets/{x-CGJA1SM6.js → x-B-Fk6DuU.js} +1 -1
- package/dist/web/server/assets/WorkspaceRecoveryCard-B-6gfg0D.js +18 -0
- package/dist/web/server/assets/{_id-DFf_uQiI.js → _id-4fEeAcp0.js} +1 -1
- package/dist/web/server/assets/{_id-Bazctexc.js → _id-6aGxCNlp.js} +1 -1
- package/dist/web/server/assets/{_id-B7uXxqZ5.js → _id-BS4MnPa3.js} +1 -1
- package/dist/web/server/assets/{_id-DzoJ3t_C.js → _id-BXOT74Jd.js} +122 -1
- package/dist/web/server/assets/{_id-BjvOb4CK.js → _id-C0C6wOt8.js} +1 -1
- package/dist/web/server/assets/{_id-BLHUW0oS.js → _id-C1TCGcHL.js} +1 -1
- package/dist/web/server/assets/{_id-BxTsdM7U.js → _id-CrOJD02W.js} +225 -3
- package/dist/web/server/assets/{_id-Bn0w00AG.js → _id-D9VWEfdp.js} +1 -1
- package/dist/web/server/assets/{_tanstack-start-manifest_v-DsMaFmpx.js → _tanstack-start-manifest_v-CPSd5WEy.js} +134 -134
- package/dist/web/server/assets/{activity-j_Enmf3L.js → activity-DhzxlXUk.js} +1 -1
- package/dist/web/server/assets/{agents-BAi0dE66.js → agents-Cmw-sUUD.js} +1 -1
- package/dist/web/server/assets/{agents-BHUbTrm7.js → agents-DOrzqCXg.js} +1 -1
- package/dist/web/server/assets/{approvals-BcUm6IOo.js → approvals-szknIxB6.js} +1 -1
- package/dist/web/server/assets/{attention-BQBa0Bu5.js → attention-CsYqmV0L.js} +1 -1
- package/dist/web/server/assets/{auth-PDNSxrT-.js → auth-DChuQIh4.js} +1 -1
- package/dist/web/server/assets/browser-BiDvr0fy.js +66 -0
- package/dist/web/server/assets/{config-Cf7hhsUR.js → config-DTI4EPbU.js} +1 -1
- package/dist/web/server/assets/{daemon-client-DY4jE6KU.js → daemon-client-C-RlJHYO.js} +40 -1
- package/dist/web/server/assets/{git-review-RvzReZyD.js → git-review-CqZTrIWS.js} +1 -1
- package/dist/web/server/assets/{inbox-Du1guYth.js → inbox-D1ROE7jB.js} +1 -1
- package/dist/web/server/assets/{learning-CjcixPRH.js → learning-BuL0c1vH.js} +1 -1
- package/dist/web/server/assets/{mcp-BCalFLvt.js → mcp-B8ErRiR_.js} +1 -1
- package/dist/web/server/assets/{mcp-qWWT9MiE.js → mcp-CLWr5_0I.js} +1 -1
- package/dist/web/server/assets/{mcp-DFhcsmod.js → mcp-DmzP8n2G.js} +5 -9
- package/dist/web/server/assets/{members-C4TpK50B.js → members-DFLi2nQg.js} +1 -1
- package/dist/web/server/assets/{memory-CLZs-XRY.js → memory-CS-9Bb6q.js} +1 -1
- package/dist/web/server/assets/{policy-BrIXpwxZ.js → policy-JF7ZI2-i.js} +1 -1
- package/dist/web/server/assets/{publications-BrX3-WJf.js → publications-DV2uRrvJ.js} +1 -1
- package/dist/web/server/assets/results-BYU6Bfzt.js +362 -0
- package/dist/web/server/assets/{results-BFPu3tcP.js → results-Cr1B3XoP.js} +1 -1
- package/dist/web/server/assets/{results-CJR6dNzB.js → results-vtkmZPro.js} +1 -1
- package/dist/web/server/assets/{review-packets-D3bZ7QYU.js → review-packets-CO69K-FK.js} +1 -1
- package/dist/web/server/assets/{router-DlwGPg99.js → router-B2R22qdF.js} +6 -6
- package/dist/web/server/assets/{routes-yLlXfjsn.js → routes-B6TnJyQ8.js} +1 -1
- package/dist/web/server/assets/{services-DDRj180j.js → services-ZeEIgTn0.js} +1 -1
- package/dist/web/server/assets/{skills-Bck9L5oo.js → skills-kfqhxYmf.js} +1 -1
- package/dist/web/server/assets/{teams-C_PicOsj.js → teams-C9tfV3IC.js} +1 -1
- package/dist/web/server/assets/{teams-CSqR5mWl.js → teams-DKROLgw-.js} +1 -1
- package/dist/web/server/assets/{telegram-D0odXx1E.js → telegram-ByHqeAGC.js} +1 -1
- package/dist/web/server/assets/{tokens-B2O0Di4p.js → tokens-CiThDMwM.js} +1 -1
- package/dist/web/server/assets/{triggers-DtKMYL2r.js → triggers-B9CIl4Co.js} +1 -1
- package/dist/web/server/assets/{verification-no5BrOeR.js → verification-DBsJYadO.js} +1 -1
- package/dist/web/server/assets/web-search-dgw10fLn.js +12 -0
- package/dist/web/server/server.js +74 -50
- package/dist/web-server.js +0 -0
- package/dist/worker.js +433 -78
- package/dist/worker.js.map +1 -1
- package/package.json +16 -9
- package/dist/cli.js.map +0 -1
- package/dist/daemon.js.map +0 -1
- package/dist/web/client/assets/_id-D51zCmQL.js +0 -1
- package/dist/web/client/assets/_id-danxFImG.js +0 -1
- package/dist/web/client/assets/chevron-right-WaxL25XX.js +0 -1
- package/dist/web/client/assets/mcp-Bo-E-MdF.js +0 -1
- package/dist/web/client/assets/results-BI_dzjgu.js +0 -1
- package/dist/web/client/assets/styles-CMSFIJ_r.css +0 -2
- package/dist/web/server/assets/results-TR7VXLdQ.js +0 -173
|
@@ -238,7 +238,7 @@ CREATE TABLE telegram_pairing_challenge (
|
|
|
238
238
|
CREATE TABLE mcp_servers (
|
|
239
239
|
id TEXT PRIMARY KEY,
|
|
240
240
|
name TEXT NOT NULL UNIQUE,
|
|
241
|
-
transport TEXT NOT NULL CHECK (transport IN ('stdio','http'
|
|
241
|
+
transport TEXT NOT NULL CHECK (transport IN ('stdio','http')),
|
|
242
242
|
command TEXT,
|
|
243
243
|
args TEXT NOT NULL DEFAULT '[]',
|
|
244
244
|
url TEXT,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/runtime-version.ts
|
|
4
|
+
import { writeSync } from "fs";
|
|
5
|
+
var SUPPORTED_NODE_RANGE = "^24.22.0 || ^26.4.0";
|
|
6
|
+
function isSupportedNodeVersion(version) {
|
|
7
|
+
if (version !== version.trim()) return false;
|
|
8
|
+
const match = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.exec(version);
|
|
9
|
+
if (!match) return false;
|
|
10
|
+
const major = Number(match[1]);
|
|
11
|
+
const minor = Number(match[2]);
|
|
12
|
+
const patch = Number(match[3]);
|
|
13
|
+
if (![major, minor, patch].every(Number.isSafeInteger)) return false;
|
|
14
|
+
return major === 24 && minor >= 22 || major === 26 && minor >= 4;
|
|
15
|
+
}
|
|
16
|
+
if (!isSupportedNodeVersion(process.versions.node)) {
|
|
17
|
+
writeSync(
|
|
18
|
+
process.stderr.fd,
|
|
19
|
+
`bazilion requires Node.js ${SUPPORTED_NODE_RANGE}; received ${process.versions.node}. Upgrade Node.js before starting Bazilion; no home was opened.
|
|
20
|
+
`
|
|
21
|
+
);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
SUPPORTED_NODE_RANGE,
|
|
26
|
+
isSupportedNodeVersion
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=runtime-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/runtime-version.ts"],"sourcesContent":["import { writeSync } from 'node:fs'\n\n// Keep this dependency-free guard before application imports. The daemon owns\n// its own copy: CLI runtime code must not import daemon internals. Contract tests\n// bind both copies and the manifests to the same supported stable release lines.\nexport const SUPPORTED_NODE_RANGE = '^24.22.0 || ^26.4.0'\n\nexport function isSupportedNodeVersion(version: string): boolean {\n if (version !== version.trim()) return false\n const match = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$/.exec(version)\n if (!match) return false\n const major = Number(match[1])\n const minor = Number(match[2])\n const patch = Number(match[3])\n if (![major, minor, patch].every(Number.isSafeInteger)) return false\n return (major === 24 && minor >= 22) || (major === 26 && minor >= 4)\n}\n\nif (!isSupportedNodeVersion(process.versions.node)) {\n writeSync(\n process.stderr.fd,\n `bazilion requires Node.js ${SUPPORTED_NODE_RANGE}; received ${process.versions.node}. Upgrade Node.js before starting Bazilion; no home was opened.\\n`,\n )\n process.exit(1)\n}\n"],"mappings":";;;AAAA,SAAS,iBAAiB;AAKnB,IAAM,uBAAuB;AAE7B,SAAS,uBAAuB,SAA0B;AAC/D,MAAI,YAAY,QAAQ,KAAK,EAAG,QAAO;AACvC,QAAM,QAAQ,6CAA6C,KAAK,OAAO;AACvE,MAAI,CAAC,MAAO,QAAO;AACnB,QAAM,QAAQ,OAAO,MAAM,CAAC,CAAC;AAC7B,QAAM,QAAQ,OAAO,MAAM,CAAC,CAAC;AAC7B,QAAM,QAAQ,OAAO,MAAM,CAAC,CAAC;AAC7B,MAAI,CAAC,CAAC,OAAO,OAAO,KAAK,EAAE,MAAM,OAAO,aAAa,EAAG,QAAO;AAC/D,SAAQ,UAAU,MAAM,SAAS,MAAQ,UAAU,MAAM,SAAS;AACpE;AAEA,IAAI,CAAC,uBAAuB,QAAQ,SAAS,IAAI,GAAG;AAClD;AAAA,IACE,QAAQ,OAAO;AAAA,IACf,6BAA6B,oBAAoB,cAAc,QAAQ,SAAS,IAAI;AAAA;AAAA,EACtF;AACA,UAAQ,KAAK,CAAC;AAChB;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DGeXAQPT.js";import{Ct as t}from"./index-
|
|
1
|
+
import{t as e}from"./jsx-runtime-DGeXAQPT.js";import{Ct as t}from"./index-Du-fy_6d.js";import{n,t as r}from"./SectionTabs-CCHDsNpe.js";var i=e(),a=[{key:`chat`,href:e=>`/agents/${e}`,label:`Chat`},{key:`inbox`,href:e=>`/agents/${e}/inbox`,label:`Inbox`},{key:`triggers`,href:e=>`/agents/${e}/triggers`,label:`Triggers`},{key:`learning`,href:e=>`/agents/${e}/learning`,label:`Learning`},{key:`settings`,href:e=>`/agents/${e}?mode=settings`,label:`Settings`}];function o({agentId:e,active:o,archived:s}){return(0,i.jsxs)(`nav`,{"aria-label":`Agent sections`,className:r,children:[a.map(t=>(0,i.jsx)(`a`,{href:t.href(e),"aria-current":t.key===o?`page`:void 0,className:n(t.key===o),children:t.label},t.key)),s&&(0,i.jsx)(t,{variant:`warning`,className:`ml-auto self-center uppercase tracking-wide`,children:`archived`})]})}export{o as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{t as n}from"./react-3W8R1pOO.js";import{Et as r,h as i}from"./index-
|
|
1
|
+
import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{t as n}from"./react-3W8R1pOO.js";import{Et as r,h as i}from"./index-Du-fy_6d.js";import{n as a,t as o}from"./git-review-presentation-CzHQulDk.js";import{t as s}from"./ResultCard-CF7a0iFy.js";function c(e){let t=e.split(`
|
|
2
2
|
`).map(e=>e.trim()).find(e=>/^(?:[A-Za-z]*Error(?: \[[A-Z_]+\])?:|ERR_[A-Z_]+\b)/.test(e));return t?t.length>240?`${t.slice(0,237)}…`:t:null}function l(e){let t=e.split(`
|
|
3
3
|
`).find(e=>e.startsWith(`--- from `));if(!t)return`Teammate update received`;let n=/^--- from (.+?) \(message [0-9a-f-]+(?:, reply to [0-9a-f-]+)?\) ---$/.exec(t);if(!n)return`Teammate update received`;let r=n[1]?.replace(/ \([0-9a-f-]{36}\)$/,``).trim();return!r||/^[0-9a-f-]{36}$/.test(r)?`Teammate update received`:`Update from ${r.slice(0,100)}`}var u=e(n(),1),d=65536;async function f(e,t=fetch){let n=`/api/teams/${encodeURIComponent(e.teamId)}/coding-commands/${encodeURIComponent(e.commandId)}/log`;try{let e=await t(`${n}?limit=${d}`,{headers:{accept:`application/json`}});if(e.status===403)return{status:`not-shared`};if(e.status===404)return{status:`missing`};if(!e.ok)return{status:`unavailable`,message:`Request failed (${e.status}).`};let r=await e.json(),i=p(r);if(!i)return{status:`unavailable`,message:`Unexpected response from the daemon.`};if(h(r,`page`)===null)return{status:`not-shared`};let a=m(h(r,`page`));return a?{status:`available`,page:a,view:i}:{status:`unavailable`,message:`Unexpected response from the daemon.`}}catch{return{status:`unavailable`,message:`The daemon could not be reached.`}}}function p(e){let t=h(e,`view`);return!g(t)||typeof t.commandId!=`string`||typeof t.availability!=`string`||typeof t.byteLength!=`number`?null:t}function m(e){return!g(e)||typeof e.text!=`string`||typeof e.availability!=`string`||typeof e.offset!=`number`||typeof e.hasMore!=`boolean`||typeof e.byteLength!=`number`?null:e}function h(e,t){return g(e)?e[t]:void 0}function g(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var _=t();function v({name:e,body:t,pending:n=!1,log:r}){if(!n&&t===`Coding context or command evidence retained privately. Captured transport output follows its communication approval; ask the Agent for the relevant result.`)return(0,_.jsxs)(`details`,{className:`py-1 text-xs font-sans`,"aria-label":`Private command details`,children:[(0,_.jsx)(`summary`,{className:`cursor-pointer`,children:`Detailed output isn’t included in this history view`}),(0,_.jsx)(`p`,{className:`mt-1`,children:`The Agent’s summary is shown in the conversation. Ask the Agent to summarize its retained command result if you need more detail.`}),r&&(0,_.jsx)(b,{reference:r})]});let i;try{i=JSON.parse(t)}catch{return(0,_.jsx)(`span`,{children:t})}if(!i||typeof i!=`object`)return(0,_.jsx)(`span`,{children:t});if(n){let t=i;return(0,_.jsxs)(`p`,{className:`py-1 break-words`,children:[e===`coding_command`?`Running`:`Inspecting`,`:`,` `,typeof t.command==`string`?t.command:typeof t.target==`string`?t.target:`command evidence`]})}if(e===`repository_context`){let e=i;return Array.isArray(e.instructions?.files)?(0,_.jsxs)(`details`,{className:`py-1`,children:[(0,_.jsxs)(`summary`,{className:`cursor-pointer`,children:[`Repository: `,e.target,` ·`,` `,e.instructions.state===`complete`?`${e.instructions.files.length} instruction files`:`instructions unavailable`]}),e.instructions.files.map(e=>(0,_.jsx)(`p`,{children:e.path},e.path)),(0,_.jsxs)(`p`,{children:[e.commands?.candidates?.length??0,` suggested commands ·`,` `,e.git?.state===`available`?e.git.branch:`Git unavailable`]}),(0,_.jsx)(`pre`,{className:`max-h-64 overflow-auto whitespace-pre-wrap break-words`,children:t})]}):(0,_.jsx)(`span`,{children:t})}if(e===`coding_log`){let e=i;return typeof e.text!=`string`||typeof e.availability!=`string`?(0,_.jsx)(`span`,{children:t}):(0,_.jsxs)(`details`,{className:`py-1`,"aria-label":`Retained command output`,children:[(0,_.jsxs)(`summary`,{className:`cursor-pointer`,children:[`Retained output: `,e.availability,e.hasMore?` · more available`:``]}),(0,_.jsx)(`pre`,{className:`max-h-64 overflow-auto whitespace-pre-wrap break-words`,children:e.text}),(0,_.jsxs)(`p`,{className:`text-xs`,children:[`bytes `,typeof e.offset==`number`?e.offset:0,`–`,(typeof e.offset==`number`?e.offset:0)+e.text.length,` of`,` `,typeof e.byteLength==`number`?e.byteLength:0]})]})}if(e===`coding_environment`){let e=i;return typeof e.posture==`string`?(0,_.jsxs)(`details`,{className:`py-1`,children:[(0,_.jsxs)(`summary`,{className:`cursor-pointer`,children:[`Environment: `,e.posture,` · `,e.cwd]}),(0,_.jsx)(`p`,{className:`break-all`,children:e.imageId??`Host runtime`}),Array.isArray(e.restrictions)&&e.restrictions.filter(e=>typeof e==`string`).map(e=>(0,_.jsx)(`p`,{children:e},e))]}):(0,_.jsx)(`span`,{children:t})}let a=i,o=e===`coding_receipt`?a.receipt:i;if(!o||typeof o.state!=`string`||typeof o.input?.command!=`string`||typeof o.input?.cwd!=`string`)return(0,_.jsx)(`span`,{children:t});let s=o.state===`failed`&&typeof o.diagnostic==`string`?c(o.diagnostic):null;return(0,_.jsxs)(`div`,{className:`py-2`,"aria-label":`Coding command result`,children:[(0,_.jsxs)(`p`,{className:`font-sans`,children:[(0,_.jsx)(`strong`,{className:o.state===`succeeded`?`text-sapphire-deep`:`text-mocha`,children:o.state.replaceAll(`_`,` `)}),` `,`· `,o.input.purpose,typeof o.exitCode==`number`?` · exit ${o.exitCode}`:``,e===`coding_receipt`?` · ${a.applicability}`:``]}),(0,_.jsx)(`p`,{className:`whitespace-pre-wrap break-words`,children:o.input.command}),(0,_.jsxs)(`p`,{className:`text-xs`,children:[o.input.cwd,` · `,o.environment?.posture,` · result at execution time`]}),s&&(0,_.jsx)(`p`,{className:`mt-1 font-sans text-rose-baziu`,"aria-label":`Command failure summary`,children:s}),typeof o.reason==`string`&&(0,_.jsx)(`p`,{children:o.reason}),(0,_.jsxs)(`details`,{children:[(0,_.jsx)(`summary`,{className:`cursor-pointer`,children:`Output and evidence`}),(0,_.jsx)(`pre`,{className:`max-h-64 overflow-auto whitespace-pre-wrap break-words`,children:o.diagnostic}),o.truncated&&(0,_.jsx)(`p`,{children:`Output truncated.`}),(0,_.jsxs)(`p`,{className:`break-all`,children:[`coding-receipt:`,o.id]}),(0,_.jsx)(y,{teamId:o.teamId,after:o.sourceAfter??null,before:o.sourceBefore??null}),o.environment?.imageId&&(0,_.jsx)(`p`,{className:`break-all`,children:o.environment.imageId})]})]})}function y({teamId:e,after:t,before:n}){let[s,c]=(0,u.useState)(null),[l,d]=(0,u.useState)(!1);async function f(){if(t){d(!0);try{c(await i({data:{teamId:e,snapshotId:t.id}}))}finally{d(!1)}}}let p=s?.status===`ok`?s:null,m=o(p);return(0,_.jsxs)(`p`,{className:a(p)?`text-rose-baziu`:void 0,children:[m,t?(0,_.jsxs)(_.Fragment,{children:[` · tested version `,(0,_.jsx)(`span`,{className:`break-all font-mono`,children:t.id.slice(0,12)}),t.complete?``:` (incomplete)`,p===null&&(0,_.jsxs)(_.Fragment,{children:[` `,(0,_.jsx)(r,{variant:`ghost`,disabled:l,onClick:()=>void f(),children:l?`Checking…`:`Check applicability`})]}),s?.status===`unavailable`&&(0,_.jsxs)(`span`,{children:[` · `,s.message]})]}):` · no source snapshot was captured for this result`,n&&(0,_.jsxs)(_.Fragment,{children:[` · started from `,(0,_.jsx)(`span`,{className:`break-all font-mono`,children:n.id.slice(0,12)})]})]})}function b({reference:e}){let[t,n]=(0,u.useState)(null),[i,a]=(0,u.useState)(!1);async function o(){a(!0);try{n(await f(e))}finally{a(!1)}}return t===null?(0,_.jsx)(`p`,{className:`mt-2`,children:(0,_.jsx)(r,{variant:`ghost`,disabled:i,onClick:()=>void o(),children:i?`Loading…`:`Show retained output`})}):t.status===`not-shared`?(0,_.jsx)(`p`,{className:`mt-2`,children:`This command’s output hasn’t been shared with the conversation yet.`}):t.status===`missing`?(0,_.jsx)(`p`,{className:`mt-2`,children:`This retained output is no longer available.`}):t.status===`unavailable`?(0,_.jsx)(`p`,{className:`mt-2`,role:`alert`,children:t.message}):(0,_.jsxs)(`div`,{className:`mt-2`,children:[(0,_.jsx)(`pre`,{className:`max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-sm bg-[rgba(42,31,22,0.04)] p-2`,children:t.page.text}),(0,_.jsxs)(`p`,{children:[`Retained output: `,t.page.availability,t.page.hasMore?` · earlier output omitted`:``,` · bytes `,t.page.offset,`–`,t.page.offset+t.page.text.length,` of `,t.page.byteLength]})]})}function x(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function S(e){if(Array.isArray(e))return e}function C(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function w(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T(e,t){return S(e)||C(e,t)||E(e,t)||w()}function E(e,t){if(e){if(typeof e==`string`)return x(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}var D=Object.entries,O=Object.setPrototypeOf,k=Object.isFrozen,ee=Object.getPrototypeOf,te=Object.getOwnPropertyDescriptor,A=Object.freeze,j=Object.seal,M=Object.create,N=typeof Reflect<`u`&&Reflect,ne=N.apply,re=N.construct;A||=function(e){return e},j||=function(e){return e},ne||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},re||=function(e){return new e(...[...arguments].slice(1))};var ie=z(Array.prototype.forEach),ae=z(Array.prototype.lastIndexOf),oe=z(Array.prototype.pop),se=z(Array.prototype.push),ce=z(Array.prototype.splice),P=Array.isArray,le=z(String.prototype.toLowerCase),ue=z(String.prototype.toString),de=z(String.prototype.match),fe=z(String.prototype.replace),pe=z(String.prototype.indexOf),me=z(String.prototype.trim),F=z(Number.prototype.toString),he=z(Boolean.prototype.toString),I=typeof BigInt>`u`?null:z(BigInt.prototype.toString),ge=typeof Symbol>`u`?null:z(Symbol.prototype.toString),L=z(Object.prototype.hasOwnProperty),_e=z(Object.prototype.toString),R=z(RegExp.prototype.test),ve=ye(TypeError);function z(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return ne(e,t,n)}}function ye(e){return function(){return re(e,[...arguments])}}function B(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:le;if(O&&O(e,null),!P(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(k(t)||(t[r]=e),i=e)}e[i]=!0}return e}function V(e){for(let t=0;t<e.length;t++)L(e,t)||(e[t]=null);return e}function H(e){let t=M(null);for(let r of D(e)){var n=T(r,2);let i=n[0],a=n[1];L(e,i)&&(P(a)?t[i]=V(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=H(a):t[i]=a)}return t}function be(e){switch(typeof e){case`string`:return e;case`number`:return F(e);case`boolean`:return he(e);case`bigint`:return I?I(e):`0`;case`symbol`:return ge?ge(e):`Symbol()`;case`undefined`:return _e(e);case`function`:case`object`:{if(e===null)return _e(e);let t=e,n=U(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:_e(e)}return _e(e)}default:return _e(e)}}function U(e,t){for(;e!==null;){let n=te(e,t);if(n){if(n.get)return z(n.get);if(typeof n.value==`function`)return z(n.value)}e=ee(e)}function n(){return null}return n}function xe(e){try{return R(e,``),!0}catch{return!1}}var Se=A(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Ce=A(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),we=A([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Te=A([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Ee=A(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),De=A([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Oe=A([`#text`]),ke=A(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Ae=A(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),je=A(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Me=A([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ne=j(/{{[\w\W]*|^[\w\W]*}}/g),Pe=j(/<%[\w\W]*|^[\w\W]*%>/g),Fe=j(/\${[\w\W]*/g),Ie=j(/^data-[\-\w.\u00B7-\uFFFF]+$/),Le=j(/^aria-[\-\w]+$/),Re=j(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ze=j(/^(?:\w+script|data):/i),Be=j(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ve=j(/^html$/i),He=j(/^[a-z][.\w]*(-[.\w]+)+$/i),Ue=j(/<[/\w!]/g),We=j(/<[/\w]/g),Ge=j(/<\/no(script|embed|frames)/i),Ke=j(/\/>/i),qe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Je=function(){return typeof window>`u`?null:window},Ye=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Xe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ze=function(e,t,n,r){return L(e,t)&&P(e[t])?B(r.base?H(r.base):{},e[t],r.transform):n};function Qe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Je(),t=e=>Qe(e);if(t.version=`3.4.11`,t.removed=[],!e||!e.document||e.document.nodeType!==qe.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=U(d,`cloneNode`),p=U(d,`remove`),m=U(d,`nextSibling`),h=U(d,`childNodes`),g=U(d,`parentNode`),_=U(d,`shadowRoot`),v=U(d,`attributes`),y=o&&o.prototype?U(o.prototype,`nodeType`):null,b=o&&o.prototype?U(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,C,w=!1,T=0,E=function(){if(T>0)throw ve(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},O=function(e){E(),T++;try{return x.createHTML(e)}finally{T--}},k=function(e){E(),T++;try{return x.createScriptURL(e)}finally{T--}},ee=function(){return w||=(C=Ye(u,i),!0),C},te=n,N=te.implementation,ne=te.createNodeIterator,re=te.createDocumentFragment,F=te.getElementsByTagName,he=r.importNode,I=Xe();t.isSupported=typeof D==`function`&&typeof g==`function`&&N&&N.createHTMLDocument!==void 0;let ge=Ne,_e=Pe,z=Fe,ye=Ie,V=Le,$e=ze,et=Be,tt=He,nt=Re,W=null,rt=B({},[...Se,...Ce,...we,...Ee,...Oe]),G=null,it=B({},[...ke,...Ae,...je,...Me]),K=Object.seal(M(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),at=null,ot=null,st=Object.seal(M(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ct=!0,lt=!0,ut=!1,dt=!0,ft=!1,pt=!0,mt=!1,ht=!1,gt=null,_t=null,vt=!1,yt=!1,bt=!1,xt=!1,St=!0,Ct=!1,wt=`user-content-`,Tt=!0,Et=!1,Dt={},q=null,Ot=B({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),kt=null,At=B({},[`audio`,`video`,`img`,`source`,`image`,`track`]),jt=null,Mt=B({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Nt=`http://www.w3.org/1998/Math/MathML`,Pt=`http://www.w3.org/2000/svg`,Ft=`http://www.w3.org/1999/xhtml`,It=Ft,Lt=!1,Rt=null,zt=B({},[Nt,Pt,Ft],ue),Bt=A([`mi`,`mo`,`mn`,`ms`,`mtext`]),Vt=B({},Bt),Ht=A([`annotation-xml`]),Ut=B({},Ht),Wt=B({},[`title`,`style`,`font`,`a`,`script`]),Gt=null,Kt=[`application/xhtml+xml`,`text/html`],J=null,qt=null,Jt=n.createElement(`form`),Yt=function(e){return e instanceof RegExp||e instanceof Function},Xt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(qt&&qt===e)return;(!e||typeof e!=`object`)&&(e={}),e=H(e),Gt=Kt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,J=Gt===`application/xhtml+xml`?ue:le,W=Ze(e,`ALLOWED_TAGS`,rt,{transform:J}),G=Ze(e,`ALLOWED_ATTR`,it,{transform:J}),Rt=Ze(e,`ALLOWED_NAMESPACES`,zt,{transform:ue}),jt=Ze(e,`ADD_URI_SAFE_ATTR`,Mt,{transform:J,base:Mt}),kt=Ze(e,`ADD_DATA_URI_TAGS`,At,{transform:J,base:At}),q=Ze(e,`FORBID_CONTENTS`,Ot,{transform:J}),at=Ze(e,`FORBID_TAGS`,H({}),{transform:J}),ot=Ze(e,`FORBID_ATTR`,H({}),{transform:J}),Dt=L(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?H(e.USE_PROFILES):e.USE_PROFILES:!1,ct=e.ALLOW_ARIA_ATTR!==!1,lt=e.ALLOW_DATA_ATTR!==!1,ut=e.ALLOW_UNKNOWN_PROTOCOLS||!1,dt=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ft=e.SAFE_FOR_TEMPLATES||!1,pt=e.SAFE_FOR_XML!==!1,mt=e.WHOLE_DOCUMENT||!1,yt=e.RETURN_DOM||!1,bt=e.RETURN_DOM_FRAGMENT||!1,xt=e.RETURN_TRUSTED_TYPE||!1,vt=e.FORCE_BODY||!1,St=e.SANITIZE_DOM!==!1,Ct=e.SANITIZE_NAMED_PROPS||!1,Tt=e.KEEP_CONTENT!==!1,Et=e.IN_PLACE||!1,nt=xe(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Re,It=typeof e.NAMESPACE==`string`?e.NAMESPACE:Ft,Vt=L(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?H(e.MATHML_TEXT_INTEGRATION_POINTS):B({},Bt),Ut=L(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?H(e.HTML_INTEGRATION_POINTS):B({},Ht);let t=L(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?H(e.CUSTOM_ELEMENT_HANDLING):M(null);if(K=M(null),L(t,`tagNameCheck`)&&Yt(t.tagNameCheck)&&(K.tagNameCheck=t.tagNameCheck),L(t,`attributeNameCheck`)&&Yt(t.attributeNameCheck)&&(K.attributeNameCheck=t.attributeNameCheck),L(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(K.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),j(K),ft&&(lt=!1),bt&&(yt=!0),Dt&&(W=B({},Oe),G=M(null),Dt.html===!0&&(B(W,Se),B(G,ke)),Dt.svg===!0&&(B(W,Ce),B(G,Ae),B(G,Me)),Dt.svgFilters===!0&&(B(W,we),B(G,Ae),B(G,Me)),Dt.mathMl===!0&&(B(W,Ee),B(G,je),B(G,Me))),st.tagCheck=null,st.attributeCheck=null,L(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?st.tagCheck=e.ADD_TAGS:P(e.ADD_TAGS)&&(W===rt&&(W=H(W)),B(W,e.ADD_TAGS,J))),L(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?st.attributeCheck=e.ADD_ATTR:P(e.ADD_ATTR)&&(G===it&&(G=H(G)),B(G,e.ADD_ATTR,J))),L(e,`ADD_URI_SAFE_ATTR`)&&P(e.ADD_URI_SAFE_ATTR)&&B(jt,e.ADD_URI_SAFE_ATTR,J),L(e,`FORBID_CONTENTS`)&&P(e.FORBID_CONTENTS)&&(q===Ot&&(q=H(q)),B(q,e.FORBID_CONTENTS,J)),L(e,`ADD_FORBID_CONTENTS`)&&P(e.ADD_FORBID_CONTENTS)&&(q===Ot&&(q=H(q)),B(q,e.ADD_FORBID_CONTENTS,J)),Tt&&(W[`#text`]=!0),mt&&B(W,[`html`,`head`,`body`]),W.table&&(B(W,[`tbody`]),delete at.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw ve(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw ve(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=x;x=e.TRUSTED_TYPES_POLICY;try{S=O(``)}catch(e){throw x=t,e}}else e.TRUSTED_TYPES_POLICY===null?(x=void 0,S=``):(x===void 0&&(x=ee()),x&&typeof S==`string`&&(S=O(``)));A&&A(e),qt=e},Zt=B({},[...Ce,...we,...Te]),Qt=B({},[...Ee,...De]),$t=function(e,t,n){return t.namespaceURI===Ft?e===`svg`:t.namespaceURI===Nt?e===`svg`&&(n===`annotation-xml`||Vt[n]):!!Zt[e]},en=function(e,t,n){return t.namespaceURI===Ft?e===`math`:t.namespaceURI===Pt?e===`math`&&Ut[n]:!!Qt[e]},tn=function(e,t,n){return t.namespaceURI===Pt&&!Ut[n]||t.namespaceURI===Nt&&!Vt[n]?!1:!Qt[e]&&(Wt[e]||!Zt[e])},nn=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:It,tagName:`template`});let n=le(e.tagName),r=le(t.tagName);return Rt[e.namespaceURI]?e.namespaceURI===Pt?$t(n,t,r):e.namespaceURI===Nt?en(n,t,r):e.namespaceURI===Ft?tn(n,t,r):!!(Gt===`application/xhtml+xml`&&Rt[e.namespaceURI]):!1},rn=function(e){se(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw ve(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},an=function(e){let t=h(e);if(t){let e=[];ie(t,t=>{se(e,t)}),ie(e,e=>{try{p(e)}catch{}})}let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},on=function(e,n){try{se(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{se(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(yt||bt)try{rn(n)}catch{}else try{n.setAttribute(e,``)}catch{}},sn=function(e){let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||G[J(i)]))try{e.removeAttribute(i)}catch{}}},cn=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(y?y(e):e.nodeType)===qe.element&&sn(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},ln=function(e){let t=null,r=null;if(vt)e=`<remove></remove>`+e;else{let t=de(e,/^[\r\n\t ]+/);r=t&&t[0]}Gt===`application/xhtml+xml`&&It===Ft&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=x?O(e):e;if(It===Ft)try{t=new l().parseFromString(i,Gt)}catch{}if(!t||!t.documentElement){t=N.createDocument(It,`template`,null);try{t.documentElement.innerHTML=Lt?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),It===Ft?F.call(t,mt?`html`:`body`)[0]:mt?t.documentElement:a},un=function(e){return ne.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Y=function(e){return e=fe(e,ge,` `),e=fe(e,_e,` `),e=fe(e,z,` `),e},dn=function(e){e.normalize();let t=ne.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;)n.data=Y(n.data),n=t.nextNode();let r=e.querySelectorAll?.call(e,`template`);r&&ie(r,e=>{X(e.content)&&dn(e.content)})},fn=function(e){let t=b?b(e):null;return typeof t!=`string`||J(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},X=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===qe.documentFragment}catch{return!1}},pn=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function mn(e,n,r){e.length!==0&&ie(e,e=>{e.call(t,n,r,qt)})}let hn=function(e,t){return!!(pt&&e.hasChildNodes()&&!pn(e.firstElementChild)&&R(Ue,e.textContent)&&R(Ue,e.innerHTML)||pt&&e.namespaceURI===Ft&&t===`style`&&pn(e.firstElementChild)||e.nodeType===qe.processingInstruction||pt&&e.nodeType===qe.comment&&R(We,e.data))},gn=function(e,t){if(!at[t]&&yn(t)&&(K.tagNameCheck instanceof RegExp&&R(K.tagNameCheck,t)||K.tagNameCheck instanceof Function&&K.tagNameCheck(t)))return!1;if(Tt&&!q[t]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=Et?n[i]:f(n[i],!0);t.insertBefore(r,m(e))}}}return rn(e),!0},_n=function(e){if(mn(I.beforeSanitizeElements,e,null),fn(e))return rn(e),!0;let n=J(b?b(e):e.nodeName);if(mn(I.uponSanitizeElement,e,{tagName:n,allowedTags:W}),hn(e,n))return rn(e),!0;if(at[n]||!(st.tagCheck instanceof Function&&st.tagCheck(n))&&!W[n])return gn(e,n);if((y?y(e):e.nodeType)===qe.element&&!nn(e)||(n===`noscript`||n===`noembed`||n===`noframes`)&&R(Ge,e.innerHTML))return rn(e),!0;if(ft&&e.nodeType===qe.text){let n=Y(e.textContent);e.textContent!==n&&(se(t.removed,{element:e.cloneNode()}),e.textContent=n)}return mn(I.afterSanitizeElements,e,null),!1},vn=function(e,t,r){if(ot[t]||St&&(t===`id`||t===`name`)&&(r in n||r in Jt))return!1;let i=G[t]||st.attributeCheck instanceof Function&&st.attributeCheck(t,e);if(!(lt&&R(ye,t))&&!(ct&&R(V,t))){if(!i){if(!(yn(e)&&(K.tagNameCheck instanceof RegExp&&R(K.tagNameCheck,e)||K.tagNameCheck instanceof Function&&K.tagNameCheck(e))&&(K.attributeNameCheck instanceof RegExp&&R(K.attributeNameCheck,t)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(t,e))||t===`is`&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&R(K.tagNameCheck,r)||K.tagNameCheck instanceof Function&&K.tagNameCheck(r))))return!1}else if(!jt[t]&&!R(nt,fe(r,et,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&pe(r,`data:`)===0&&kt[e])&&!(ut&&!R($e,fe(r,et,``)))&&r)return!1}return!0},Z=B({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),yn=function(e){return!Z[le(e)]&&R(tt,e)},bn=function(e,t,n,r){if(x&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return O(r);case`TrustedScriptURL`:return k(r)}return r},Q=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),fn(e)?rn(e):oe(t.removed)}catch{on(n,e)}},xn=function(e){mn(I.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||fn(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0},r=t.length,i=J(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=J(o),u=c,d=o===`value`?u:me(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,mn(I.uponSanitizeAttribute,e,n),d=n.attrValue,Ct&&(l===`id`||l===`name`)&&pe(d,wt)!==0&&(on(o,e),d=wt+d),pt&&R(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){on(o,e);continue}if(l===`attributename`&&de(d,`href`)){on(o,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr){on(o,e);continue}if(!dt&&R(Ke,d)){on(o,e);continue}if(ft&&(d=Y(d)),!vn(i,l,d)){on(o,e);continue}d=bn(i,l,s,d),d!==u&&Q(e,o,s,d)}}mn(I.afterSanitizeAttributes,e,null)},Sn=function(e){let t=null,n=un(e);for(mn(I.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(mn(I.uponSanitizeShadowNode,t,null),_n(t),xn(t),X(t.content)&&Sn(t.content),(y?y(t):t.nodeType)===qe.element){let e=_(t);X(e)&&($(e),Sn(e))}mn(I.afterSanitizeShadowDOM,e,null)},$=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Sn(e.shadow);continue}let n=e.node,r=(y?y(n):n.nodeType)===qe.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&J(e)===`template`){let e=n.content;X(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(n);X(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Lt=!e,Lt&&(e=`<!-->`),typeof e!=`string`&&!pn(e)&&(e=be(e),typeof e!=`string`))throw ve(`dirty is not a string, aborting`);if(!t.isSupported)return e;ht?(W=gt,G=_t):Xt(n),(I.uponSanitizeElement.length>0||I.uponSanitizeAttribute.length>0)&&(W=H(W)),I.uponSanitizeAttribute.length>0&&(G=H(G)),t.removed=[];let c=Et&&typeof e!=`string`&&pn(e);if(c){let t=b?b(e):e.nodeName;if(typeof t==`string`){let e=J(t);if(!W[e]||at[e])throw ve(`root node is forbidden and cannot be sanitized in-place`)}if(fn(e))throw ve(`root node is clobbered and cannot be sanitized in-place`);try{$(e)}catch(t){throw an(e),t}}else if(pn(e))i=ln(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===qe.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),$(a);else{if(!yt&&!ft&&!mt&&e.indexOf(`<`)===-1)return x&&xt?O(e):e;if(i=ln(e),!i)return yt?null:xt?S:``}i&&vt&&rn(i.firstChild);let l=un(c?e:i);try{for(;o=l.nextNode();)_n(o),xn(o),X(o.content)&&Sn(o.content)}catch(t){throw c&&an(e),t}if(c)return ie(t.removed,e=>{e.element&&cn(e.element)}),ft&&dn(e),e;if(yt){if(ft&&dn(i),bt)for(s=re.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(G.shadowroot||G.shadowrootmode)&&(s=he.call(r,s,!0)),s}let u=mt?i.outerHTML:i.innerHTML;return mt&&W[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&R(Ve,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-DGeXAQPT.js";import{bt as t,wt as n,xt as r}from"./index-
|
|
1
|
+
import{t as e}from"./jsx-runtime-DGeXAQPT.js";import{bt as t,wt as n,xt as r}from"./index-Du-fy_6d.js";import{n as i,t as a}from"./SectionTabs-CCHDsNpe.js";var o=e(),s=[{key:`providers`,href:`/config`,label:`Providers`},{key:`services`,href:`/config/services`,label:`Services`},{key:`mcp`,href:`/config/mcp`,label:`MCP`},{key:`integrations`,href:`/config/integrations/telegram`,label:`Integrations`},{key:`tokens`,href:`/config/tokens`,label:`Tokens`}];function c({active:e,className:t}){return(0,o.jsx)(`nav`,{"aria-label":`Configuration sections`,className:n(a,t),children:s.map(t=>(0,o.jsx)(`a`,{href:t.href,"aria-current":t.key===e?`page`:void 0,className:i(t.key===e),children:t.label},t.key))})}function l({active:e,title:n,description:i,children:a,actions:s,size:l=`default`}){return(0,o.jsxs)(r,{size:l,children:[(0,o.jsx)(t,{eyebrow:`Configuration`,title:n,description:i,actions:s}),(0,o.jsx)(c,{active:e,className:`mb-0`}),(0,o.jsx)(`div`,{className:`space-y-6`,children:a})]})}export{l as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{t as n}from"./react-3W8R1pOO.js";import{$ as r,Et as i,Q as a,X as o,Z as s,at as c,ct as l,dt as u,et as d,it as f,nt as p,ot as m,rt as h,st as g,tt as _,ut as v}from"./index-
|
|
1
|
+
import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{t as n}from"./react-3W8R1pOO.js";import{$ as r,Et as i,Q as a,X as o,Z as s,at as c,ct as l,dt as u,et as d,it as f,nt as p,ot as m,rt as h,st as g,tt as _,ut as v}from"./index-Du-fy_6d.js";var y=e(n(),1),b=t(),x=`Dialog`,[S,C]=g(x),[w,T]=S(x),E=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=y.useRef(null),l=y.useRef(null),[u,d]=c({prop:r,defaultProp:i??!1,onChange:a,caller:x});return(0,b.jsx)(w,{scope:t,triggerRef:s,contentRef:l,contentId:h(),titleId:h(),descriptionId:h(),open:u,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})};E.displayName=x;var D=`DialogTrigger`,O=y.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=T(D,n),a=u(t,i.triggerRef);return(0,b.jsx)(l.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":J(i.open),...r,ref:a,onClick:m(e.onClick,i.onOpenToggle)})});O.displayName=D;var k=`DialogPortal`,[A,j]=S(k,{forceMount:void 0}),M=e=>{let{__scopeDialog:t,forceMount:n,children:i,container:a}=e,o=T(k,t);return(0,b.jsx)(A,{scope:t,forceMount:n,children:y.Children.map(i,e=>(0,b.jsx)(f,{present:n||o.open,children:(0,b.jsx)(r,{asChild:!0,container:a,children:e})}))})};M.displayName=k;var N=`DialogOverlay`,P=y.forwardRef((e,t)=>{let n=j(N,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=T(N,e.__scopeDialog);return a.modal?(0,b.jsx)(f,{present:r||a.open,children:(0,b.jsx)(I,{...i,ref:t})}):null});P.displayName=N;var F=v(`DialogOverlay.RemoveScroll`),I=y.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=T(N,n),a=u(t,p());return(0,b.jsx)(s,{as:F,allowPinchZoom:!0,shards:[i.contentRef],children:(0,b.jsx)(l.div,{"data-state":J(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),L=`DialogContent`,R=y.forwardRef((e,t)=>{let n=j(L,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=T(L,e.__scopeDialog);return(0,b.jsx)(f,{present:r||a.open,children:a.modal?(0,b.jsx)(z,{...i,ref:t}):(0,b.jsx)(B,{...i,ref:t})})});R.displayName=L;var z=y.forwardRef((e,t)=>{let n=T(L,e.__scopeDialog),r=y.useRef(null),i=u(t,n.contentRef,r);return y.useEffect(()=>{let e=r.current;if(e)return o(e)},[]),(0,b.jsx)(V,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:m(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:m(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:m(e.onFocusOutside,e=>e.preventDefault())})}),B=y.forwardRef((e,t)=>{let n=T(L,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return(0,b.jsx)(V,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),V=y.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,c=T(L,n);return a(),(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(d,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:(0,b.jsx)(_,{role:`dialog`,id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":J(c.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),H=`DialogTitle`,U=y.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=T(H,n);return(0,b.jsx)(l.h2,{id:i.titleId,...r,ref:t})});U.displayName=H;var W=`DialogDescription`,G=y.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=T(W,n);return(0,b.jsx)(l.p,{id:i.descriptionId,...r,ref:t})});G.displayName=W;var K=`DialogClose`,q=y.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=T(K,n);return(0,b.jsx)(l.button,{type:`button`,...r,ref:t,onClick:m(e.onClick,()=>i.onOpenChange(!1))})});q.displayName=K;function J(e){return e?`open`:`closed`}var Y=typeof document>`u`?y.useEffect:y.useLayoutEffect;function X(e){let t=e.activeElement;return!t||t===e.body||t===e.documentElement||!(`focus`in t)||typeof t.focus!=`function`?null:t}function Z(e,t){!e||!e.isConnected||e.ownerDocument!==t||e.focus({preventScroll:!0})}function Q({open:e,title:t,description:n,confirmLabel:r,confirmVariant:a=`danger`,onConfirm:o,onOpenChange:s}){let[c,l]=(0,y.useState)(!1),[u,d]=(0,y.useState)(null),f=(0,y.useRef)(null),p=(0,y.useRef)(!1);Y(()=>{e&&!p.current&&(f.current=X(document)),p.current=e},[e]),(0,y.useEffect)(()=>{e||(l(!1),d(null))},[e]);async function m(){l(!0),d(null);try{await o(),s(!1)}catch(e){d(e instanceof Error?e.message:String(e)),l(!1)}}return(0,b.jsx)(E,{open:e,onOpenChange:e=>{!e&&!c&&s(!1)},children:(0,b.jsxs)(M,{children:[(0,b.jsx)(P,{className:`fixed inset-0 z-50 bg-chocolate/35 backdrop-blur-[2px] data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`}),(0,b.jsxs)(R,{className:`fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2 gap-4 rounded-[16px] border border-frost bg-snow p-5 text-chocolate shadow-baziu-lg outline-none data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,onCloseAutoFocus:e=>{e.preventDefault();let t=f.current;f.current=null,Z(t,document)},onEscapeKeyDown:e=>{c&&e.preventDefault()},onPointerDownOutside:e=>{c&&e.preventDefault()},children:[(0,b.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,b.jsx)(U,{className:`font-serif text-xl text-chocolate`,children:t}),(0,b.jsx)(G,{asChild:!0,children:(0,b.jsx)(`div`,{className:`text-sm leading-6 text-mocha`,children:n})})]}),u&&(0,b.jsx)(`p`,{role:`alert`,className:`rounded-md bg-danger/10 px-3 py-2 text-sm text-danger`,children:u}),(0,b.jsxs)(`div`,{className:`flex flex-col-reverse gap-2 border-t border-frost pt-4 sm:flex-row sm:justify-end`,children:[(0,b.jsx)(i,{variant:`ghost`,disabled:c,onClick:()=>s(!1),children:`cancel`}),(0,b.jsx)(i,{variant:a,disabled:c,onClick:()=>void m(),children:c?`working…`:r})]})]})]})})}export{G as a,U as c,R as i,E as n,P as o,q as r,M as s,Q as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{t as n}from"./react-3W8R1pOO.js";import{d as r}from"./preload-helper-bztXdkDj.js";import{t as i}from"./ConfirmDialog-
|
|
1
|
+
import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{t as n}from"./react-3W8R1pOO.js";import{d as r}from"./preload-helper-bztXdkDj.js";import{t as i}from"./ConfirmDialog-CH2zTXuo.js";import{Et as a}from"./index-Du-fy_6d.js";var o=e(n(),1),s=t();function c({field:e}){let t=r(),n=(0,o.useId)(),c=`${n}-description`,[l,u]=(0,o.useState)(e.kind===`config`?e.value??``:``),[d,f]=(0,o.useState)(!1),[p,m]=(0,o.useState)(null),[h,g]=(0,o.useState)(null),[_,v]=(0,o.useState)(!1),y=e.kind===`secret`&&l.trim().length===0;async function b(n){if(n.preventDefault(),y){m(e.set?`Paste a replacement value, or use remove credential to explicitly clear the stored secret.`:`A secret value is required.`);return}f(!0),m(null);try{let n=await fetch(`/api/config/fields/${encodeURIComponent(e.envVar)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({value:l})});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error??`${n.status} ${n.statusText}`)}g(Date.now()),e.kind===`secret`&&u(``),await t.invalidate()}catch(e){m(e.message)}finally{f(!1)}}async function x(){let n=await fetch(`/api/config/fields/${encodeURIComponent(e.envVar)}`,{method:`DELETE`});if(!n.ok&&n.status!==204){let e=await n.json().catch(()=>null);throw Error(e?.error??`${n.status} ${n.statusText}`)}u(``),m(null),g(Date.now()),await t.invalidate()}return(0,s.jsxs)(`form`,{onSubmit:b,className:`grid grid-cols-1 gap-2 border-b py-3 last:border-0 md:grid-cols-[12rem_minmax(0,1fr)_auto_auto] md:items-center`,children:[(0,s.jsxs)(`div`,{className:`min-w-0`,children:[(0,s.jsx)(`label`,{htmlFor:n,className:`text-sm font-medium text-foreground`,children:e.label}),e.description&&(0,s.jsx)(`div`,{id:c,className:`text-xs text-muted-foreground mt-0.5`,children:e.description}),(0,s.jsxs)(`details`,{className:`mt-1 text-xs text-muted-foreground`,children:[(0,s.jsx)(`summary`,{className:`cursor-pointer`,children:`Advanced identifier`}),(0,s.jsx)(`code`,{className:`mt-1 inline-block break-all font-mono`,children:e.envVar})]})]}),(0,s.jsx)(`div`,{className:`min-w-0`,children:e.kind===`config`&&e.options?(0,s.jsxs)(`select`,{id:n,"aria-describedby":e.description?c:void 0,value:l,onChange:e=>u(e.target.value),className:`w-full rounded-md border bg-background px-2 py-1.5 text-sm outline-none focus:ring-2 focus:ring-ring/30`,children:[(0,s.jsx)(`option`,{value:``,children:`Not set (default)`}),l&&!e.options.includes(l)&&(0,s.jsxs)(`option`,{value:l,children:[`Unsupported: `,l]}),e.options.map(t=>(0,s.jsx)(`option`,{value:t,children:e.optionLabels?.[t]??t},t))]}):e.kind===`config`?(0,s.jsx)(`input`,{id:n,type:`text`,"aria-describedby":e.description?c:void 0,value:l,onChange:e=>u(e.target.value),placeholder:e.placeholder??``,className:`w-full rounded-md border bg-background px-2 py-1.5 text-sm outline-none focus:ring-2 focus:ring-ring/30`}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`input`,{id:n,type:`password`,"aria-describedby":e.description?c:void 0,value:l,onChange:e=>u(e.target.value),placeholder:e.set?`(paste to replace stored value)`:e.placeholder??`paste key…`,autoComplete:`off`,className:`w-full rounded-md border bg-background px-2 py-1.5 text-sm outline-none focus:ring-2 focus:ring-ring/30`}),e.set&&(0,s.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`Blank keeps the current credential. Removal is a separate explicit action.`})]})}),(0,s.jsxs)(`span`,{className:`text-xs`,children:[e.kind===`secret`&&e.set&&(0,s.jsx)(`span`,{className:`rounded-full bg-success/10 text-success px-1.5 py-0.5`,title:`preview: ${e.preview??``}`,children:`set`}),h&&Date.now()-h<2e3&&(0,s.jsx)(`span`,{role:`status`,className:`text-success ml-2`,children:`saved ✓`})]}),(0,s.jsxs)(`div`,{className:`flex flex-wrap gap-2 md:justify-self-end`,children:[(0,s.jsx)(a,{variant:`ghost`,type:`submit`,disabled:d||y,className:`text-xs`,children:`save`}),e.kind===`secret`&&e.set&&(0,s.jsx)(a,{variant:`danger`,className:`text-xs`,onClick:()=>v(!0),children:`remove`})]}),p&&(0,s.jsx)(`p`,{role:`alert`,className:`text-xs text-danger md:col-span-4`,children:p}),(0,s.jsx)(i,{open:_,title:`Remove ${e.label}?`,description:(0,s.jsxs)(`p`,{children:[`This permanently deletes the stored `,(0,s.jsx)(`code`,{className:`font-mono`,children:e.envVar}),` `,`credential. Features that use it will fail until you save a replacement.`]}),confirmLabel:`remove stored credential`,onConfirm:x,onOpenChange:v})]})}export{c as t};
|