@openork/cli 0.1.1 → 0.2.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/commands/doctor.d.ts +12 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +110 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/gateway/start.d.ts.map +1 -1
- package/dist/commands/gateway/start.js +14 -0
- package/dist/commands/gateway/start.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +19 -0
- package/dist/commands/setup.js.map +1 -1
- package/dist/lib/doctor.d.ts +28 -0
- package/dist/lib/doctor.d.ts.map +1 -0
- package/dist/lib/doctor.js +227 -0
- package/dist/lib/doctor.js.map +1 -0
- package/dist/openapi.yml +770 -0
- package/dist/prisma/migrations/20260401135027_add_auth_rbac_multitenancy/migration.sql +211 -0
- package/dist/prisma/schema.prisma +101 -0
- package/dist/server.js +70470 -26803
- package/dist/server.js.map +1 -1
- package/dist/web/assets/{activity-feed-D_eonDKG.js → activity-feed-CNgi7Qb_.js} +1 -1
- package/dist/web/assets/agent-edit-CgbnHiT5.js +98 -0
- package/dist/web/assets/agent-sessions-Bpay1_ZH.js +1 -0
- package/dist/web/assets/agent-use-BaBxQ2fx.js +1 -0
- package/dist/web/assets/agents-Dwbd6TQx.js +1 -0
- package/dist/web/assets/api-DNWoqIPN.js +1 -0
- package/dist/web/assets/arrow-down-upU5tcpi.js +1 -0
- package/dist/web/assets/arrow-left-BiNeYcK0.js +1 -0
- package/dist/web/assets/auth-client-ys1jC854.js +1 -0
- package/dist/web/assets/chat-BP5H9CWl.js +4 -0
- package/dist/web/assets/{chat-input-BepRPV_L.js → chat-input-CKAtAtgG.js} +2 -2
- package/dist/web/assets/{chat-message-CbcDeDcb.js → chat-message-CW-HnO3f.js} +3 -3
- package/dist/web/assets/chat-new-BQp9Bn7Q.js +1 -0
- package/dist/web/assets/chat-sessions-D3bS5vba.js +1 -0
- package/dist/web/assets/chats-DJolHH4e.js +1 -0
- package/dist/web/assets/{circle-alert-W8QX9LOG.js → circle-alert-D040vPU_.js} +1 -1
- package/dist/web/assets/circle-check-CW3adL8A.js +1 -0
- package/dist/web/assets/{circle-x-D_8Tcgt1.js → circle-x-34c-1fVL.js} +1 -1
- package/dist/web/assets/code-BFUT4gGT.js +1 -0
- package/dist/web/assets/{code-editor-x9L6nkh4.js → code-editor-I6vK5q_W.js} +1 -1
- package/dist/web/assets/commands-DBI4Bb2N.js +8 -0
- package/dist/web/assets/{copy-C87mjn_Y.js → copy-DI5qjA1p.js} +1 -1
- package/dist/web/assets/credentials-D8VN8A5M.js +1 -0
- package/dist/web/assets/{crown-BJEsQkh4.js → crown-DWB5bSnq.js} +1 -1
- package/dist/web/assets/dashboard-Cc6KWs62.js +1 -0
- package/dist/web/assets/{database-BohjTljV.js → database-5jczNGML.js} +1 -1
- package/dist/web/assets/debug-DewdHeoW.js +1 -0
- package/dist/web/assets/{download-B2UOiYAS.js → download-CwO6xusv.js} +1 -1
- package/dist/web/assets/{eye-DN-Km5vf.js → eye-BQGasWwb.js} +1 -1
- package/dist/web/assets/{file-plus-B8qWemgt.js → file-plus-kHgvf9P8.js} +1 -1
- package/dist/web/assets/file-tree-CTe61XCg.js +1 -0
- package/dist/web/assets/{folder-plus-DsmP6Mur.js → folder-plus-mZAz-QpJ.js} +1 -1
- package/dist/web/assets/{globe-fwFSeXZn.js → globe-C0WHVFW_.js} +1 -1
- package/dist/web/assets/{grip-vertical-Djo-yR-o.js → grip-vertical-CdhrWSnV.js} +1 -1
- package/dist/web/assets/{history-CyBBboEp.js → history-w7qYglj5.js} +1 -1
- package/dist/web/assets/index-9X_UIor3.css +2 -0
- package/dist/web/assets/index-DWNLSHpo.js +4 -0
- package/dist/web/assets/key-DJEQ_jUi.js +1 -0
- package/dist/web/assets/{layers-ephyCrDm.js → layers-KZu6CpGE.js} +1 -1
- package/dist/web/assets/{layout-grid-DCVGg8ZA.js → layout-grid-U17jhSjz.js} +1 -1
- package/dist/web/assets/login-DoSA7KtI.js +1 -0
- package/dist/web/assets/mcp-setup-Cyj1YAiY.js +17 -0
- package/dist/web/assets/memory-DWZU2Tfl.js +1 -0
- package/dist/web/assets/new-chat-BRS3DM8Z.js +1 -0
- package/dist/web/assets/play-BzkxV_O-.js +1 -0
- package/dist/web/assets/{refresh-cw-RFYUf5GB.js → refresh-cw-D3_GZ86i.js} +1 -1
- package/dist/web/assets/register-BS5OkCgS.js +1 -0
- package/dist/web/assets/rotate-ccw-CkJIdGxi.js +1 -0
- package/dist/web/assets/{save-Dewm93H6.js → save-BXEZF80P.js} +1 -1
- package/dist/web/assets/search-BmZSwFnA.js +1 -0
- package/dist/web/assets/{send-FWvygYFQ.js → send-CNiXC6KO.js} +1 -1
- package/dist/web/assets/server-C5bKQLDi.js +1 -0
- package/dist/web/assets/settings-CBAhSOZM.js +1 -0
- package/dist/web/assets/shield-CMMTdOiM.js +1 -0
- package/dist/web/assets/{shield-check-Dt7sXtBF.js → shield-check-BmphmMlD.js} +1 -1
- package/dist/web/assets/{shuffle-DjvBJ7XV.js → shuffle-Dv_-PFl5.js} +1 -1
- package/dist/web/assets/src-CaF63bXY.js +24 -0
- package/dist/web/assets/sse-url-qohTy4Sw.js +1 -0
- package/dist/web/assets/team-edit-BW1bePKn.js +1 -0
- package/dist/web/assets/team-sessions-GspGc7zN.js +1 -0
- package/dist/web/assets/team-use-BVC7nt9K.js +3 -0
- package/dist/web/assets/terminal-CjSFIwMK.js +1 -0
- package/dist/web/assets/{timer-C9X20mTO.js → timer-3siC9tpd.js} +1 -1
- package/dist/web/assets/{useMutation-BlOHt3MR.js → useMutation-DA8-TvTt.js} +1 -1
- package/dist/web/assets/{utils-DHTPP40O.js → utils-D1nRmcA6.js} +1 -1
- package/dist/web/assets/workflow-edit-DkmsARCv.js +4 -0
- package/dist/web/assets/workflow-runs-DcJPL7Bo.js +1 -0
- package/dist/web/assets/workflows-Dnx0dwJn.js +1 -0
- package/dist/web/assets/{wrench-DZBtSPP8.js → wrench-u8B_fDwT.js} +1 -1
- package/dist/web/assets/{zap-CbT5plGA.js → zap-hOn7wkXe.js} +1 -1
- package/dist/web/index.html +9 -7
- package/package.json +1 -1
- package/dist/web/assets/agent-edit-CblZItU5.js +0 -98
- package/dist/web/assets/agent-sessions-COpCcffa.js +0 -1
- package/dist/web/assets/agent-use-F4pOt3KJ.js +0 -1
- package/dist/web/assets/agents-Av7w2wHE.js +0 -1
- package/dist/web/assets/arrow-down-XHN5PD1k.js +0 -1
- package/dist/web/assets/arrow-left-wtNmm6Le.js +0 -1
- package/dist/web/assets/chat-CQvfLy7Y.js +0 -4
- package/dist/web/assets/chat-new-BOtDuYij.js +0 -1
- package/dist/web/assets/chat-sessions-CaCaK_PC.js +0 -1
- package/dist/web/assets/chats-64IReeGV.js +0 -1
- package/dist/web/assets/circle-check-DLl9fl65.js +0 -1
- package/dist/web/assets/code-Brz4KHlI.js +0 -1
- package/dist/web/assets/commands-DT9K8bae.js +0 -8
- package/dist/web/assets/credentials-DC-HOVxW.js +0 -1
- package/dist/web/assets/dashboard-OfnNUjFX.js +0 -1
- package/dist/web/assets/debug-Et9rgBM8.js +0 -1
- package/dist/web/assets/file-tree-DkLQ1z0I.js +0 -1
- package/dist/web/assets/index-YgjFlLLv.css +0 -2
- package/dist/web/assets/index-dc8HGqTp.js +0 -2
- package/dist/web/assets/mcp-setup-BfMdYdsI.js +0 -17
- package/dist/web/assets/memory-DAQ474-p.js +0 -1
- package/dist/web/assets/new-chat-DtMw6FMg.js +0 -1
- package/dist/web/assets/play-DXJMtO-K.js +0 -1
- package/dist/web/assets/search-Ww0msJQz.js +0 -1
- package/dist/web/assets/settings-Auyn4Z5T.js +0 -1
- package/dist/web/assets/src-DUhGoAQb.js +0 -24
- package/dist/web/assets/team-edit-DO-RX3lC.js +0 -1
- package/dist/web/assets/team-sessions-DSw8MTtZ.js +0 -1
- package/dist/web/assets/team-use-BfNvsFcO.js +0 -3
- package/dist/web/assets/terminal-CIapYonS.js +0 -1
- package/dist/web/assets/workflow-edit-D0FNyl64.js +0 -4
- package/dist/web/assets/workflow-runs-CPVvaVzN.js +0 -1
- package/dist/web/assets/workflows-C9jurJiE.js +0 -1
- /package/dist/web/assets/{api-docs-BQzn4-6U.js → api-docs-DgRFxVfh.js} +0 -0
- /package/dist/web/assets/{bi-gM8sIAZV.js → bi-Da3wz7XD.js} +0 -0
- /package/dist/web/assets/{cron-COUPKvGu.js → cron-3VyztcE9.js} +0 -0
- /package/dist/web/assets/{vendor-editor-BORFA-rZ.js → vendor-editor-Cx3Ogh9u.js} +0 -0
- /package/dist/web/assets/{vendor-ui-Dpw9mBc-.js → vendor-ui-DnL9d3od.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{h as t,t as n}from"./vendor-react-BJ8SIkmN.js";import{r,t as i}from"./useQuery-DvovkaPT.js";import{t as a}from"./useMutation-BlOHt3MR.js";import{A as o,D as s,F as c,I as l,L as u,O as ee,T as d,U as f,V as p,a as m,i as te,k as h,n as ne,q as g,r as _,w as v}from"./src-DUhGoAQb.js";import{t as y}from"./circle-alert-W8QX9LOG.js";import{t as b}from"./circle-check-DLl9fl65.js";import{t as re}from"./database-BohjTljV.js";import{t as ie}from"./globe-fwFSeXZn.js";import{t as ae}from"./refresh-cw-RFYUf5GB.js";import{t as oe}from"./search-Ww0msJQz.js";import{D as se,G as x,K as S,M as ce,U as C,k as le,t as w,w as T}from"./index-dc8HGqTp.js";var E=c(`circle-arrow-down`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 8v8`,key:`napkw2`}],[`path`,{d:`m8 12 4 4 4-4`,key:`k98ssh`}]]),D=c(`circle-arrow-up`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]]),O=c(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),k=e(t(),1),A=n(),j={working:{label:`memory.tierWorking`,color:`bg-yellow-500/15 text-yellow-700 dark:text-yellow-400`},"short-term":{label:`memory.tierShortTerm`,color:`bg-blue-500/15 text-blue-700 dark:text-blue-400`},"long-term":{label:`memory.tierLongTerm`,color:`bg-green-500/15 text-green-700 dark:text-green-400`}},M={global:{label:`memory.scopeGlobal`,icon:ie},agent:{label:`memory.scopeAgent`,icon:S},team:{label:`memory.scopeTeam`,icon:se}},N={insight:`memory.categoryInsight`,decision:`memory.categoryDecision`,fact:`memory.categoryFact`,preference:`memory.categoryPreference`,"error-pattern":`memory.categoryErrorPattern`,summary:`memory.categorySummary`,other:`memory.categoryOther`},P={"team-run":`memory.sourceTeamRun`,"agent-self":`memory.sourceAgent`,human:`memory.sourceHuman`,system:`memory.sourceSystem`,external:`memory.sourceExternal`},F=`flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`;function I(e,t){return new Date(e).toLocaleDateString(t,{day:`numeric`,month:`short`,year:`numeric`,hour:`2-digit`,minute:`2-digit`})}function L({value:e}){return(0,A.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,A.jsx)(`div`,{className:`h-1.5 w-16 rounded-full bg-muted overflow-hidden`,children:(0,A.jsx)(`div`,{className:`h-full rounded-full bg-primary transition-all`,style:{width:`${Math.round(e*100)}%`}})}),(0,A.jsxs)(`span`,{className:`text-[10px] text-muted-foreground tabular-nums`,children:[(e*100).toFixed(0),`%`]})]})}function ue({entry:e,onDelete:t,onPromote:n,onDemote:r,dateLocale:i}){let{t:a}=T(),o=j[e.tier],s=M[e.scope],c=s.icon;return(0,A.jsx)(l,{className:`group`,children:(0,A.jsxs)(u,{className:`p-4 space-y-2`,children:[(0,A.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,A.jsx)(f,{variant:`secondary`,className:`text-[10px] ${o.color}`,children:a(o.label)}),(0,A.jsxs)(f,{variant:`outline`,className:`text-[10px] gap-1`,children:[(0,A.jsx)(c,{className:`h-3 w-3`}),a(s.label),e.agentId&&(0,A.jsxs)(`span`,{className:`opacity-60`,children:[`:`,e.agentId.slice(0,8)]}),e.teamId&&(0,A.jsxs)(`span`,{className:`opacity-60`,children:[`:`,e.teamId.slice(0,8)]})]}),e.category&&(0,A.jsx)(f,{variant:`secondary`,className:`text-[10px]`,children:a(N[e.category])}),e.approvedBy&&(0,A.jsxs)(f,{variant:`secondary`,className:`text-[10px] gap-0.5`,children:[(0,A.jsx)(b,{className:`h-2.5 w-2.5`}),e.approvedBy]})]}),(0,A.jsxs)(`div`,{className:`flex gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0`,children:[e.tier===`short-term`&&(0,A.jsx)(p,{variant:`ghost`,size:`sm`,className:`h-7 w-7 p-0`,title:a(`memory.promoteToLongTerm`),onClick:()=>n(e),children:(0,A.jsx)(D,{className:`h-3.5 w-3.5 text-green-600`})}),e.tier===`long-term`&&(0,A.jsx)(p,{variant:`ghost`,size:`sm`,className:`h-7 w-7 p-0`,title:a(`memory.demoteToShortTerm`),onClick:()=>r(e),children:(0,A.jsx)(E,{className:`h-3.5 w-3.5 text-orange-500`})}),(0,A.jsx)(p,{variant:`ghost`,size:`sm`,className:`h-7 w-7 p-0 text-destructive`,title:a(`common.delete`),onClick:()=>t(e),children:(0,A.jsx)(le,{className:`h-3.5 w-3.5`})})]})]}),(0,A.jsx)(`p`,{className:`text-sm leading-relaxed line-clamp-3`,children:e.content}),e.summary&&(0,A.jsx)(`p`,{className:`text-xs text-muted-foreground italic line-clamp-2`,children:e.summary}),e.tags.length>0&&(0,A.jsxs)(`div`,{className:`flex items-center gap-1 flex-wrap`,children:[(0,A.jsx)(O,{className:`h-3 w-3 text-muted-foreground`}),e.tags.map(e=>(0,A.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground`,children:e},e))]}),(0,A.jsxs)(`div`,{className:`flex items-center justify-between text-[11px] text-muted-foreground pt-1`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,A.jsx)(L,{value:e.importance}),(0,A.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,A.jsx)(C,{className:`h-3 w-3`}),I(e.createdAt,i)]}),(0,A.jsx)(`span`,{children:a(P[e.source.type])??e.source.type})]}),(0,A.jsx)(`span`,{className:`tabular-nums`,children:a(`memory.accessCount`,{count:e.accessCount})})]})]})})}function de({pending:e,onApprove:t,dateLocale:n}){let{t:r}=T();return(0,A.jsx)(l,{className:`border-dashed border-orange-500/40`,children:(0,A.jsxs)(u,{className:`p-4 space-y-2`,children:[(0,A.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(y,{className:`h-4 w-4 text-orange-500`}),(0,A.jsx)(`span`,{className:`text-xs font-medium text-orange-600 dark:text-orange-400`,children:r(`memory.pendingApproval`)}),(0,A.jsx)(f,{variant:`secondary`,className:`text-[10px]`,children:r(`memory.score`,{value:(e.classificationScore*100).toFixed(0)})})]}),(0,A.jsxs)(p,{size:`sm`,variant:`outline`,onClick:()=>t(e.entry.id),children:[(0,A.jsx)(D,{className:`h-3.5 w-3.5 mr-1`}),r(`memory.approve`)]})]}),(0,A.jsx)(`p`,{className:`text-sm leading-relaxed line-clamp-3`,children:e.entry.content}),(0,A.jsx)(`div`,{className:`text-[11px] text-muted-foreground`,children:I(e.createdAt,n)})]})})}var fe={content:``,scope:`global`,agentId:``,teamId:``,tier:`long-term`,category:`fact`,tags:``,importance:.5};function R(){let{t:e,getDateLocale:t}=T(),n=t(),c=r(),[C,le]=(0,k.useState)(`all`),[E,D]=(0,k.useState)(``),[O,j]=(0,k.useState)(``),[M,P]=(0,k.useState)(``),[I,L]=(0,k.useState)(!1),[R,z]=(0,k.useState)({...fe}),[B,V]=(0,k.useState)(null),H=i({queryKey:[`memory`,`global`],queryFn:()=>g.memory.listGlobal(),staleTime:3e4}),U=i({queryKey:[`memory`,`search`,E,O,M],queryFn:()=>g.memory.search({text:E||void 0,tiers:O||void 0,category:M||void 0,limit:50}),enabled:!!(E||O||M),staleTime:1e4}),W=i({queryKey:[`memory`,`pending`],queryFn:()=>g.memory.getPending(),staleTime:3e4}),G=()=>{c.invalidateQueries({queryKey:[`memory`]})},K=a({mutationFn:()=>g.memory.create({content:R.content,scope:R.scope,agentId:R.scope===`agent`?R.agentId:void 0,teamId:R.scope===`team`?R.teamId:void 0,tier:R.tier,category:R.category,tags:R.tags.split(`,`).map(e=>e.trim()).filter(Boolean),importance:R.importance}),onSuccess:()=>{G(),L(!1),z({...fe}),w.success(e(`memory.created`))},onError:t=>w.error(t instanceof Error?t.message:e(`common.error`))}),q=a({mutationFn:e=>{let t;return e.scope===`agent`?t=e.agentId:e.scope===`team`&&(t=e.teamId),g.memory.delete(e.id,e.scope,t)},onSuccess:()=>{G(),V(null),w.success(e(`memory.deleted`))},onError:t=>w.error(t instanceof Error?t.message:e(`common.error`))}),pe=a({mutationFn:e=>g.memory.promote(e.id),onSuccess:()=>{G(),w.success(e(`memory.promoted`))},onError:t=>w.error(t instanceof Error?t.message:e(`common.error`))}),me=a({mutationFn:e=>{let t;return e.scope===`agent`?t=e.agentId:e.scope===`team`&&(t=e.teamId),g.memory.demote(e.id,e.scope,t)},onSuccess:()=>{G(),w.success(e(`memory.demoted`))},onError:t=>w.error(t instanceof Error?t.message:e(`common.error`))}),J=a({mutationFn:()=>g.memory.rebuildIndex(),onSuccess:()=>{G(),w.success(e(`memory.indexRebuilt`))},onError:t=>w.error(t instanceof Error?t.message:e(`common.error`))}),Y=!!(E||O||M),X=(0,k.useMemo)(()=>Y&&U.data?U.data.results.map(e=>e.entry):H.data?.entries??[],[Y,U.data,H.data]),he=(0,k.useMemo)(()=>C===`all`?X:C===`global`?X.filter(e=>e.scope===`global`):C===`agent`?X.filter(e=>e.scope===`agent`):C===`team`?X.filter(e=>e.scope===`team`):X,[C,X]),Z=W.data?.pending??[],Q=Y?U.isLoading:H.isLoading,$=e=>z(t=>({...t,...e}));return(0,A.jsxs)(`div`,{className:`p-6 max-w-5xl mx-auto space-y-6`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsxs)(`h1`,{className:`text-2xl font-bold flex items-center gap-2`,children:[(0,A.jsx)(x,{className:`h-6 w-6`}),e(`memory.title`)]}),(0,A.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e(`memory.description`)})]}),(0,A.jsxs)(`div`,{className:`flex gap-2`,children:[(0,A.jsxs)(p,{variant:`outline`,size:`sm`,onClick:()=>J.mutate(),disabled:J.isPending,children:[(0,A.jsx)(ae,{className:`h-3.5 w-3.5 mr-1.5 ${J.isPending?`animate-spin`:``}`}),e(`memory.rebuildIndex`)]}),(0,A.jsxs)(p,{onClick:()=>L(!0),children:[(0,A.jsx)(ce,{className:`h-4 w-4 mr-1.5`}),e(`memory.newMemory`)]})]})]}),(0,A.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,A.jsxs)(`div`,{className:`relative flex-1`,children:[(0,A.jsx)(oe,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground`}),(0,A.jsx)(v,{value:E,onChange:e=>D(e.target.value),placeholder:e(`memory.searchPlaceholder`),className:`pl-9`})]}),(0,A.jsxs)(`select`,{value:O,onChange:e=>j(e.target.value),className:`${F} w-40`,children:[(0,A.jsx)(`option`,{value:``,children:e(`memory.allTiers`)}),(0,A.jsx)(`option`,{value:`working`,children:e(`memory.tierWorking`)}),(0,A.jsx)(`option`,{value:`short-term`,children:e(`memory.tierShortTerm`)}),(0,A.jsx)(`option`,{value:`long-term`,children:e(`memory.tierLongTerm`)})]}),(0,A.jsxs)(`select`,{value:M,onChange:e=>P(e.target.value),className:`${F} w-40`,children:[(0,A.jsx)(`option`,{value:``,children:e(`memory.allCategories`)}),Object.keys(N).map(t=>(0,A.jsx)(`option`,{value:t,children:e(N[t])},t))]})]}),(0,A.jsxs)(ne,{value:C,onValueChange:le,children:[(0,A.jsxs)(te,{children:[(0,A.jsxs)(m,{value:`all`,className:`gap-1.5`,children:[(0,A.jsx)(re,{className:`h-3.5 w-3.5`}),e(`memory.all`),(0,A.jsx)(f,{variant:`secondary`,className:`text-[10px] ml-1 px-1.5 py-0`,children:X.length})]}),(0,A.jsxs)(m,{value:`global`,className:`gap-1.5`,children:[(0,A.jsx)(ie,{className:`h-3.5 w-3.5`}),e(`memory.scopeGlobal`)]}),(0,A.jsxs)(m,{value:`agent`,className:`gap-1.5`,children:[(0,A.jsx)(S,{className:`h-3.5 w-3.5`}),e(`memory.scopeAgent`)]}),(0,A.jsxs)(m,{value:`team`,className:`gap-1.5`,children:[(0,A.jsx)(se,{className:`h-3.5 w-3.5`}),e(`memory.scopeTeam`)]}),(0,A.jsxs)(m,{value:`pending`,className:`gap-1.5`,children:[(0,A.jsx)(y,{className:`h-3.5 w-3.5`}),e(`memory.pending`),Z.length>0&&(0,A.jsx)(f,{variant:`destructive`,className:`text-[10px] ml-1 px-1.5 py-0`,children:Z.length})]})]}),[`all`,`global`,`agent`,`team`].map(t=>(0,A.jsxs)(_,{value:t,className:`mt-4 space-y-3`,children:[Q&&(0,A.jsx)(`div`,{className:`grid gap-3`,children:[1,2,3].map(e=>(0,A.jsx)(l,{className:`animate-pulse`,children:(0,A.jsx)(u,{className:`p-4 h-28`})},e))}),!Q&&(he.length===0?(0,A.jsx)(l,{children:(0,A.jsxs)(u,{className:`p-8 text-center text-muted-foreground`,children:[(0,A.jsx)(x,{className:`h-12 w-12 mx-auto mb-3 opacity-30`}),(0,A.jsx)(`p`,{children:e(`memory.noMemories`)}),(0,A.jsx)(`p`,{className:`text-xs mt-1`,children:e(Y?`memory.tryFilters`:`memory.autoCreate`)})]})}):(0,A.jsx)(`div`,{className:`grid gap-3`,children:he.map(e=>(0,A.jsx)(ue,{entry:e,onDelete:V,onPromote:e=>pe.mutate(e),onDemote:e=>me.mutate(e),dateLocale:n},e.id))}))]},t)),(0,A.jsxs)(_,{value:`pending`,className:`mt-4 space-y-3`,children:[W.isLoading&&(0,A.jsx)(`div`,{className:`grid gap-3`,children:[1,2].map(e=>(0,A.jsx)(l,{className:`animate-pulse`,children:(0,A.jsx)(u,{className:`p-4 h-24`})},e))}),!Q&&(Z.length===0?(0,A.jsx)(l,{children:(0,A.jsxs)(u,{className:`p-8 text-center text-muted-foreground`,children:[(0,A.jsx)(b,{className:`h-12 w-12 mx-auto mb-3 opacity-30`}),(0,A.jsx)(`p`,{children:e(`memory.noPending`)}),(0,A.jsx)(`p`,{className:`text-xs mt-1`,children:e(`memory.pendingHelp`)})]})}):(0,A.jsx)(`div`,{className:`grid gap-3`,children:Z.map(e=>(0,A.jsx)(de,{pending:e,onApprove:e=>pe.mutate({id:e}),dateLocale:n},e.entry.id))}))]})]}),(0,A.jsx)(d,{open:I,onOpenChange:L,children:(0,A.jsxs)(s,{className:`sm:max-w-lg`,children:[(0,A.jsx)(h,{children:(0,A.jsx)(o,{children:e(`memory.newMemory`)})}),(0,A.jsxs)(`div`,{className:`space-y-4`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:e(`memory.content`)}),(0,A.jsx)(`textarea`,{value:R.content,onChange:e=>$({content:e.target.value}),placeholder:e(`memory.contentPlaceholder`),rows:4,className:`flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring resize-none`})]}),(0,A.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:e(`memory.scope`)}),(0,A.jsxs)(`select`,{value:R.scope,onChange:e=>$({scope:e.target.value}),className:F,children:[(0,A.jsx)(`option`,{value:`global`,children:e(`memory.scopeGlobal`)}),(0,A.jsx)(`option`,{value:`agent`,children:e(`memory.scopeAgent`)}),(0,A.jsx)(`option`,{value:`team`,children:e(`memory.scopeTeam`)})]})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:e(`memory.tier`)}),(0,A.jsxs)(`select`,{value:R.tier,onChange:e=>$({tier:e.target.value}),className:F,children:[(0,A.jsx)(`option`,{value:`long-term`,children:e(`memory.tierLongTerm`)}),(0,A.jsx)(`option`,{value:`short-term`,children:e(`memory.tierShortTerm`)}),(0,A.jsx)(`option`,{value:`working`,children:e(`memory.tierWorking`)})]})]})]}),R.scope===`agent`&&(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:e(`memory.agentIdLabel`)}),(0,A.jsx)(v,{value:R.agentId,onChange:e=>$({agentId:e.target.value}),placeholder:e(`memory.agentIdPlaceholder`)})]}),R.scope===`team`&&(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:e(`memory.teamIdLabel`)}),(0,A.jsx)(v,{value:R.teamId,onChange:e=>$({teamId:e.target.value}),placeholder:e(`memory.teamIdPlaceholder`)})]}),(0,A.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:e(`memory.category`)}),(0,A.jsx)(`select`,{value:R.category,onChange:e=>$({category:e.target.value}),className:F,children:Object.keys(N).map(t=>(0,A.jsx)(`option`,{value:t,children:e(N[t])},t))})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:e(`memory.importance`,{value:(R.importance*100).toFixed(0)})}),(0,A.jsx)(`input`,{type:`range`,min:0,max:1,step:.05,value:R.importance,onChange:e=>$({importance:parseFloat(e.target.value)}),className:`w-full mt-2`})]})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`label`,{className:`text-xs font-medium text-muted-foreground`,children:e(`memory.tagsLabel`)}),(0,A.jsx)(v,{value:R.tags,onChange:e=>$({tags:e.target.value}),placeholder:`tag1, tag2, tag3`})]})]}),(0,A.jsxs)(ee,{children:[(0,A.jsx)(p,{variant:`outline`,onClick:()=>L(!1),children:e(`common.cancel`)}),(0,A.jsx)(p,{onClick:()=>K.mutate(),disabled:K.isPending||!R.content.trim(),children:K.isPending?e(`common.creating`):e(`common.create`)})]})]})}),(0,A.jsx)(d,{open:!!B,onOpenChange:()=>V(null),children:(0,A.jsxs)(s,{className:`sm:max-w-sm`,children:[(0,A.jsx)(h,{children:(0,A.jsx)(o,{children:e(`memory.deleteTitle`)})}),(0,A.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`memory.deleteWarning`)}),(0,A.jsxs)(ee,{children:[(0,A.jsx)(p,{variant:`outline`,onClick:()=>V(null),children:e(`common.cancel`)}),(0,A.jsx)(p,{variant:`destructive`,disabled:q.isPending,onClick:()=>B&&q.mutate(B),children:q.isPending?e(`common.deleting`):e(`common.delete`)})]})]})})]})}export{R as Memory};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{h as t,l as n,t as r}from"./vendor-react-BJ8SIkmN.js";import{t as i}from"./useQuery-DvovkaPT.js";import{V as a,q as o}from"./src-DUhGoAQb.js";import{L as s,U as c,V as l,h as u,w as d}from"./index-dc8HGqTp.js";var f=e(t(),1),p=r();function m(){let{t:e}=d(),t=n(),[r,m]=(0,f.useState)(!1),{data:g,isLoading:_}=i({queryKey:[`chat-workspaces`],queryFn:()=>o.chat.getWorkspaces({page:1,pageSize:100})}),v=[...g?.data??[]].sort((e,t)=>t.sessionCount-e.sessionCount),y=e=>{t(`/chat/new?workspace=${encodeURIComponent(e)}`)};return(0,p.jsx)(`div`,{className:`flex h-full items-start justify-center overflow-auto`,children:(0,p.jsxs)(`div`,{className:`w-full max-w-lg px-6 py-12`,children:[(0,p.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,p.jsx)(s,{className:`h-10 w-10 mx-auto mb-3 text-muted-foreground`}),(0,p.jsx)(`h1`,{className:`text-2xl font-bold`,children:e(`newChat.title`)}),(0,p.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e(`newChat.selectWorkspace`)})]}),(0,p.jsx)(`div`,{className:`mb-6`,children:(0,p.jsxs)(a,{variant:`outline`,className:`w-full justify-start gap-2`,onClick:async()=>{m(!0);try{let e=await o.fs.pickFolder();e.path&&y(e.path)}finally{m(!1)}},disabled:r,children:[(0,p.jsx)(l,{className:`h-4 w-4`}),e(r?`newChat.selecting`:`newChat.selectFolder`)]})}),(0,p.jsxs)(`div`,{children:[(0,p.jsxs)(`h2`,{className:`flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-3`,children:[(0,p.jsx)(c,{className:`h-3 w-3`}),e(`newChat.recentWorkspaces`)]}),_&&(0,p.jsx)(u,{count:3}),!_&&(v.length===0?(0,p.jsx)(`div`,{className:`text-sm text-muted-foreground text-center py-4`,children:e(`newChat.noHistory`)}):(0,p.jsx)(`div`,{className:`space-y-1`,children:v.map(e=>(0,p.jsx)(h,{workspace:e,onSelect:()=>y(e.workspacePath),onViewSessions:()=>t(`/chat/${e.projectHash}`)},e.projectHash))}))]})]})})}function h({workspace:e,onSelect:t,onViewSessions:n}){let{t:r}=d();return(0,p.jsxs)(`div`,{className:`group flex items-center gap-2 rounded-md border px-3 py-2.5 hover:border-primary/50 transition-colors`,children:[(0,p.jsxs)(`button`,{onClick:t,className:`flex items-center gap-2 flex-1 min-w-0 text-left`,children:[(0,p.jsx)(l,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,p.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,p.jsx)(`div`,{className:`text-sm font-medium truncate`,children:e.workspaceName}),(0,p.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:e.workspacePath})]})]}),(0,p.jsxs)(`button`,{onClick:n,className:`text-xs text-muted-foreground hover:text-foreground transition-colors shrink-0`,title:r(`newChat.viewPastSessions`),children:[e.sessionCount,` session`,e.sessionCount>1?`s`:``]})]})}export{m as NewChat};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as e}from"./src-DUhGoAQb.js";var t=e(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as e}from"./src-DUhGoAQb.js";var t=e(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./vendor-react-BJ8SIkmN.js";import{t}from"./useQuery-DvovkaPT.js";import{B as n,F as r,G as i,I as a,L as o,P as s,R as c,U as l,V as u,a as d,i as f,n as p,p as m,q as h,r as g,z as _}from"./src-DUhGoAQb.js";import{t as v}from"./circle-alert-W8QX9LOG.js";import{t as y}from"./circle-check-DLl9fl65.js";import{t as b}from"./circle-x-D_8Tcgt1.js";import{t as x}from"./globe-fwFSeXZn.js";import{t as S}from"./refresh-cw-RFYUf5GB.js";import{t as C}from"./terminal-CIapYonS.js";import{n as w,t as T}from"./bi-gM8sIAZV.js";import{C as E,w as D}from"./index-dc8HGqTp.js";var O=r(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),k=r(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),A=e(),j={"claude-code":w,cursor:T};function M({agent:e}){let{t}=D();return(0,A.jsxs)(a,{children:[(0,A.jsxs)(_,{className:`flex flex-row items-center justify-between space-y-0 pb-2`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,A.jsx)(`div`,{className:`flex h-10 w-10 items-center justify-center rounded-lg bg-muted`,children:(0,A.jsx)(j[e.id]??C,{className:`h-5 w-5`})}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(n,{className:`text-base`,children:e.label}),(0,A.jsx)(c,{className:`text-xs font-mono`,children:e.id})]})]}),(0,A.jsx)(l,{variant:e.installed?`default`:`destructive`,className:`gap-1`,children:e.installed?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(y,{className:`h-3 w-3`}),` `,t(`settings.active`)]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(b,{className:`h-3 w-3`}),` `,t(`settings.notFound`)]})})]}),(0,A.jsx)(o,{children:e.installed?(0,A.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,A.jsx)(`span`,{children:t(`settings.version`)}),(0,A.jsx)(`code`,{className:`rounded bg-muted px-1.5 py-0.5 text-xs font-mono`,children:e.version})]}):(0,A.jsxs)(`div`,{className:`flex items-start gap-2 text-sm text-muted-foreground`,children:[(0,A.jsx)(v,{className:`h-4 w-4 mt-0.5 shrink-0 text-destructive`}),(0,A.jsx)(`span`,{children:e.error??t(`settings.notFoundError`)})]})})]})}function N(){return(0,A.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[1,2].map(e=>(0,A.jsxs)(a,{children:[(0,A.jsxs)(_,{className:`flex flex-row items-center justify-between space-y-0 pb-2`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,A.jsx)(m,{className:`h-10 w-10 rounded-lg`}),(0,A.jsxs)(`div`,{className:`space-y-1`,children:[(0,A.jsx)(m,{className:`h-4 w-24`}),(0,A.jsx)(m,{className:`h-3 w-16`})]})]}),(0,A.jsx)(m,{className:`h-5 w-16 rounded-full`})]}),(0,A.jsx)(o,{children:(0,A.jsx)(m,{className:`h-4 w-40`})})]},e))})}function P({theme:e,active:t,onSelect:n}){let r=e.dark,i=e.light;return(0,A.jsxs)(`button`,{onClick:n,className:`relative rounded-lg border-2 p-1 text-left transition-colors ${t?`border-primary`:`border-border hover:border-primary/50`}`,children:[t&&(0,A.jsx)(`div`,{className:`absolute top-2 right-2 rounded-full bg-primary p-0.5 text-primary-foreground`,children:(0,A.jsx)(s,{className:`h-3 w-3`})}),(0,A.jsxs)(`div`,{className:`flex rounded-md overflow-hidden h-24`,children:[(0,A.jsxs)(`div`,{className:`flex-1 flex flex-col p-2 gap-1.5`,style:{background:i.background,color:i.foreground},children:[(0,A.jsx)(`div`,{className:`text-[8px] font-medium opacity-50`,children:`Light`}),(0,A.jsxs)(`div`,{className:`flex gap-1`,children:[(0,A.jsx)(`div`,{className:`h-2 w-6 rounded-sm`,style:{background:i.primary}}),(0,A.jsx)(`div`,{className:`h-2 flex-1 rounded-sm`,style:{background:i.secondary}})]}),(0,A.jsx)(`div`,{className:`h-1.5 w-10 rounded-sm`,style:{background:i.muted}}),(0,A.jsxs)(`div`,{className:`flex gap-1 mt-auto`,children:[(0,A.jsx)(`div`,{className:`h-2 w-2 rounded-full`,style:{background:i.primary}}),(0,A.jsx)(`div`,{className:`h-2 w-2 rounded-full`,style:{background:i.accent}}),(0,A.jsx)(`div`,{className:`h-2 w-2 rounded-full`,style:{background:i.destructive}})]})]}),(0,A.jsxs)(`div`,{className:`flex-1 flex flex-col p-2 gap-1.5`,style:{background:r.background,color:r.foreground},children:[(0,A.jsx)(`div`,{className:`text-[8px] font-medium opacity-50`,children:`Dark`}),(0,A.jsxs)(`div`,{className:`flex gap-1`,children:[(0,A.jsx)(`div`,{className:`h-2 w-6 rounded-sm`,style:{background:r.primary}}),(0,A.jsx)(`div`,{className:`h-2 flex-1 rounded-sm`,style:{background:r.secondary}})]}),(0,A.jsx)(`div`,{className:`h-1.5 w-10 rounded-sm`,style:{background:r.muted}}),(0,A.jsxs)(`div`,{className:`flex gap-1 mt-auto`,children:[(0,A.jsx)(`div`,{className:`h-2 w-2 rounded-full`,style:{background:r.primary}}),(0,A.jsx)(`div`,{className:`h-2 w-2 rounded-full`,style:{background:r.accent}}),(0,A.jsx)(`div`,{className:`h-2 w-2 rounded-full`,style:{background:r.destructive}})]})]})]}),(0,A.jsx)(`div`,{className:`mt-2 px-1 pb-1`,children:(0,A.jsx)(`span`,{className:`text-sm font-medium`,children:e.name})})]})}function F(){let{t:e}=D(),{data:n,isLoading:r,refetch:s,isFetching:c}=t({queryKey:[`settings`,`cli-agents`],queryFn:()=>h.settings.getCliAgents()}),l=n?.agents??[],m=l.filter(e=>e.installed).length,_=E(e=>e.colorTheme),v=E(e=>e.setColorTheme),y=E(e=>e.locale),b=E(e=>e.setLocale);return(0,A.jsxs)(`div`,{className:`p-6 max-w-4xl mx-auto space-y-6`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`h1`,{className:`text-2xl font-bold tracking-tight`,children:e(`settings.title`)}),(0,A.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:e(`settings.description`)})]}),(0,A.jsxs)(p,{defaultValue:`general`,children:[(0,A.jsxs)(f,{children:[(0,A.jsxs)(d,{value:`general`,className:`gap-1.5`,children:[(0,A.jsx)(k,{className:`h-3.5 w-3.5`}),e(`settings.general`)]}),(0,A.jsxs)(d,{value:`appearance`,className:`gap-1.5`,children:[(0,A.jsx)(O,{className:`h-3.5 w-3.5`}),e(`settings.appearance`)]}),(0,A.jsxs)(d,{value:`cli`,className:`gap-1.5`,children:[(0,A.jsx)(C,{className:`h-3.5 w-3.5`}),e(`settings.cliAgents`)]})]}),(0,A.jsxs)(g,{value:`general`,className:`mt-4 space-y-4`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`h2`,{className:`text-lg font-semibold`,children:e(`settings.general`)}),(0,A.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`settings.generalDescription`)})]}),(0,A.jsx)(a,{children:(0,A.jsxs)(o,{className:`p-4 flex items-center justify-between`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,A.jsx)(`div`,{className:`flex h-9 w-9 items-center justify-center rounded-md bg-muted`,children:(0,A.jsx)(x,{className:`h-4 w-4 text-muted-foreground`})}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`p`,{className:`text-sm font-medium`,children:e(`settings.language`)}),(0,A.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`settings.languageDescription`)})]})]}),(0,A.jsxs)(`select`,{value:y,onChange:e=>b(e.target.value),className:`flex h-9 w-40 rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,children:[(0,A.jsx)(`option`,{value:`en`,children:`English`}),(0,A.jsx)(`option`,{value:`fr`,children:`Français`}),(0,A.jsx)(`option`,{value:`zh`,children:`中文`}),(0,A.jsx)(`option`,{value:`ja`,children:`日本語`})]})]})})]}),(0,A.jsxs)(g,{value:`appearance`,className:`mt-4 space-y-4`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`h2`,{className:`text-lg font-semibold`,children:e(`settings.colorTheme`)}),(0,A.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`settings.colorThemeDescription`)})]}),(0,A.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2 md:grid-cols-3`,children:i.map(e=>(0,A.jsx)(P,{theme:e,active:_===e.id,onSelect:()=>v(e.id)},e.id))})]}),(0,A.jsxs)(g,{value:`cli`,className:`mt-4 space-y-4`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`h2`,{className:`text-lg font-semibold`,children:e(`settings.cliAgents`)}),(0,A.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`settings.cliAgentsDescription`)})]}),(0,A.jsxs)(u,{variant:`outline`,size:`sm`,onClick:()=>s(),disabled:c,className:`gap-1.5`,children:[(0,A.jsx)(S,{className:`h-3.5 w-3.5 ${c?`animate-spin`:``}`}),e(`common.refresh`)]})]}),!r&&l.length>0&&(0,A.jsx)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:(0,A.jsx)(`span`,{children:e(`settings.agentsDetected`,{installed:m,total:l.length})})}),r?(0,A.jsx)(N,{}):(0,A.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:l.map(e=>(0,A.jsx)(M,{agent:e},e.id))})]})]})]})}export{F as Settings};
|