@dmrlzz/davecode 0.6.0 → 0.7.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/dist/{ChatApp-RQZ2IZFQ.js → ChatApp-C23NVTME.js} +6 -6
- package/dist/{account-FY6THFLW.js → account-GG7UFSNY.js} +3 -3
- package/dist/{accounts-ZV3KMLC5.js → accounts-IPOGUMHF.js} +5 -5
- package/dist/{budget-OUOEMMOM.js → budget-7QJGPYPF.js} +4 -4
- package/dist/{chat-OHVP4BS3.js → chat-3K2KXS3E.js} +8 -8
- package/dist/{chunk-FFB2QA5I.js → chunk-3BTE76UD.js} +2 -2
- package/dist/{chunk-L7NEDOA3.js → chunk-4FE2YV5U.js} +2 -2
- package/dist/{chunk-TP3ORSHY.js → chunk-FKGZERYB.js} +157 -9
- package/dist/chunk-FKGZERYB.js.map +1 -0
- package/dist/{chunk-2MM5WT5J.js → chunk-JBX6J74G.js} +3 -3
- package/dist/{chunk-2P5DJWIJ.js → chunk-KEURMO75.js} +4 -4
- package/dist/{chunk-NKRI6SYR.js → chunk-LK2K73DC.js} +2 -2
- package/dist/{chunk-2XGDILCW.js → chunk-NBQIMB43.js} +2422 -1599
- package/dist/chunk-NBQIMB43.js.map +1 -0
- package/dist/{chunk-HL4RIXPM.js → chunk-PGZPSJS7.js} +3 -3
- package/dist/{chunk-U5CI774J.js → chunk-U42YONUN.js} +3 -3
- package/dist/{config-ZLO3YOUX.js → config-BFEQFGAR.js} +3 -3
- package/dist/dashboard/assets/Accounts-CUMFzGls.js +1 -0
- package/dist/dashboard/assets/{Callout-CqdcH6dC.js → Callout-DDtTG_BA.js} +1 -1
- package/dist/dashboard/assets/Goals-CBGiTkcP.js +1 -0
- package/dist/dashboard/assets/{Library-DnCIb76j.js → Library-CKWa3h0E.js} +1 -1
- package/dist/dashboard/assets/{Panes-DBqKYuaE.js → Panes-ziAz-CZa.js} +4 -4
- package/dist/dashboard/assets/RoutesPage-D2iW-KhM.js +4 -0
- package/dist/dashboard/assets/Runner-4e79FB1J.js +1 -0
- package/dist/dashboard/assets/Settings-CSae84S0.js +1 -0
- package/dist/dashboard/assets/Tasks-CnbZ5PvX.js +2 -0
- package/dist/dashboard/assets/Traffic-B12xKOUm.js +1 -0
- package/dist/dashboard/assets/Workspace-CMPHlw4f.js +1 -0
- package/dist/dashboard/assets/chevron-down-DT349Fth.js +1 -0
- package/dist/dashboard/assets/external-link-DCIUScea.js +1 -0
- package/dist/dashboard/assets/format-C7Q-B9fI.js +112 -0
- package/dist/dashboard/assets/index-4RIBvhr9.css +2 -0
- package/dist/dashboard/assets/index-z8TlFwRe.js +50 -0
- package/dist/dashboard/assets/{task-errors-DK4-900l.js → task-errors-3F3vbQ7k.js} +1 -1
- package/dist/dashboard/assets/x-UBQsC1rW.js +1 -0
- package/dist/dashboard/index.html +4 -3
- package/dist/{dist-56V3DLJ4.js → dist-VTC5E7Z5.js} +34 -2
- package/dist/{doctor-DUOKUSJL.js → doctor-JLFYQ3EP.js} +3 -3
- package/dist/{goal-WG37XHUY.js → goal-JM7QYTL2.js} +4 -4
- package/dist/index.js +32 -32
- package/dist/{init-WW4XPFMM.js → init-6K4EGMTV.js} +3 -3
- package/dist/{orchestrate-7YQDBS3E.js → orchestrate-QC5P6IUZ.js} +4 -4
- package/dist/{run-QB4SGPEC.js → run-ABQNQ722.js} +3 -3
- package/dist/runtime.js +2 -2
- package/dist/{start-U4RL377T.js → start-MSO7TGBX.js} +3 -3
- package/dist/{status-GHVMGZI5.js → status-U6C4LUCM.js} +4 -4
- package/dist/{tasks-VTBJ4B2G.js → tasks-HEVT67YM.js} +4 -4
- package/package.json +4 -4
- package/dist/chunk-2XGDILCW.js.map +0 -1
- package/dist/chunk-TP3ORSHY.js.map +0 -1
- package/dist/dashboard/assets/Accounts-CIhOt9FH.js +0 -1
- package/dist/dashboard/assets/Goals-CITP2GqG.js +0 -1
- package/dist/dashboard/assets/RoutesPage-BNVmKhyU.js +0 -4
- package/dist/dashboard/assets/Runner-KR35ZWUE.js +0 -1
- package/dist/dashboard/assets/Settings-B5qE-a5O.js +0 -1
- package/dist/dashboard/assets/Tasks-bJLfNJmS.js +0 -2
- package/dist/dashboard/assets/Traffic-CGfilrRx.js +0 -1
- package/dist/dashboard/assets/Workspace-Dc3cvct_.js +0 -1
- package/dist/dashboard/assets/format-328qIBHX.js +0 -111
- package/dist/dashboard/assets/index-C-bwzlsl.js +0 -50
- package/dist/dashboard/assets/index-D9FCfPmM.css +0 -2
- /package/dist/{ChatApp-RQZ2IZFQ.js.map → ChatApp-C23NVTME.js.map} +0 -0
- /package/dist/{account-FY6THFLW.js.map → account-GG7UFSNY.js.map} +0 -0
- /package/dist/{accounts-ZV3KMLC5.js.map → accounts-IPOGUMHF.js.map} +0 -0
- /package/dist/{budget-OUOEMMOM.js.map → budget-7QJGPYPF.js.map} +0 -0
- /package/dist/{chat-OHVP4BS3.js.map → chat-3K2KXS3E.js.map} +0 -0
- /package/dist/{chunk-FFB2QA5I.js.map → chunk-3BTE76UD.js.map} +0 -0
- /package/dist/{chunk-L7NEDOA3.js.map → chunk-4FE2YV5U.js.map} +0 -0
- /package/dist/{chunk-2MM5WT5J.js.map → chunk-JBX6J74G.js.map} +0 -0
- /package/dist/{chunk-2P5DJWIJ.js.map → chunk-KEURMO75.js.map} +0 -0
- /package/dist/{chunk-NKRI6SYR.js.map → chunk-LK2K73DC.js.map} +0 -0
- /package/dist/{chunk-HL4RIXPM.js.map → chunk-PGZPSJS7.js.map} +0 -0
- /package/dist/{chunk-U5CI774J.js.map → chunk-U42YONUN.js.map} +0 -0
- /package/dist/{config-ZLO3YOUX.js.map → config-BFEQFGAR.js.map} +0 -0
- /package/dist/{dist-56V3DLJ4.js.map → dist-VTC5E7Z5.js.map} +0 -0
- /package/dist/{doctor-DUOKUSJL.js.map → doctor-JLFYQ3EP.js.map} +0 -0
- /package/dist/{goal-WG37XHUY.js.map → goal-JM7QYTL2.js.map} +0 -0
- /package/dist/{init-WW4XPFMM.js.map → init-6K4EGMTV.js.map} +0 -0
- /package/dist/{orchestrate-7YQDBS3E.js.map → orchestrate-QC5P6IUZ.js.map} +0 -0
- /package/dist/{run-QB4SGPEC.js.map → run-ABQNQ722.js.map} +0 -0
- /package/dist/{start-U4RL377T.js.map → start-MSO7TGBX.js.map} +0 -0
- /package/dist/{status-GHVMGZI5.js.map → status-U6C4LUCM.js.map} +0 -0
- /package/dist/{tasks-VTBJ4B2G.js.map → tasks-HEVT67YM.js.map} +0 -0
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
detectProjectRoot,
|
|
10
10
|
findGateway,
|
|
11
11
|
wireProject
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FKGZERYB.js";
|
|
13
13
|
import {
|
|
14
14
|
CliError,
|
|
15
15
|
EXIT
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
createEngine,
|
|
20
20
|
isTerminalGoal,
|
|
21
21
|
loadConfig
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NBQIMB43.js";
|
|
23
23
|
|
|
24
24
|
// src/commands/goal.ts
|
|
25
25
|
import { existsSync } from "fs";
|
|
@@ -300,4 +300,4 @@ export {
|
|
|
300
300
|
goalsShow,
|
|
301
301
|
goalsCancel
|
|
302
302
|
};
|
|
303
|
-
//# sourceMappingURL=chunk-
|
|
303
|
+
//# sourceMappingURL=chunk-PGZPSJS7.js.map
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
detectProjectRoot,
|
|
15
15
|
findGateway,
|
|
16
16
|
targetFor
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FKGZERYB.js";
|
|
18
18
|
import {
|
|
19
19
|
EXIT
|
|
20
20
|
} from "./chunk-7XVXEO7U.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
QUOTA_WINDOWS,
|
|
23
23
|
createEngine,
|
|
24
24
|
loadConfig
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-NBQIMB43.js";
|
|
26
26
|
|
|
27
27
|
// src/commands/status.ts
|
|
28
28
|
function emptyUsage(accountId) {
|
|
@@ -210,4 +210,4 @@ export {
|
|
|
210
210
|
renderStatus,
|
|
211
211
|
statusCommand
|
|
212
212
|
};
|
|
213
|
-
//# sourceMappingURL=chunk-
|
|
213
|
+
//# sourceMappingURL=chunk-U42YONUN.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-QA3O6RA2.js";
|
|
7
7
|
import {
|
|
8
8
|
detectProjectRoot
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FKGZERYB.js";
|
|
10
10
|
import {
|
|
11
11
|
CliError,
|
|
12
12
|
EXIT
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
globalPaths,
|
|
17
17
|
loadConfig,
|
|
18
18
|
projectPaths
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-NBQIMB43.js";
|
|
20
20
|
import "./chunk-MC7RIPL7.js";
|
|
21
21
|
|
|
22
22
|
// src/commands/config.ts
|
|
@@ -156,4 +156,4 @@ export {
|
|
|
156
156
|
configPath,
|
|
157
157
|
configShow
|
|
158
158
|
};
|
|
159
|
-
//# sourceMappingURL=config-
|
|
159
|
+
//# sourceMappingURL=config-BFEQFGAR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,n as t,o as n,r,t as i}from"./cn-BwE4cei0.js";import{G as a,J as o,Ut as s,Wt as c,Xt as l,Yt as u,b as d,c as f,d as p,k as m,l as h,m as g,w as _,x as v,y}from"./format-C7Q-B9fI.js";import{n as b,t as x}from"./Switch-DPYlLseH.js";import{a as S,c as C,i as w,l as ee,n as te,o as ne,r as T,s as re,t as ie}from"./forms-DVIUAxAc.js";import{t as E}from"./Callout-DDtTG_BA.js";import{t as ae}from"./trash-BTuDcSaQ.js";import{A as D,B as O,E as k,J as A,L as j,M,T as N,_ as P,a as F,d as I,f as L,g as R,i as z,j as B,m as V,n as H,o as U,p as W,r as G,s as K,t as q,u as J,x as Y,z as oe}from"./index-z8TlFwRe.js";import{n as X,t as Z}from"./Field-Cmpgg_1z.js";var se={name:`log-in`,size:24,node:[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]};se.node;var ce=t(se),le={name:`shield-alert`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]};le.node;var ue=t(le),Q=n(e(),1),$=r(),de=3e5,fe={connected:{tone:`ok`,label:`Connected`},not_connected:{tone:`warn`,label:`Not connected`},unknown:{tone:`neutral`,label:`Unknown`}};function pe({status:e}){let{tone:t,label:n}=fe[e];return(0,$.jsx)(Y,{tone:t,dot:!0,children:n})}function me({account:e}){let[t,n]=(0,Q.useState)(null),r=d(e.id,t!==null),i=y(),a=r.data,o=a?.status===`connected`;return(0,Q.useEffect)(()=>{if(!t)return;if(o){n(null),N({tone:`ok`,title:`Subscription connected`,description:e.label});return}let r=window.setTimeout(()=>n(null),de);return()=>window.clearTimeout(r)},[t,o,e.label]),(0,$.jsxs)(`section`,{"aria-label":`Connection`,className:`flex flex-col gap-2.5 rounded-md border border-line bg-raised p-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(`p`,{className:`text-[12px] font-medium text-fg-2`,children:`Connection`}),a?(0,$.jsx)(pe,{status:a.status}):r.isError?(0,$.jsx)(Y,{tone:`err`,children:`Check failed`}):(0,$.jsx)(Y,{children:`Checking…`}),(0,$.jsx)(k,{variant:`ghost`,size:`sm`,icon:oe,iconOnly:!0,"aria-label":`Check again`,className:`ml-auto`,loading:r.isFetching&&!t,onClick:()=>r.refetch()})]}),a?.detail&&(0,$.jsx)(`p`,{className:`text-2xs leading-5 text-muted`,children:a.detail}),r.isError&&(0,$.jsx)(`p`,{className:`text-2xs leading-5 text-err`,children:u(r.error)}),a?.method===`cli-login`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsx)(k,{variant:o?`secondary`:`primary`,size:`sm`,icon:ce,loading:i.isPending,onClick:async()=>{try{n(await i.mutateAsync(e.id))}catch(e){N({tone:`err`,title:`Could not start the sign-in`,description:u(e)})}},children:o?`Sign in again`:`Connect subscription`}),(0,$.jsx)(`span`,{className:`text-2xs text-muted`,children:`Opens the vendor’s official sign-in. DaveCode never sees your password.`})]}),t&&(0,$.jsxs)(E,{tone:`info`,title:t.launched?`Waiting for the sign-in…`:`Run the sign-in on the gateway machine`,children:[(0,$.jsx)(`p`,{children:t.message}),!t.launched&&(0,$.jsx)(W,{command:t.command,className:`mt-2`})]}),!t&&!o&&a.loginCommand&&(0,$.jsx)(W,{command:a.loginCommand})]})]})}function he({account:e,usage:t,onClose:n}){return(0,$.jsx)(L,{open:!!e,onClose:n,title:e?.label??`Account`,description:e&&(0,$.jsx)(`span`,{className:`font-mono`,children:e.id}),width:`w-[min(560px,100vw)]`,children:e&&(0,$.jsx)(ge,{account:e,usage:t,onDone:n},e.id)})}function ge({account:e,usage:t,onDone:n}){let r=a(),i=_(),o=c(e.provider),s=Array.isArray(e.config.models)?e.config.models.join(`, `):``,[l,d]=(0,Q.useState)(e.label),[f,p]=(0,Q.useState)(String(e.priority)),[m,g]=(0,Q.useState)(String(e.weight)),[v,y]=(0,Q.useState)(S(e.limits)),[b,x]=(0,Q.useState)(ee(e.subscription)),[D,O]=(0,Q.useState)({}),[A,j]=(0,Q.useState)(typeof e.config.baseUrl==`string`?e.config.baseUrl:``),[M,L]=(0,Q.useState)(s),[z,B]=(0,Q.useState)(``),[V,H]=(0,Q.useState)({}),[W,G]=(0,Q.useState)({}),[K,q]=(0,Q.useState)(null),[J,Y]=(0,Q.useState)(!1);return(0,$.jsxs)(`form`,{onSubmit:async t=>{t.preventDefault(),q(null);let i={};l.trim()||(i.label=`Label cannot be empty.`);let a=Number(f);(!Number.isInteger(a)||a<0)&&(i.priority=`Whole number, 0 or more.`);let o=Number(m);(!Number.isFinite(o)||o<=0)&&(i.weight=`Number above 0.`),e.provider===`openai-compatible`&&!w(A.trim())&&(i.baseUrl=`Enter an http(s) URL.`),e.provider===`openai-compatible`&&e.hasSecret&&!z.trim()&&A.trim().replace(/\/+$/,``)!==(typeof e.config.baseUrl==`string`?e.config.baseUrl:``).replace(/\/+$/,``)&&(i.secret=`Enter the API key again to point this account at a different URL.`);let s=ne(v),c=C(b);if(H(i),G(s.errors),O(c.errors),Object.values(i).some(Boolean)||Object.keys(s.errors).length||Object.keys(c.errors).length)return;let d={};if(l.trim()!==e.label&&(d.label=l.trim()),a!==e.priority&&(d.priority=a),o!==e.weight&&(d.weight=o),JSON.stringify(s.limits)!==JSON.stringify(e.limits)&&(d.limits=s.limits),JSON.stringify(c.subscription??null)!==JSON.stringify(e.subscription??null)&&(d.subscription=c.subscription??null),e.provider===`openai-compatible`){let t=re(M),n={...e.config,baseUrl:A.trim(),models:t.length?t:void 0};JSON.stringify(n)!==JSON.stringify(e.config)&&(d.config=n)}if(z.trim()&&(d.secret=z.trim()),Object.keys(d).length===0)n();else try{await r.mutateAsync({id:e.id,patch:d}),B(``),N({tone:`ok`,title:`Account updated`,description:e.label}),n()}catch(e){B(``),q(u(e))}},noValidate:!0,className:`flex flex-col gap-5`,children:[(0,$.jsxs)(`section`,{"aria-label":`Summary`,className:`flex flex-col gap-3 rounded-md border border-line bg-raised p-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,$.jsx)(P,{provider:e.provider,size:`lg`}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`p`,{className:`text-[13px] font-medium text-fg`,children:o.label}),(0,$.jsxs)(`p`,{className:`font-mono text-2xs text-muted`,children:[e.provider,` · updated `,h(Date.parse(e.updatedAt))]})]}),(0,$.jsx)(R,{account:e})]}),e.lastError&&e.status!==`active`&&(0,$.jsx)(`p`,{className:`rounded border border-line bg-panel px-2 py-1.5 font-mono text-2xs text-fg-2`,children:e.lastError}),(0,$.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(U,{label:`1m`,usage:t?.windows[`1m`]}),(0,$.jsx)(U,{label:`5h`,usage:t?.windows[`5h`]}),(0,$.jsx)(U,{label:`24h`,usage:t?.windows[`24h`]}),(0,$.jsx)(F,{className:`pl-9`})]})]}),(0,$.jsx)(me,{account:e}),(0,$.jsx)(Z,{label:`Label`,required:!0,error:V.label,children:({id:e,describedBy:t,invalid:n})=>(0,$.jsx)(X,{id:e,value:l,onChange:e=>d(e.target.value),"aria-describedby":t,"aria-invalid":n||void 0})}),(0,$.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,$.jsx)(Z,{label:`Priority`,error:V.priority,hint:`Lower is tried first.`,children:({id:e,describedBy:t,invalid:n})=>(0,$.jsx)(X,{id:e,inputMode:`numeric`,value:f,onChange:e=>p(e.target.value),"aria-describedby":t,"aria-invalid":n||void 0,className:`tnum font-mono`})}),(0,$.jsx)(Z,{label:`Weight`,error:V.weight,hint:`Share among equal priorities.`,children:({id:e,describedBy:t,invalid:n})=>(0,$.jsx)(X,{id:e,inputMode:`decimal`,value:m,onChange:e=>g(e.target.value),"aria-describedby":t,"aria-invalid":n||void 0,className:`tnum font-mono`})})]}),e.provider===`openai-compatible`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Z,{label:`Base URL`,required:!0,error:V.baseUrl,children:({id:e,describedBy:t,invalid:n})=>(0,$.jsx)(X,{id:e,type:`url`,value:A,onChange:e=>j(e.target.value),"aria-describedby":t,"aria-invalid":n||void 0,className:`font-mono`})}),(0,$.jsx)(Z,{label:`Models`,hint:`Comma-separated allow-list.`,children:({id:e,describedBy:t})=>(0,$.jsx)(X,{id:e,value:M,onChange:e=>L(e.target.value),"aria-describedby":t,className:`font-mono`})})]}),(o.auth===`api-key`||o.auth===`optional-key`)&&(0,$.jsx)(Z,{label:`Replace ${(o.secretLabel??`secret`).replace(` (optional)`,``)}`,error:V.secret,hint:e.hasSecret===!1?`No secret stored yet. Write-only: it is encrypted at rest and never displayed.`:`A secret is stored. Write-only: leave empty to keep it; it is never displayed.`,children:({id:e,describedBy:t})=>(0,$.jsx)(te,{id:e,value:z,onChange:B,placeholder:`••••••••••••`,describedBy:t})}),(0,$.jsxs)(`fieldset`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(`legend`,{className:`mb-2 text-[12px] font-medium text-fg-2`,children:`Quota limits`}),(0,$.jsx)(ie,{value:v,onChange:y,errors:W})]}),(0,$.jsxs)(`fieldset`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(`legend`,{className:`mb-1 text-[12px] font-medium text-fg-2`,children:`Subscription`}),(0,$.jsx)(`p`,{className:`mb-1 text-2xs text-muted`,children:`What you pay for this account. Entered by hand; DaveCode never reads billing pages. Agents see the plan, renewal and remaining budget, never secrets.`}),(0,$.jsx)(T,{value:b,onChange:x,errors:D})]}),Object.keys(e.config).length>0&&e.provider!==`openai-compatible`&&(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,$.jsx)(`p`,{className:`text-[12px] font-medium text-fg-2`,children:`Provider config`}),(0,$.jsx)(`pre`,{className:`overflow-x-auto rounded-md border border-line bg-raised p-2.5 font-mono text-2xs leading-5 text-fg-2`,children:JSON.stringify(e.config,null,2)})]}),K&&(0,$.jsx)(E,{tone:`err`,title:`Request failed`,children:K}),(0,$.jsxs)(`div`,{className:`sticky -bottom-4 -mx-5 -mb-4 flex items-center gap-2 border-t border-line bg-panel px-5 py-3`,children:[(0,$.jsx)(k,{variant:`danger`,icon:ae,onClick:()=>Y(!0),children:`Delete`}),(0,$.jsxs)(`div`,{className:`ml-auto flex gap-2`,children:[(0,$.jsx)(k,{variant:`ghost`,onClick:n,children:`Cancel`}),(0,$.jsx)(k,{type:`submit`,variant:`primary`,loading:r.isPending,children:`Save changes`})]})]}),(0,$.jsx)(I,{open:J,onClose:()=>Y(!1),title:`Delete ${e.label}?`,description:`The account and its encrypted secret are removed from the gateway. Requests already served stay in the usage history.`,footer:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(k,{variant:`ghost`,onClick:()=>Y(!1),children:`Keep account`}),(0,$.jsx)(k,{variant:`danger`,icon:ae,loading:i.isPending,onClick:async()=>{try{await i.mutateAsync(e.id),N({tone:`ok`,title:`Account removed`,description:e.label}),Y(!1),n()}catch(e){Y(!1),q(u(e))}},children:`Delete account`})]}),children:(0,$.jsx)(`p`,{className:`font-mono text-[12px] text-muted`,children:e.id})})]})}var _e={"claude-cli":{binary:`claude`,env:`CLAUDE_CONFIG_DIR`},"codex-cli":{binary:`codex`,env:`CODEX_HOME`},"gemini-cli":{binary:`gemini`,env:`GEMINI_CLI_HOME`}};function ve({open:e,onClose:t}){return(0,$.jsx)(L,{open:e,onClose:t,title:`Add account`,description:`Secrets are encrypted at rest with AES-256-GCM and are never shown again after saving.`,width:`w-[min(560px,100vw)]`,children:e&&(0,$.jsx)(ye,{onDone:t})})}function ye({onDone:e}){let t=m(),n=p(),r=v(),a=t.data?.experimental.geminiWeb??!1,o=t.data?.experimental.multiAccountRotation??!1,[d,f]=(0,Q.useState)(`anthropic`),[h,g]=(0,Q.useState)(``),[_,y]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(``),[C,ee]=(0,Q.useState)(``),[T,ae]=(0,Q.useState)(`100`),[D,O]=(0,Q.useState)(`1`),[A,j]=(0,Q.useState)(S()),[M,F]=(0,Q.useState)(!1),[I,L]=(0,Q.useState)({}),[R,z]=(0,Q.useState)(null),B=c(d),V=(n.data??[]).filter(e=>e.provider===d),H=B.subscription&&V.length>0&&!o,U=d===`gemini-web`&&!a;return(0,$.jsxs)(`form`,{onSubmit:async t=>{t.preventDefault(),z(null);let n={};h.trim()||(n.label=`Give the account a name you will recognise in logs.`),B.auth===`api-key`&&!_.trim()&&(n.secret=`${B.secretLabel??`Secret`} is required.`),d===`openai-compatible`&&!w(b.trim())&&(n.baseUrl=`Enter an http(s) URL ending in the /v1 base, e.g. http://127.0.0.1:11434/v1`);let i=Number(T);(!Number.isInteger(i)||i<0)&&(n.priority=`Whole number, 0 or more.`);let a=Number(D);(!Number.isFinite(a)||a<=0)&&(n.weight=`Number above 0.`),d===`gemini-web`&&!M&&(n.ack=`Confirm that you accept the risk.`);let o=ne(A);if(Object.keys(o.errors).length&&(n.limits=o.errors),L(n),Object.keys(n).length||U)return;let s={};if(d===`openai-compatible`){s.baseUrl=b.trim();let e=re(C);e.length&&(s.models=e)}let c={provider:d,label:h.trim(),priority:i,weight:a,...Object.keys(o.limits).length&&{limits:o.limits},...Object.keys(s).length&&{config:s},..._.trim()&&{secret:_.trim()}};try{let t=await r.mutateAsync(c);y(``),N({tone:`ok`,title:`Account added`,description:`${t.label} (${t.id})`}),e()}catch(e){y(``),z(l(e)&&e.code===`experimental_disabled`?`The gateway refused this provider: experimental.geminiWeb is off in config.json.`:u(e))}},noValidate:!0,className:`flex flex-col gap-5`,children:[(0,$.jsxs)(`fieldset`,{children:[(0,$.jsx)(`legend`,{className:`mb-2 text-[12px] font-medium text-fg-2`,children:`Provider`}),(0,$.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:s.map(e=>{let t=c(e),n=e===`gemini-web`&&!a,r=d===e;return(0,$.jsxs)(`label`,{className:i(`relative flex cursor-pointer items-start gap-2.5 rounded-md border p-2.5 transition-colors duration-150`,`has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-accent`,r?`border-accent/60 bg-accent-soft`:`border-line hover:border-line-strong hover:bg-hover`,n&&!r&&`opacity-60`),children:[(0,$.jsx)(`input`,{type:`radio`,name:`provider`,value:e,checked:r,onChange:()=>{f(e),L({}),z(null)},className:`sr-only`}),(0,$.jsx)(P,{provider:e}),(0,$.jsxs)(`span`,{className:`min-w-0`,children:[(0,$.jsxs)(`span`,{className:`flex items-center gap-1.5 text-[13px] font-medium text-fg`,children:[t.label,t.experimental&&(0,$.jsx)(`span`,{className:`rounded border border-warn/30 px-1 text-2xs font-medium text-warn`,children:n?`off`:`experimental`})]}),(0,$.jsx)(`span`,{className:`block font-mono text-2xs text-muted`,children:e})]})]},e)})}),(0,$.jsx)(`p`,{className:`mt-2 text-[12px] text-muted`,children:B.blurb})]}),d===`gemini-web`&&(0,$.jsxs)(E,{tone:`warn`,title:`Terms of Service risk`,children:[(0,$.jsx)(`p`,{children:`This provider automates a consumer Gemini web session through Chromium. That likely violates Google's Terms of Service and the account can be rate-limited or suspended.`}),a?(0,$.jsxs)(`label`,{className:`mt-2 flex items-start gap-2 text-fg`,children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:M,onChange:e=>F(e.target.checked),className:`mt-0.5 accent-accent`,"aria-describedby":I.ack?`ack-error`:void 0}),`I understand the risk and want to add this account anyway.`]}):(0,$.jsxs)(`p`,{className:`mt-1.5`,children:[`It is disabled on this gateway. To opt in, set`,` `,(0,$.jsxs)(`code`,{className:`font-mono text-fg`,children:[`"experimental": `,`{ "geminiWeb": true }`]}),` `,`in `,(0,$.jsx)(`code`,{className:`font-mono text-fg`,children:`~/.davecode/config.json`}),` and restart.`]}),I.ack&&(0,$.jsx)(`p`,{id:`ack-error`,role:`alert`,className:`mt-1 text-err`,children:I.ack})]}),H&&(0,$.jsxs)(E,{tone:`info`,title:`Multi-account rotation is off`,children:[`You already have a `,B.label,` account. Without`,` `,(0,$.jsx)(`code`,{className:`font-mono text-fg`,children:`experimental.multiAccountRotation`}),` the router uses only one subscription login per provider; the others act as manual fallbacks.`]}),!U&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Z,{label:`Label`,required:!0,error:I.label,hint:`Shown in the dashboard, logs and events.`,children:({id:e,describedBy:t,invalid:n})=>(0,$.jsx)(X,{id:e,value:h,placeholder:d===`openai-compatible`?`OpenRouter`:`${B.label} — work`,onChange:e=>g(e.target.value),"aria-describedby":t,"aria-invalid":n||void 0,"aria-required":!0})}),d===`openai-compatible`&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Z,{label:`Base URL`,required:!0,error:I.baseUrl,hint:`The OpenAI-compatible root, including /v1.`,children:({id:e,describedBy:t,invalid:n})=>(0,$.jsx)(X,{id:e,type:`url`,value:b,placeholder:`http://127.0.0.1:11434/v1`,onChange:e=>x(e.target.value),"aria-describedby":t,"aria-invalid":n||void 0,className:`font-mono`})}),(0,$.jsx)(Z,{label:`Models`,hint:`Comma-separated allow-list. Leave empty to discover via /v1/models.`,children:({id:e,describedBy:t})=>(0,$.jsx)(X,{id:e,value:C,placeholder:`Provider model IDs`,onChange:e=>ee(e.target.value),"aria-describedby":t,className:`font-mono`})})]}),B.auth===`cli`?(0,$.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,$.jsxs)(`p`,{className:`text-[12px] text-muted`,children:[`DaveCode runs the`,` `,(0,$.jsx)(`span`,{className:`font-mono text-fg`,children:_e[d]?.binary}),` found on your PATH. To use another binary, add the account from a terminal with`,` `,(0,$.jsx)(`span`,{className:`font-mono text-fg`,children:`--binary-path`}),`. No secret is needed here. After adding, open the account and press`,` `,(0,$.jsx)(`span`,{className:`text-fg-2`,children:`Connect subscription`}),`: it runs the vendor’s official sign-in inside the account’s own sandbox (`,_e[d]?.env,`). DaveCode never sees your password. From a terminal:`]}),(0,$.jsx)(W,{command:`davecode add-account --provider ${d}`})]}):B.auth===`browser`?null:(0,$.jsx)(Z,{label:B.secretLabel??`Secret`,required:B.auth===`api-key`,error:I.secret,hint:`Write-only. Encrypted at rest; no endpoint ever returns it.`,children:({id:e,describedBy:t,invalid:n})=>(0,$.jsx)(te,{id:e,value:_,onChange:y,placeholder:B.secretPlaceholder,describedBy:t,invalid:n})}),(0,$.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,$.jsx)(Z,{label:`Priority`,error:I.priority,hint:`Lower is tried first.`,children:({id:e,describedBy:t,invalid:n})=>(0,$.jsx)(X,{id:e,inputMode:`numeric`,value:T,onChange:e=>ae(e.target.value),"aria-describedby":t,"aria-invalid":n||void 0,className:`tnum font-mono`})}),(0,$.jsx)(Z,{label:`Weight`,error:I.weight,hint:`Share among equal priorities.`,children:({id:e,describedBy:t,invalid:n})=>(0,$.jsx)(X,{id:e,inputMode:`decimal`,value:D,onChange:e=>O(e.target.value),"aria-describedby":t,"aria-invalid":n||void 0,className:`tnum font-mono`})})]}),(0,$.jsxs)(`details`,{className:`group rounded-md border border-line`,children:[(0,$.jsxs)(`summary`,{className:`flex items-center justify-between px-3 py-2 text-[12px] font-medium text-fg-2 select-none hover:text-fg`,children:[`Quota limits`,(0,$.jsx)(`span`,{className:`text-2xs font-normal text-muted group-open:hidden`,children:`optional · unlimited by default`})]}),(0,$.jsx)(`div`,{className:`border-t border-line p-3`,children:(0,$.jsx)(ie,{value:A,onChange:j,errors:I.limits??{}})})]})]}),R&&(0,$.jsx)(E,{tone:`err`,title:`Could not add the account`,children:R}),(0,$.jsxs)(`div`,{className:`sticky -bottom-4 -mx-5 -mb-4 flex items-center justify-end gap-2 border-t border-line bg-panel px-5 py-3`,children:[(0,$.jsx)(k,{variant:`ghost`,onClick:e,children:`Cancel`}),(0,$.jsx)(k,{type:`submit`,variant:`primary`,loading:r.isPending,disabled:U,icon:U?ue:void 0,children:U?`Disabled by config`:`Add account`})]})]})}function be(e){if(!e)return;let t=e.price?`${e.price.amount} ${e.price.currency}/${e.price.period===`month`?`mo`:`yr`}`:void 0;return[e.plan,t].filter(Boolean).join(` · `)||void 0}function xe({days:e}){return e===void 0?(0,$.jsx)(`span`,{className:`text-faint`,children:`—`}):e<0?(0,$.jsxs)(Y,{tone:`err`,children:[`overdue `,-e,`d`]}):(0,$.jsx)(Y,{tone:e<=3?`warn`:`neutral`,mono:!0,children:e===0?`today`:`in ${e}d`})}function Se({budget:e}){if(e.remaining===null)return(0,$.jsx)(`span`,{className:`text-2xs text-faint`,children:`no limit known`});let t=e.remaining,n=t<=.1?`bg-err`:t<=.15?`bg-warn`:`bg-meter`;return(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(`div`,{role:`meter`,"aria-label":`${e.label} remaining budget`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(t*100),className:`relative h-1.5 min-w-16 flex-1 rounded-full bg-track`,children:(0,$.jsx)(`div`,{className:i(`absolute inset-y-0 left-0 rounded-full transition-[width] duration-500 ease-snappy`,n),style:{width:`${Math.min(100,t*100)}%`}})}),(0,$.jsx)(`span`,{className:`tnum w-9 shrink-0 text-right font-mono text-2xs text-fg-2`,children:f(t)}),(0,$.jsx)(`span`,{className:`w-14 shrink-0 font-mono text-2xs text-muted`,children:e.tightestWindow??`provider`})]})}function Ce(){let e=g(),[t,n]=(0,Q.useState)(!1),r=e.data?.accounts??[],a=r.filter(e=>e.enabled),o=a.filter(e=>e.available).length;return(0,$.jsxs)(G,{"aria-labelledby":`budget-title`,children:[(0,$.jsx)(z,{id:`budget-title`,title:`Budget`,meta:e.data?`${o} of ${a.length} enabled accounts available · plans are entered by hand`:void 0,actions:(0,$.jsx)(k,{size:`sm`,variant:`ghost`,icon:A,"aria-expanded":t,onClick:()=>n(e=>!e),children:`What agents see`})}),e.isPending?(0,$.jsx)(J,{rows:3}):e.isError?(0,$.jsx)(`p`,{className:`px-3.5 py-3 text-[12px] text-err`,children:u(e.error)}):(0,$.jsxs)($.Fragment,{children:[t&&(0,$.jsxs)(`div`,{className:`relative border-b border-line bg-raised px-3.5 py-3`,children:[(0,$.jsx)(V,{value:e.data.context,label:`Copy agent budget context`,className:`absolute top-2 right-2`}),(0,$.jsx)(`pre`,{className:`overflow-x-auto pr-8 font-mono text-2xs leading-5 whitespace-pre-wrap text-fg-2`,children:e.data.context||`No enabled accounts: agents get no budget context.`})]}),(0,$.jsx)(`ul`,{className:`divide-y divide-line`,children:r.map(e=>(0,$.jsx)(`li`,{children:(0,$.jsxs)(`button`,{type:`button`,onClick:()=>D(`account`,e.accountId),className:i(`grid w-full grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)_auto] items-center gap-x-4 gap-y-1.5 px-3.5 py-2.5 text-left transition-colors duration-150 hover:bg-hover/60 md:grid-cols-[minmax(0,1.3fr)_minmax(0,1fr)_5.5rem_minmax(0,1.2fr)_minmax(0,1fr)]`,!e.enabled&&`text-muted`),children:[(0,$.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,$.jsx)(P,{provider:e.provider}),(0,$.jsx)(`span`,{className:`truncate text-[13px] font-medium`,children:e.label})]}),(0,$.jsx)(`span`,{className:`truncate text-[12px] text-fg-2`,children:be(e.subscription)??(0,$.jsx)(`span`,{className:`text-faint`,children:`no plan`})}),(0,$.jsx)(`span`,{className:`justify-self-end md:justify-self-start`,children:(0,$.jsx)(xe,{days:e.renewsInDays})}),(0,$.jsx)(`span`,{className:`col-span-2 md:col-span-1`,children:(0,$.jsx)(Se,{budget:e})}),(0,$.jsx)(`span`,{className:`truncate text-[12px] md:text-right`,children:e.available?(0,$.jsx)(Y,{tone:`ok`,dot:!0,children:`available`}):(0,$.jsx)(`span`,{className:`text-warn`,title:e.unavailableReason,children:e.unavailableReason??`unavailable`})})]})},e.accountId))})]})]})}function we(){let e=p(),t=o(),n=a(),{params:r}=B(),[s,l]=(0,Q.useState)(``),[d,f]=(0,Q.useState)(`all`),m=r.get(`account`),h=r.get(`new`)===`1`,g=(0,Q.useMemo)(()=>new Map((t.data??[]).map(e=>[e.accountId,e])),[t.data]),_=(0,Q.useMemo)(()=>[...e.data??[]].sort((e,t)=>e.priority-t.priority||e.label.localeCompare(t.label)),[e.data]),v=(0,Q.useMemo)(()=>{let e={all:_.length,active:0,cooldown:0,disabled:0,error:0};for(let t of _)e[t.status]+=1;return e},[_]),y=s.trim().toLowerCase(),S=_.filter(e=>(d===`all`||e.status===d)&&(!y||e.label.toLowerCase().includes(y)||e.id.toLowerCase().includes(y)||e.provider.includes(y))),C=_.find(e=>e.id===m),w=(e,t)=>{n.mutate({id:e.id,patch:{enabled:t}},{onError:n=>N({tone:`err`,title:`Could not ${t?`enable`:`disable`} ${e.label}`,description:u(n)})})};return(0,$.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,$.jsx)(H,{title:`Accounts`,description:`Provider accounts the router balances across. Lower priority numbers are tried first.`,actions:(0,$.jsx)(k,{variant:`primary`,icon:O,onClick:()=>D(`new`,`1`),children:`Add account`})}),(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,$.jsxs)(`div`,{className:`relative w-full sm:w-64`,children:[(0,$.jsx)(j,{"aria-hidden":!0,className:`pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted`,strokeWidth:1.75}),(0,$.jsx)(X,{type:`search`,"aria-label":`Filter accounts`,placeholder:`Filter by label, id or provider`,value:s,onChange:e=>l(e.target.value),className:`pl-8`,"data-filter-input":!0})]}),(0,$.jsx)(q,{label:`Status`,value:d,onChange:f,options:[{value:`all`,label:`All`,count:v.all},{value:`active`,label:`Active`,count:v.active},{value:`cooldown`,label:`Cooldown`,count:v.cooldown},{value:`disabled`,label:`Disabled`,count:v.disabled},{value:`error`,label:`Error`,count:v.error}]}),(0,$.jsx)(F,{className:`ml-auto hidden lg:flex`})]}),e.isError&&(0,$.jsx)(E,{tone:`err`,title:`Could not load accounts`,children:u(e.error)}),(0,$.jsx)(G,{children:e.isPending?(0,$.jsx)(J,{rows:5}):_.length===0?(0,$.jsx)(K,{icon:M,title:`No accounts yet`,description:`Add an API key, a local OpenAI-compatible server or a CLI login. The router starts using it immediately.`,command:`davecode add-account`,action:(0,$.jsx)(k,{variant:`primary`,icon:O,onClick:()=>D(`new`,`1`),children:`Add account`})}):S.length===0?(0,$.jsx)(K,{icon:j,title:`No matching accounts`,description:`Try a different filter.`}):(0,$.jsx)(`div`,{className:`overflow-x-auto`,children:(0,$.jsxs)(`table`,{className:`w-full min-w-[880px] text-[13px]`,children:[(0,$.jsx)(`caption`,{className:`sr-only`,children:`Accounts`}),(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{className:`border-b border-line text-left text-[12px] text-muted`,children:[(0,$.jsx)(`th`,{scope:`col`,className:`w-[32%] px-3.5 py-2 font-medium`,children:`Account`}),(0,$.jsx)(`th`,{scope:`col`,className:`px-3 py-2 font-medium`,children:`Status`}),(0,$.jsx)(`th`,{scope:`col`,className:`w-20 px-3 py-2 text-right font-medium`,children:`Priority`}),(0,$.jsx)(`th`,{scope:`col`,className:`w-20 px-3 py-2 text-right font-medium`,children:`Weight`}),(0,$.jsx)(`th`,{scope:`col`,className:`w-[30%] px-3 py-2 font-medium`,children:`Quota`}),(0,$.jsx)(`th`,{scope:`col`,className:`w-20 px-3 py-2 font-medium`,children:`Enabled`}),(0,$.jsx)(`th`,{scope:`col`,className:`w-10 px-2 py-2`,children:(0,$.jsx)(`span`,{className:`sr-only`,children:`Details`})})]})}),(0,$.jsx)(`tbody`,{children:S.map(e=>{let t=g.get(e.id),n=c(e.provider);return(0,$.jsxs)(`tr`,{onClick:()=>D(`account`,e.id),className:i(`group cursor-pointer border-b border-line transition-colors duration-150 last:border-b-0 hover:bg-hover/60`,m===e.id&&`bg-hover/60`,!e.enabled&&`text-muted`),children:[(0,$.jsx)(`td`,{className:`max-w-0 px-3.5 py-2.5`,children:(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,$.jsx)(P,{provider:e.provider}),(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),D(`account`,e.id)},className:`block max-w-full truncate text-left font-medium text-fg hover:underline focus-visible:underline`,children:e.label}),(0,$.jsxs)(`p`,{className:`truncate font-mono text-2xs text-muted`,children:[e.id,` · `,n.label,n.experimental&&(0,$.jsx)(`span`,{className:`text-warn`,children:` · experimental`})]})]})]})}),(0,$.jsx)(`td`,{className:`px-3 py-2.5`,children:(0,$.jsx)(R,{account:e})}),(0,$.jsx)(`td`,{className:`tnum px-3 py-2.5 text-right font-mono`,children:e.priority}),(0,$.jsx)(`td`,{className:`tnum px-3 py-2.5 text-right font-mono`,children:e.weight}),(0,$.jsx)(`td`,{className:`px-3 py-2`,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,$.jsx)(U,{label:`1m`,usage:t?.windows[`1m`]}),(0,$.jsx)(U,{label:`5h`,usage:t?.windows[`5h`]}),(0,$.jsx)(U,{label:`24h`,usage:t?.windows[`24h`]})]})}),(0,$.jsx)(`td`,{className:`px-3 py-2.5`,children:(0,$.jsx)(x,{checked:e.enabled,onChange:t=>w(e,t),label:`${e.enabled?`Disable`:`Enable`} ${e.label}`})}),(0,$.jsx)(`td`,{className:`px-2 py-2.5 text-muted`,children:(0,$.jsx)(b,{"aria-hidden":!0,className:`size-4 transition-transform duration-150 group-hover:translate-x-0.5`,strokeWidth:1.75})})]},e.id)})})]})})}),_.length>0&&(0,$.jsx)(Ce,{}),(0,$.jsx)(ve,{open:h,onClose:()=>D(`new`,null)}),(0,$.jsx)(he,{account:C,usage:C?g.get(C.id):void 0,onClose:()=>D(`account`,null)})]})}export{we as Accounts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./cn-BwE4cei0.js";import{
|
|
1
|
+
import{n as e,r as t,t as n}from"./cn-BwE4cei0.js";import{G as r,N as i}from"./index-z8TlFwRe.js";var a={name:`octagon-alert`,size:24,node:[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]],aliases:[`alert-octagon`]};a.node;var o=e(a),s=t(),c={info:{box:`border-info/25 bg-info-soft [&_svg]:text-info`,icon:r},warn:{box:`border-warn/30 bg-warn-soft [&_svg]:text-warn`,icon:i},err:{box:`border-err/30 bg-err-soft [&_svg]:text-err`,icon:o}};function l({tone:e=`info`,title:t,children:r,action:i,className:a}){let{box:o,icon:l}=c[e];return(0,s.jsxs)(`div`,{role:e===`info`?`note`:`alert`,className:n(`flex gap-2.5 rounded-md border px-3 py-2.5 text-[12px] leading-5`,o,a),children:[(0,s.jsx)(l,{"aria-hidden":!0,className:`mt-0.5 size-3.5 shrink-0`,strokeWidth:1.75}),(0,s.jsxs)(`div`,{className:`min-w-0 flex-1 text-fg-2`,children:[t&&(0,s.jsx)(`p`,{className:`font-medium text-fg`,children:t}),r]}),i&&(0,s.jsx)(`div`,{className:`shrink-0 self-center`,children:i})]})}export{l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,n as t,o as n,r,t as i}from"./cn-BwE4cei0.js";import{B as a,D as o,E as s,O as c,Xt as l,Yt as u,h as d,l as f,n as p,st as m,t as h}from"./format-C7Q-B9fI.js";import{t as g}from"./chevron-down-DT349Fth.js";import{n as _,t as v}from"./Switch-DPYlLseH.js";import{n as y,t as b}from"./Markdown-CGgIydUh.js";import{t as x}from"./Callout-DDtTG_BA.js";import{E as S,I as C,P as w,T,V as E,d as D,i as O,m as k,n as A,p as j,r as M,s as N,u as P,x as F,y as I}from"./index-z8TlFwRe.js";import{i as L,n as R,t as z}from"./Field-Cmpgg_1z.js";var B={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};B.node;var V=t(B),H=n(e(),1),U=r(),W={planning:`info`,running:`info`,reviewing:`info`,planned:`accent`,succeeded:`ok`,failed:`err`,cancelled:`neutral`,budget_exhausted:`warn`},G={planning:`planning`,running:`running`,reviewing:`reviewing`,planned:`planned (dry run)`,succeeded:`succeeded`,failed:`failed`,cancelled:`cancelled`,budget_exhausted:`out of budget`},K=new Set([`planning`,`running`,`reviewing`]);function q(e){return K.has(e.status)}function J(e){let t=Number(e);return e.trim()&&Number.isInteger(t)&&t>0?t:void 0}function Y(){let e=c(),[t,n]=(0,H.useState)(),r=l(e.error)&&e.error.status===501,a=e.data??[],o=a.find(e=>e.id===t)??a[0],s=a.find(q);return(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsx)(A,{title:`Goals`,description:`Give the agent team an objective: a planner splits it into tasks, role agents execute them, a reviewer re-plans until it is done or the budget runs out.`}),r?(0,U.jsxs)(x,{tone:`warn`,title:`Goal mode unavailable`,children:[(0,U.jsxs)(`p`,{children:[`This gateway answered `,(0,U.jsx)(`code`,{className:`font-mono text-fg`,children:`501 goals_unavailable`}),`: it was started outside a project. Start it inside a repository with a project brain, or run a goal from the terminal:`]}),(0,U.jsx)(j,{command:`davecode goal "<objective>"`,className:`mt-2 max-w-sm`})]}):(0,U.jsx)(X,{busy:s?.id,onStarted:e=>n(e.id)}),e.isError&&!r&&(0,U.jsx)(x,{tone:`err`,title:`Could not load goals`,children:u(e.error)}),!r&&(0,U.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 xl:grid-cols-[320px_minmax(0,1fr)]`,children:[(0,U.jsxs)(M,{"aria-labelledby":`goal-list-title`,className:`xl:self-start`,children:[(0,U.jsx)(O,{id:`goal-list-title`,title:`History`,meta:a.length?`${a.length} goal${a.length===1?``:`s`}`:void 0}),e.isPending?(0,U.jsx)(P,{rows:4,className:`p-3`}):a.length===0?(0,U.jsx)(N,{icon:w,title:`No goals yet`,description:`Describe an objective above, or try a dry run to see the plan first.`}):(0,U.jsx)(`ul`,{className:`flex flex-col p-1.5`,"aria-label":`Goals`,children:a.map(e=>{let t=e.tasks.filter(e=>e.status===`SUCCESS`).length,r=e.id===o?.id;return(0,U.jsx)(`li`,{children:(0,U.jsxs)(`button`,{type:`button`,"aria-current":r?`true`:void 0,onClick:()=>n(e.id),className:i(`flex w-full flex-col gap-1 rounded-md px-2.5 py-2 text-left transition-colors duration-150`,r?`bg-hover`:`hover:bg-hover/60`),children:[(0,U.jsx)(`span`,{className:`line-clamp-2 text-[13px] leading-5 text-fg`,children:e.objective}),(0,U.jsxs)(`span`,{className:`flex items-center gap-2 text-2xs text-muted`,children:[(0,U.jsx)(F,{tone:W[e.status],dot:!0,pulse:q(e),children:G[e.status]}),(0,U.jsxs)(`span`,{className:`tnum`,children:[t,`/`,e.tasks.length,` tasks`]}),(0,U.jsx)(`span`,{className:`ml-auto`,children:f(Date.parse(e.createdAt))})]})]})},e.id)})})]}),o?(0,U.jsx)(Q,{goal:o}):null]})]})}function X({busy:e,onStarted:t}){let n=a(),[r,i]=(0,H.useState)(``),[o,s]=(0,H.useState)(``),[c,d]=(0,H.useState)(``),[f,p]=(0,H.useState)(``),[m,h]=(0,H.useState)(!1),[g,_]=(0,H.useState)(null);return(0,U.jsxs)(M,{"aria-labelledby":`new-goal-title`,children:[(0,U.jsx)(O,{id:`new-goal-title`,title:`New goal`,meta:(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,U.jsx)(V,{"aria-hidden":!0,className:`size-3.5 text-ok`,strokeWidth:1.75}),`Never emails, posts, pays or signs up: those become drafts`]})}),(0,U.jsxs)(`form`,{onSubmit:e=>{if(e.preventDefault(),!r.trim()){_(`Describe what the team should achieve.`);return}_(null);let a={objective:r.trim()},s=J(o),d=J(c),p=J(f);s&&(a.maxRounds=s),d&&(a.maxTasks=d),p&&(a.maxTokens=p),m&&(a.dryRun=!0),n.mutate(a,{onSuccess:e=>{T({tone:`info`,title:m?`Planning (dry run)`:`Goal started`,description:e.objective}),i(``),t(e)},onError:e=>T({tone:`err`,title:`Could not start the goal`,description:l(e)&&e.code===`busy`?`${e.message}. Goals and the runner take turns on the working tree.`:u(e)})})},className:`flex flex-col gap-3 p-4`,children:[(0,U.jsx)(z,{label:`Objective`,required:!0,error:g,children:({id:e,describedBy:t,invalid:n})=>(0,U.jsx)(L,{id:e,"aria-describedby":t,"aria-invalid":n,rows:2,maxLength:4e3,placeholder:`e.g. Write positioning and landing-page copy for this project, then add a /pricing page`,value:r,onChange:e=>i(e.target.value)})}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,U.jsx)(z,{label:`Max rounds`,className:`w-28`,children:({id:e})=>(0,U.jsx)(R,{id:e,inputMode:`numeric`,placeholder:`4`,value:o,onChange:e=>s(e.target.value)})}),(0,U.jsx)(z,{label:`Max tasks`,className:`w-28`,children:({id:e})=>(0,U.jsx)(R,{id:e,inputMode:`numeric`,placeholder:`12`,value:c,onChange:e=>d(e.target.value)})}),(0,U.jsx)(z,{label:`Token budget`,className:`w-36`,children:({id:e})=>(0,U.jsx)(R,{id:e,inputMode:`numeric`,placeholder:`1000000`,value:f,onChange:e=>p(e.target.value)})}),(0,U.jsxs)(`span`,{className:`flex h-8 items-center gap-2 text-[12px] text-fg-2`,children:[(0,U.jsx)(v,{checked:m,onChange:h,label:`Dry run`}),`Dry run (plan only)`]}),(0,U.jsx)(S,{type:`submit`,variant:`primary`,icon:E,className:`ml-auto`,loading:n.isPending,disabled:n.isPending||!!e&&!m,title:e&&!m?`Goal ${e} is still running`:void 0,children:m?`Plan`:`Start goal`})]})]})]})}function Z({label:e,value:t,max:n,format:r=String}){let a=n>0?Math.min(100,t/n*100):0;return(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1.5`,children:[(0,U.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2 text-[12px]`,children:[(0,U.jsx)(`span`,{className:`text-muted`,children:e}),(0,U.jsxs)(`span`,{className:`tnum font-mono text-fg`,children:[r(t),(0,U.jsxs)(`span`,{className:`text-muted`,children:[` / `,r(n)]})]})]}),(0,U.jsx)(`div`,{className:`h-1.5 overflow-hidden rounded-full bg-track`,"aria-hidden":!0,children:(0,U.jsx)(`div`,{className:i(`h-full rounded-full transition-[width] duration-500 ease-snappy`,a>=90?`bg-warn`:`bg-accent`),style:{width:`${a}%`}})})]})}function Q({goal:e}){let t=d(),n=s(),r=m(),[a,o]=(0,H.useState)(!1),[c,l]=(0,H.useState)(),f=q(e),v=e.tasks.filter(e=>e.status===`SUCCESS`).length,x=r.events.filter(t=>t.type===`goal.log`&&t.goalId===e.id),w=()=>t.mutate(e.id,{onSuccess:e=>T({tone:`info`,title:`Goal ${e.status}`,description:e.objective}),onError:e=>T({tone:`err`,title:`Could not cancel`,description:u(e)})});return(0,U.jsxs)(M,{"aria-labelledby":`goal-detail-title`,className:`min-w-0`,children:[(0,U.jsx)(O,{id:`goal-detail-title`,title:(0,U.jsx)(`span`,{className:`font-mono text-2xs text-muted`,children:e.id}),meta:(0,U.jsx)(F,{tone:W[e.status],dot:!0,pulse:f,children:G[e.status]}),actions:(0,U.jsxs)(U.Fragment,{children:[e.status===`planned`&&(0,U.jsx)(S,{size:`sm`,variant:`primary`,icon:E,loading:n.isPending,onClick:()=>n.mutate(e.id,{onSuccess:e=>T({tone:`info`,title:`Executing planned goal`,description:e.objective}),onError:e=>T({tone:`err`,title:`Could not execute plan`,description:u(e)})}),children:`Execute plan`}),f&&(0,U.jsx)(S,{size:`sm`,variant:`danger`,icon:C,loading:t.isPending,onClick:()=>o(!0),children:`Cancel`})]})}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,U.jsx)(`p`,{className:`text-[15px] leading-6 font-medium text-fg`,children:e.objective}),(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-x-6 gap-y-3`,children:[(0,U.jsx)(Z,{label:`Rounds`,value:e.round,max:e.limits.maxRounds}),(0,U.jsx)(Z,{label:`Tasks done`,value:v,max:Math.max(e.tasks.length,1)}),(0,U.jsx)(Z,{label:`Tokens`,value:e.limits.tokensUsed,max:e.limits.maxTokens,format:p})]}),e.lastError&&(0,U.jsx)(`p`,{className:`rounded-md border border-err/30 bg-err-soft p-2 font-mono text-2xs text-err`,children:e.lastError}),(0,U.jsx)(`section`,{"aria-label":`Tasks`,className:`flex flex-col`,children:e.tasks.length===0?(0,U.jsx)(`p`,{className:`text-[12px] text-muted`,children:f?`The planner is drafting the task graph…`:`No tasks were planned.`}):(0,U.jsx)(`ol`,{className:`flex flex-col divide-y divide-line rounded-md border border-line`,children:e.tasks.map(t=>(0,U.jsxs)(`li`,{className:i(`flex flex-col gap-1.5 px-3 py-2.5`,t.id===e.activeTaskId&&`bg-accent-soft/40`),children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsx)(I,{status:t.status}),(0,U.jsx)(`span`,{className:`font-mono text-2xs text-muted`,children:t.id}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 text-[13px] text-fg`,children:t.title}),(0,U.jsx)(F,{mono:!0,children:t.role}),(0,U.jsx)(F,{tone:t.kind===`code`?`accent`:`neutral`,mono:!0,children:t.kind}),t.round>1&&(0,U.jsxs)(F,{mono:!0,children:[`round `,t.round]})]}),t.dependsOn.length>0&&(0,U.jsxs)(`p`,{className:`text-2xs text-muted`,children:[`after `,t.dependsOn.join(`, `)]}),t.artifact&&(0,U.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 font-mono text-2xs text-fg-2`,children:[(0,U.jsxs)(`button`,{type:`button`,onClick:()=>l(e=>e===t.id?void 0:t.id),"aria-expanded":c===t.id,className:`inline-flex items-center gap-1 rounded px-1 py-0.5 text-fg-2 transition-colors hover:bg-hover hover:text-fg`,children:[c===t.id?(0,U.jsx)(g,{"aria-hidden":!0,className:`size-3.5 text-muted`}):(0,U.jsx)(_,{"aria-hidden":!0,className:`size-3.5 text-muted`}),(0,U.jsx)(y,{"aria-hidden":!0,className:`size-3.5 text-muted`,strokeWidth:1.75}),(0,U.jsx)(`span`,{className:`truncate`,children:t.artifact})]}),(0,U.jsx)(k,{value:t.artifact,label:`Copy path`})]}),c===t.id&&(0,U.jsx)($,{goalId:e.id,taskId:t.id})]}),t.status===`FAILED`&&t.notes&&(0,U.jsx)(`p`,{className:`line-clamp-3 font-mono text-2xs text-err`,children:t.notes})]},t.id))})}),e.summary&&(0,U.jsx)(`section`,{"aria-label":`Summary`,className:`rounded-md border border-line bg-raised/40 p-3`,children:(0,U.jsx)(b,{source:e.summary,className:`text-[13px]`})}),(0,U.jsx)(`section`,{"aria-label":`Goal log`,className:`term max-h-64 overflow-auto rounded-md border border-line bg-term py-2 font-mono text-[12px] leading-[1.6]`,children:x.length===0?(0,U.jsx)(`p`,{className:`px-3 text-muted`,children:f?`Waiting for agent output…`:`No live log for this goal in this session.`}):x.map(e=>(0,U.jsxs)(`div`,{className:`flex gap-3 px-3`,children:[(0,U.jsx)(`span`,{className:`tnum shrink-0 text-faint select-none`,children:h(e.ts)}),(0,U.jsx)(`span`,{className:`w-20 shrink-0 truncate text-info`,children:e.role??`goal`}),(0,U.jsx)(`span`,{className:i(`min-w-0 break-words`,e.level===`error`?`text-err`:e.level===`warn`?`text-warn`:`text-fg-2`),children:e.message})]},`${e.ts}-${e.message}`))})]}),(0,U.jsx)(D,{open:a,onClose:()=>o(!1),title:`Cancel this goal?`,description:`The agent in flight is stopped. Finished artifacts and merged code stay; an interrupted code task keeps its partial work on its branch.`,footer:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(S,{variant:`ghost`,onClick:()=>o(!1),children:`Keep going`}),(0,U.jsx)(S,{variant:`danger`,icon:C,onClick:()=>{o(!1),w()},children:`Cancel goal`})]}),children:(0,U.jsx)(`p`,{className:`text-[12px] text-muted`,children:e.objective})})]})}function $({goalId:e,taskId:t}){let n=o(e,t);return n.isPending?(0,U.jsx)(P,{rows:3,className:`p-2`}):n.isError?(0,U.jsx)(`p`,{className:`rounded-md border border-err/30 bg-err-soft p-2 font-mono text-2xs text-err`,children:u(n.error)}):(0,U.jsxs)(`div`,{className:`rounded-md border border-line bg-raised/50 p-3`,children:[(0,U.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2 border-b border-line pb-1.5`,children:[(0,U.jsx)(`span`,{className:`font-mono text-2xs text-muted`,children:n.data.path}),(0,U.jsx)(k,{value:n.data.content,label:`Copy markdown`})]}),(0,U.jsx)(b,{source:n.data.content,className:`text-[13px]`})]})}export{Q as GoalDetail,Y as Goals,q as isActiveGoal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,o as t,r as n}from"./cn-BwE4cei0.js";import{E as r,
|
|
1
|
+
import{i as e,o as t,r as n}from"./cn-BwE4cei0.js";import{E as r,L as i,X as a,Y as o,k as s,n as c}from"./index-z8TlFwRe.js";import{n as l}from"./Field-Cmpgg_1z.js";var u=t(e(),1),d=[{id:`ponytail`,name:`Ponytail`,kind:`Guidance`,url:`https://github.com/DietrichGebert/ponytail`,description:`Reuse what exists and keep implementations small. Useful for avoiding unnecessary code; it does not supply an art direction.`,access:`Repository; review license before reuse`},{id:`anti-slop`,name:`Anti Slop`,kind:`Guidance`,url:`https://github.com/miqdadbadjuber/anti-slop`,description:`Review recurring generic patterns in interface design, copy and generated code.`,access:`Repository; review license before reuse`},{id:`impeccable`,name:`Impeccable`,kind:`Guidance`,url:`https://github.com/pbakaus/impeccable`,description:`Design guidance for defining a product direction and refining the finished interface.`,access:`Repository; review license before reuse`},{id:`anti-ui-slop`,name:`Anti UI Slop`,kind:`Guidance`,url:`https://github.com/tuanphung2005/anti-ui-slop`,description:`A separate UI-focused ruleset. Compare its constraints with your brief rather than combining conflicting rules.`,access:`Repository; review license before reuse`},{id:`shadcn`,name:`shadcn/ui`,kind:`Components`,url:`https://github.com/shadcn-ui/ui`,description:`Own and adapt the component source. Start from accessible building blocks and make them fit your identity.`,access:`MIT component library`},{id:`radix`,name:`Radix Primitives`,kind:`Components`,url:`https://github.com/radix-ui/primitives`,description:`Accessible interaction primitives for dialogs, menus and other complex interface behaviors.`,access:`MIT component library`},{id:`motion`,name:`Motion`,kind:`Components`,url:`https://github.com/motiondivision/motion`,description:`Animation for React and JavaScript. Use motion to explain a change, with a reduced-motion alternative.`,access:`MIT library; optional paid products are separate`},{id:`r3f`,name:`React Three Fiber`,kind:`Components`,url:`https://github.com/pmndrs/react-three-fiber`,description:`A React renderer for Three.js. Consider it when a real 3D experience serves the idea.`,access:`MIT library; assets have their own licenses`},{id:`awwwards`,name:`Awwwards`,kind:`Inspiration`,url:`https://www.awwwards.com/`,description:`Explore expressive websites and the studios behind them. Study composition and interaction, then create your own interpretation.`,access:`Reference gallery; artwork is not licensed for copying`},{id:`siteinspire`,name:`Siteinspire`,kind:`Inspiration`,url:`https://www.siteinspire.com/`,description:`Find references by style, type and subject instead of starting from the same SaaS template.`,access:`Reference gallery; artwork is not licensed for copying`},{id:`freight`,name:`Studio Freight`,kind:`Inspiration`,url:`https://studiofreight.com/`,description:`A studio reference for thoughtful digital identity and web experiences.`,access:`Studio portfolio; reference only`},{id:`hf`,name:`Hugging Face Spaces`,kind:`AI tools`,url:`https://huggingface.co/spaces`,description:`Discover interactive AI demos. Check each Space, model license and compute requirements before using it in your project.`,access:`Availability, model licenses and costs vary`}];function f(e){return`Help me create a distinctive interface for this project. Use ${e.name} (${e.url}) as a reference if you can access it. Its purpose: ${e.description}\n\nFirst identify the audience, intended outcome and existing design system. Propose a specific visual direction and a short design brief: typography, palette, composition, imagery, interaction and mobile behavior. Preserve the project stack, cover loading/empty/error states, and verify the rendered result. Use references as inspiration and respect their licenses. Do not claim to have read, installed or connected a resource without checking. Explain any external dependency before adding it.`}var p=n(),m=[`All`,`Guidance`,`Components`,`Inspiration`,`AI tools`];function h(){let[e,t]=(0,u.useState)(`All`),[n,h]=(0,u.useState)(``),g=d.filter(t=>(e===`All`||t.kind===e)&&`${t.name} ${t.description}`.toLowerCase().includes(n.toLowerCase()));return(0,p.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,p.jsx)(c,{title:`Creative library`,description:`Find a direction before you build. A curated starting point for people with ideas, with guidance, components and real design references.`}),(0,p.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,p.jsx)(`fieldset`,{className:`flex flex-wrap gap-1`,"aria-label":`Resource category`,children:m.map(n=>(0,p.jsx)(r,{variant:n===e?`primary`:`ghost`,onClick:()=>t(n),"aria-pressed":n===e,children:n},n))}),(0,p.jsxs)(`label`,{htmlFor:`creative-search`,className:`relative ml-auto w-full max-w-xs`,children:[(0,p.jsx)(`span`,{className:`sr-only`,children:`Find a creative resource`}),(0,p.jsx)(i,{"aria-hidden":!0,className:`absolute top-2.5 left-2.5 size-3.5 text-muted`}),(0,p.jsx)(l,{id:`creative-search`,value:n,onChange:e=>h(e.target.value),placeholder:`Find a resource…`,className:`pl-8`})]})]}),(0,p.jsx)(`div`,{className:`grid gap-x-8 md:grid-cols-2 xl:grid-cols-3`,children:g.map(e=>(0,p.jsxs)(`article`,{className:`flex flex-col items-start border-t border-line py-6`,children:[(0,p.jsx)(`p`,{className:`text-[12px] text-accent-text`,children:e.kind}),(0,p.jsx)(`h2`,{className:`mt-3 text-[21px] font-medium tracking-tight text-fg`,children:e.name}),(0,p.jsx)(`p`,{className:`mt-3 max-w-sm flex-1 text-[13px] leading-6 text-muted`,children:e.description}),(0,p.jsx)(`p`,{className:`mt-4 text-[11px] leading-5 text-muted`,children:e.access}),(0,p.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-4`,children:[(0,p.jsx)(r,{size:`sm`,onClick:()=>s(`/?brief=${encodeURIComponent(f(e))}`),children:`Use in a goal`}),(0,p.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-[12px] text-fg-2 hover:text-fg`,children:[`Visit source`,(0,p.jsx)(a,{"aria-hidden":!0,className:`size-3`})]})]})]},e.id))}),g.length===0&&(0,p.jsx)(`p`,{role:`status`,className:`py-8 text-[13px] text-muted`,children:`No resources match. Try another name or category.`}),(0,p.jsxs)(`div`,{className:`flex gap-3 border-t border-line pt-5 text-[12px] leading-6 text-muted`,children:[(0,p.jsx)(o,{"aria-hidden":!0,className:`mt-1 size-4 shrink-0`}),(0,p.jsx)(`p`,{children:`These are curated references, not installed plugins. “Use in a goal” prepares a brief for your agent; it does not run code, fetch a site or connect an account. DaveCode includes its own design-quality guidance by default. Third-party resources keep their own licenses and access requirements.`})]})]})}export{h as Library};
|