codemini-cli 0.6.5 → 0.6.6

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.
Files changed (32) hide show
  1. package/codemini-web/dist/assets/{AboutDialog-BUp8EzDg.js → AboutDialog-dFkTshay.js} +1 -1
  2. package/codemini-web/dist/assets/{CodeWikiPanel-Fp0VKdzo.js → CodeWikiPanel-Dqup5Sen.js} +1 -1
  3. package/codemini-web/dist/assets/{ConfigDialog-DIpj779O.js → ConfigDialog-DTehAh2r.js} +1 -1
  4. package/codemini-web/dist/assets/{GitDiffDialog-ZLEuX8Qm.js → GitDiffDialog-D4uMixee.js} +1 -1
  5. package/codemini-web/dist/assets/{MemoryDialog-D2YbENVd.js → MemoryDialog-DJqtWamU.js} +1 -1
  6. package/codemini-web/dist/assets/{MessageBubble-BIgpZsLn.js → MessageBubble-BGnFIxcq.js} +1 -1
  7. package/codemini-web/dist/assets/{PatchDiff-CvKNaHsw.js → PatchDiff-CpHAbmv3.js} +1 -1
  8. package/codemini-web/dist/assets/{ProjectSelector-DXIep3lE.js → ProjectSelector-CgJDcTNL.js} +1 -1
  9. package/codemini-web/dist/assets/SkillDialog-D1J46nMC.js +8 -0
  10. package/codemini-web/dist/assets/{SoulDialog-BfIoKETs.js → SoulDialog-DIqK4utD.js} +1 -1
  11. package/codemini-web/dist/assets/chevron-right-BBG4s6Zh.js +1 -0
  12. package/codemini-web/dist/assets/{chunk-BO2N2NFS-DMUdjM9q.js → chunk-BO2N2NFS-fRXUeu1b.js} +4 -4
  13. package/codemini-web/dist/assets/{highlighted-body-OFNGDK62-8ch0jz7Z.js → highlighted-body-OFNGDK62-CKKvx7S1.js} +1 -1
  14. package/codemini-web/dist/assets/{index-DRXwJ-n_.css → index-DF9s7Tuc.css} +1 -1
  15. package/codemini-web/dist/assets/{index-BhMtCC8_.js → index-DyIUhlc8.js} +3 -3
  16. package/codemini-web/dist/assets/{input-CYpdNDlR.js → input-BKNu4DOt.js} +1 -1
  17. package/codemini-web/dist/assets/mermaid-GHXKKRXX-BM8yuNk5.js +1 -0
  18. package/codemini-web/dist/assets/{pencil-BdA2cEeE.js → pencil-C0uznNC_.js} +1 -1
  19. package/codemini-web/dist/assets/{refresh-cw-CJGgUGiS.js → refresh-cw-DUgU5bEu.js} +1 -1
  20. package/codemini-web/dist/assets/{select-BLOccU1M.js → select-J6668k2a.js} +1 -1
  21. package/codemini-web/dist/assets/{trash-2-CQzNOch5.js → trash-2-H0DiWqiE.js} +1 -1
  22. package/codemini-web/dist/index.html +2 -2
  23. package/codemini-web/server.js +90 -73
  24. package/package.json +1 -1
  25. package/src/commands/skill.js +188 -48
  26. package/src/core/agent-loop.js +67 -25
  27. package/src/core/chat-runtime.js +16 -13
  28. package/src/core/shell-profile.js +3 -2
  29. package/src/core/tools.js +42 -27
  30. package/codemini-web/dist/assets/SkillDialog-DjPF-XBx.js +0 -8
  31. package/codemini-web/dist/assets/chevron-right-CfNZHlyU.js +0 -1
  32. package/codemini-web/dist/assets/mermaid-GHXKKRXX-KBEtMEB9.js +0 -1
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{a as t,r as n}from"./bundle-mjs-C44PrJ2C.js";import{n as r,t as i}from"./pencil-BdA2cEeE.js";import{n as a,t as o}from"./trash-2-CQzNOch5.js";import{E as s,F as c,R as l,V as u,X as d,Z as f,b as p,c as m,ct as h,d as g,f as _,g as v,l as y,lt as b,n as x,pt as S,r as C,s as w,u as T}from"./index-BhMtCC8_.js";import{t as E}from"./input-CYpdNDlR.js";var D=e(t(),1),O=n(),k=[`all`,`builtin`,`custom`];function A({checked:e,onClick:t,title:n}){return(0,O.jsx)(`button`,{type:`button`,onClick:t,title:n,"aria-pressed":e,className:S(`relative h-5 w-9 rounded-full border shadow-inner transition-colors`,e?`border-(--text-primary) bg-(--text-primary)`:`border-(--border-strong) bg-(--bg-hover)`),children:(0,O.jsx)(`span`,{className:S(`absolute left-0.5 top-0.5 size-3.5 rounded-full transition-transform`,e?`bg-(--bg-primary)`:`bg-(--text-muted)`,e?`translate-x-4`:`translate-x-0`)})})}function j(e){return b(e===`builtin`?`builtin`:`custom`)}function M({soul:e,onSave:t,onCancel:n}){let[r,i]=(0,D.useState)(e?.name||``),[a,o]=(0,D.useState)(``),[s,c]=(0,D.useState)(!1),u=!e;return(0,D.useEffect)(()=>{if(i(e?.name||``),!e){o(``);return}c(!0),d(e.name).then(e=>o(e.content||``)).catch(()=>{}).finally(()=>c(!1))},[e]),(0,O.jsxs)(`div`,{className:`space-y-3`,children:[(0,O.jsxs)(`div`,{className:`mb-3 flex items-start justify-between gap-3`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`text-[13px] font-medium text-(--text-primary)`,children:b(u?`newSoul`:`editSoul`)}),(0,O.jsx)(`div`,{className:`mt-0.5 text-[11px] text-(--text-muted)`,children:b(`soulEditorHint`)})]}),(0,O.jsx)(C,{variant:`outline`,className:`rounded-md px-1.5 py-0 text-[10px]`,children:u?b(`custom`):j(e.scope)})]}),(0,O.jsxs)(`div`,{className:`grid gap-3`,children:[(0,O.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,O.jsx)(`label`,{className:`text-[12px] text-(--text-muted)`,children:b(`name`)}),(0,O.jsx)(E,{value:r,onChange:e=>i(e.target.value),disabled:!u,placeholder:`my-soul`,className:`h-8 text-[13px]`})]}),(0,O.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,O.jsx)(`label`,{className:`text-[12px] text-(--text-muted)`,children:b(`soulContent`)}),s?(0,O.jsxs)(`div`,{className:`rounded-md border border-(--border-default) py-8 text-center text-[12px] text-(--text-muted)`,children:[b(`loading`),`...`]}):(0,O.jsx)(x,{value:a,onChange:e=>o(e.target.value),className:`min-h-[220px] resize-y text-[13px] font-mono leading-5`,placeholder:b(`soulPlaceholder`)})]})]}),(0,O.jsxs)(`div`,{className:`mt-3 flex justify-end gap-2`,children:[(0,O.jsx)(_,{variant:`outline`,onClick:n,size:`sm`,children:b(`cancel`)}),(0,O.jsx)(_,{onClick:async()=>{u?await l({name:r,content:a}):await h(e.name,a),t()},disabled:s||!a.trim()||u&&!r.trim(),size:`sm`,children:b(u?`create`:`save`)})]})]})}function N({soul:e,open:t,onSave:n,onOpenChange:r}){return(0,O.jsx)(w,{open:t,onOpenChange:r,children:(0,O.jsxs)(m,{className:`sm:max-w-[720px] max-h-[86vh] flex flex-col overflow-hidden`,children:[(0,O.jsx)(T,{className:`shrink-0`,children:(0,O.jsx)(g,{children:b(e?`editSoul`:`newSoul`)})}),(0,O.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0 pr-1`,children:(0,O.jsx)(M,{soul:e,onSave:n,onCancel:()=>r(!1)})})]})})}function P({soul:e,open:t,onOpenChange:n}){let[r,i]=(0,D.useState)(``),[a,o]=(0,D.useState)(!1);return(0,D.useEffect)(()=>{!t||!e||(o(!0),d(e.name).then(e=>i(e.content||``)).catch(()=>{}).finally(()=>o(!1)))},[t,e]),(0,O.jsx)(w,{open:t,onOpenChange:n,children:(0,O.jsxs)(m,{className:`sm:max-w-[680px] max-h-[82vh] flex flex-col overflow-hidden`,children:[(0,O.jsx)(T,{className:`shrink-0`,children:(0,O.jsxs)(g,{children:[e?.name,` `,b(`contentPreview`)]})}),(0,O.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0 pr-1`,children:a?(0,O.jsxs)(`div`,{className:`py-8 text-center text-[12px] text-(--text-muted)`,children:[b(`loading`),`...`]}):(0,O.jsx)(`pre`,{className:`rounded-lg bg-(--bg-secondary) p-3 text-[13px] whitespace-pre-wrap break-words font-mono leading-5`,children:r})}),(0,O.jsx)(y,{className:`shrink-0`,children:(0,O.jsx)(_,{variant:`outline`,onClick:()=>n(!1),size:`sm`,children:b(`close`)})})]})})}function F(){let[e,t]=(0,D.useState)([]),[n,l]=(0,D.useState)(!0),[d,m]=(0,D.useState)(null),[h,g]=(0,D.useState)(null),[y,x]=(0,D.useState)(``),[w,T]=(0,D.useState)(`all`),M=(0,D.useCallback)(async()=>{l(!0);try{let e=await f();t(Array.isArray(e)?e:[])}catch{}l(!1)},[]);(0,D.useEffect)(()=>{M()},[M]);let F=e.find(e=>e.active);e.filter(e=>e.scope!==`builtin`).length;let I=(0,D.useMemo)(()=>{let t=y.trim().toLowerCase();return e.filter(e=>w!==`all`&&e.scope!==w?!1:t?e.name.toLowerCase().includes(t):!0)},[e,y,w]),L=async e=>{await c(e),M()},R=async e=>{await u(e),M()};return n?(0,O.jsxs)(`div`,{className:`py-8 text-center text-[12px] text-(--text-muted)`,children:[b(`loading`),`...`]}):(0,O.jsxs)(`div`,{className:`space-y-3`,children:[(0,O.jsx)(`div`,{className:`rounded-lg border border-(--border-default) bg-(--bg-secondary) p-3`,children:(0,O.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,O.jsxs)(`div`,{className:`min-w-0`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(s,{size:14,className:`text-(--text-muted)`}),(0,O.jsx)(`span`,{className:`text-[13px] font-medium text-(--text-primary)`,children:F?.name||b(`noActiveSoul`)}),F&&(0,O.jsx)(C,{className:`h-4 rounded-md border-0 bg-(--text-primary) px-1.5 py-0 text-[10px] text-(--bg-primary)`,children:b(`current`)})]}),(0,O.jsx)(`div`,{className:`mt-1 text-[11px] text-(--text-muted)`,children:b(`soulPanelHint`)})]}),(0,O.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,O.jsxs)(_,{onClick:()=>m(`new`),size:`sm`,children:[(0,O.jsx)(p,{size:13}),b(`addSoul`)]})})]})}),(0,O.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center`,children:[(0,O.jsxs)(`div`,{className:`relative flex-1`,children:[(0,O.jsx)(a,{size:13,className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-(--text-muted)`}),(0,O.jsx)(E,{value:y,onChange:e=>x(e.target.value),placeholder:b(`searchSouls`),className:`h-8 pl-8 text-[13px]`})]}),(0,O.jsx)(`div`,{className:`flex shrink-0 rounded-md border border-(--border-default) p-0.5 gap-0.5`,children:k.map(e=>(0,O.jsx)(_,{type:`button`,variant:w===e?`secondary`:`ghost`,size:`xs`,onClick:()=>T(e),className:`px-2`,children:b(`filter_${e}`)},e))})]}),(0,O.jsx)(v,{className:`bg-(--border-default)`}),e.length===0&&!d&&(0,O.jsxs)(`div`,{className:`rounded-lg border border-dashed border-(--border-default) py-8 text-center`,children:[(0,O.jsx)(`div`,{className:`text-[13px] text-(--text-primary)`,children:b(`noSouls`)}),(0,O.jsx)(`div`,{className:`mt-1 text-[11px] text-(--text-muted)`,children:b(`noSoulsHint`)})]}),e.length>0&&I.length===0&&(0,O.jsx)(`div`,{className:`py-8 text-center text-[12px] text-(--text-muted)`,children:b(`noMatches`)}),(0,O.jsx)(`div`,{className:`grid max-h-[420px] gap-2 overflow-y-auto pr-1`,children:I.map(e=>(0,O.jsx)(`div`,{className:S(`rounded-lg border p-3 transition-colors`,e.active?`border-(--border-strong) bg-(--bg-active)`:`border-(--border-default) bg-(--bg-primary) hover:bg-(--bg-hover)`),children:(0,O.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,O.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,O.jsx)(`span`,{className:`truncate text-[13px] font-medium text-(--text-primary)`,children:e.name}),(0,O.jsx)(C,{variant:`outline`,className:`h-4 rounded-md px-1.5 py-0 text-[10px]`,children:j(e.scope)}),e.active&&(0,O.jsx)(C,{className:`h-4 rounded-md border-0 bg-(--text-primary) px-1.5 py-0 text-[10px] text-(--bg-primary)`,children:b(`current`)})]}),(0,O.jsx)(`div`,{className:`mt-1 line-clamp-2 text-[11px] leading-4 text-(--text-muted)`,children:e.preview||b(`noPreview`)})]}),(0,O.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,O.jsx)(_,{variant:`ghost`,size:`icon-xs`,onClick:()=>g(e),title:b(`view`),children:(0,O.jsx)(r,{size:13})}),(0,O.jsx)(A,{checked:!!e.active,onClick:()=>{e.active||L(e.name)},title:e.active?b(`current`):b(`activate`)}),e.scope!==`builtin`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(_,{variant:`ghost`,size:`icon-xs`,onClick:()=>m(e),title:b(`edit`),children:(0,O.jsx)(i,{size:13})}),(0,O.jsx)(_,{variant:`ghost`,size:`icon-xs`,onClick:()=>{confirm(b(`confirmDeleteSoul`).replace(`{{name}}`,e.name))&&R(e.name)},title:b(`delete`),className:`text-(--accent-red) hover:text-(--accent-red)`,children:(0,O.jsx)(o,{size:13})})]})]})]})},`${e.scope}-${e.name}`))}),(0,O.jsx)(P,{soul:h,open:!!h,onOpenChange:e=>{e||g(null)}}),(0,O.jsx)(N,{soul:d===`new`?null:d,open:!!d,onSave:()=>{m(null),M()},onOpenChange:e=>{e||m(null)}})]})}function I({open:e,onOpenChange:t}){return(0,O.jsx)(w,{open:e,onOpenChange:t,children:(0,O.jsxs)(m,{className:`sm:max-w-[760px] max-h-[86vh] overflow-hidden flex flex-col`,children:[(0,O.jsx)(T,{children:(0,O.jsx)(g,{children:b(`souls`)})}),(0,O.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0 pr-1`,children:(0,O.jsx)(F,{})})]})})}export{I as SoulDialog};
1
+ import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{a as t,r as n}from"./bundle-mjs-C44PrJ2C.js";import{n as r,t as i}from"./pencil-C0uznNC_.js";import{n as a,t as o}from"./trash-2-H0DiWqiE.js";import{E as s,F as c,R as l,V as u,X as d,Z as f,b as p,c as m,ct as h,d as g,f as _,g as v,l as y,lt as b,n as x,pt as S,r as C,s as w,u as T}from"./index-DyIUhlc8.js";import{t as E}from"./input-BKNu4DOt.js";var D=e(t(),1),O=n(),k=[`all`,`builtin`,`custom`];function A({checked:e,onClick:t,title:n}){return(0,O.jsx)(`button`,{type:`button`,onClick:t,title:n,"aria-pressed":e,className:S(`relative h-5 w-9 rounded-full border shadow-inner transition-colors`,e?`border-(--text-primary) bg-(--text-primary)`:`border-(--border-strong) bg-(--bg-hover)`),children:(0,O.jsx)(`span`,{className:S(`absolute left-0.5 top-0.5 size-3.5 rounded-full transition-transform`,e?`bg-(--bg-primary)`:`bg-(--text-muted)`,e?`translate-x-4`:`translate-x-0`)})})}function j(e){return b(e===`builtin`?`builtin`:`custom`)}function M({soul:e,onSave:t,onCancel:n}){let[r,i]=(0,D.useState)(e?.name||``),[a,o]=(0,D.useState)(``),[s,c]=(0,D.useState)(!1),u=!e;return(0,D.useEffect)(()=>{if(i(e?.name||``),!e){o(``);return}c(!0),d(e.name).then(e=>o(e.content||``)).catch(()=>{}).finally(()=>c(!1))},[e]),(0,O.jsxs)(`div`,{className:`space-y-3`,children:[(0,O.jsxs)(`div`,{className:`mb-3 flex items-start justify-between gap-3`,children:[(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`div`,{className:`text-[13px] font-medium text-(--text-primary)`,children:b(u?`newSoul`:`editSoul`)}),(0,O.jsx)(`div`,{className:`mt-0.5 text-[11px] text-(--text-muted)`,children:b(`soulEditorHint`)})]}),(0,O.jsx)(C,{variant:`outline`,className:`rounded-md px-1.5 py-0 text-[10px]`,children:u?b(`custom`):j(e.scope)})]}),(0,O.jsxs)(`div`,{className:`grid gap-3`,children:[(0,O.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,O.jsx)(`label`,{className:`text-[12px] text-(--text-muted)`,children:b(`name`)}),(0,O.jsx)(E,{value:r,onChange:e=>i(e.target.value),disabled:!u,placeholder:`my-soul`,className:`h-8 text-[13px]`})]}),(0,O.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,O.jsx)(`label`,{className:`text-[12px] text-(--text-muted)`,children:b(`soulContent`)}),s?(0,O.jsxs)(`div`,{className:`rounded-md border border-(--border-default) py-8 text-center text-[12px] text-(--text-muted)`,children:[b(`loading`),`...`]}):(0,O.jsx)(x,{value:a,onChange:e=>o(e.target.value),className:`min-h-[220px] resize-y text-[13px] font-mono leading-5`,placeholder:b(`soulPlaceholder`)})]})]}),(0,O.jsxs)(`div`,{className:`mt-3 flex justify-end gap-2`,children:[(0,O.jsx)(_,{variant:`outline`,onClick:n,size:`sm`,children:b(`cancel`)}),(0,O.jsx)(_,{onClick:async()=>{u?await l({name:r,content:a}):await h(e.name,a),t()},disabled:s||!a.trim()||u&&!r.trim(),size:`sm`,children:b(u?`create`:`save`)})]})]})}function N({soul:e,open:t,onSave:n,onOpenChange:r}){return(0,O.jsx)(w,{open:t,onOpenChange:r,children:(0,O.jsxs)(m,{className:`sm:max-w-[720px] max-h-[86vh] flex flex-col overflow-hidden`,children:[(0,O.jsx)(T,{className:`shrink-0`,children:(0,O.jsx)(g,{children:b(e?`editSoul`:`newSoul`)})}),(0,O.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0 pr-1`,children:(0,O.jsx)(M,{soul:e,onSave:n,onCancel:()=>r(!1)})})]})})}function P({soul:e,open:t,onOpenChange:n}){let[r,i]=(0,D.useState)(``),[a,o]=(0,D.useState)(!1);return(0,D.useEffect)(()=>{!t||!e||(o(!0),d(e.name).then(e=>i(e.content||``)).catch(()=>{}).finally(()=>o(!1)))},[t,e]),(0,O.jsx)(w,{open:t,onOpenChange:n,children:(0,O.jsxs)(m,{className:`sm:max-w-[680px] max-h-[82vh] flex flex-col overflow-hidden`,children:[(0,O.jsx)(T,{className:`shrink-0`,children:(0,O.jsxs)(g,{children:[e?.name,` `,b(`contentPreview`)]})}),(0,O.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0 pr-1`,children:a?(0,O.jsxs)(`div`,{className:`py-8 text-center text-[12px] text-(--text-muted)`,children:[b(`loading`),`...`]}):(0,O.jsx)(`pre`,{className:`rounded-lg bg-(--bg-secondary) p-3 text-[13px] whitespace-pre-wrap break-words font-mono leading-5`,children:r})}),(0,O.jsx)(y,{className:`shrink-0`,children:(0,O.jsx)(_,{variant:`outline`,onClick:()=>n(!1),size:`sm`,children:b(`close`)})})]})})}function F(){let[e,t]=(0,D.useState)([]),[n,l]=(0,D.useState)(!0),[d,m]=(0,D.useState)(null),[h,g]=(0,D.useState)(null),[y,x]=(0,D.useState)(``),[w,T]=(0,D.useState)(`all`),M=(0,D.useCallback)(async()=>{l(!0);try{let e=await f();t(Array.isArray(e)?e:[])}catch{}l(!1)},[]);(0,D.useEffect)(()=>{M()},[M]);let F=e.find(e=>e.active);e.filter(e=>e.scope!==`builtin`).length;let I=(0,D.useMemo)(()=>{let t=y.trim().toLowerCase();return e.filter(e=>w!==`all`&&e.scope!==w?!1:t?e.name.toLowerCase().includes(t):!0)},[e,y,w]),L=async e=>{await c(e),M()},R=async e=>{await u(e),M()};return n?(0,O.jsxs)(`div`,{className:`py-8 text-center text-[12px] text-(--text-muted)`,children:[b(`loading`),`...`]}):(0,O.jsxs)(`div`,{className:`space-y-3`,children:[(0,O.jsx)(`div`,{className:`rounded-lg border border-(--border-default) bg-(--bg-secondary) p-3`,children:(0,O.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,O.jsxs)(`div`,{className:`min-w-0`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(s,{size:14,className:`text-(--text-muted)`}),(0,O.jsx)(`span`,{className:`text-[13px] font-medium text-(--text-primary)`,children:F?.name||b(`noActiveSoul`)}),F&&(0,O.jsx)(C,{className:`h-4 rounded-md border-0 bg-(--text-primary) px-1.5 py-0 text-[10px] text-(--bg-primary)`,children:b(`current`)})]}),(0,O.jsx)(`div`,{className:`mt-1 text-[11px] text-(--text-muted)`,children:b(`soulPanelHint`)})]}),(0,O.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,O.jsxs)(_,{onClick:()=>m(`new`),size:`sm`,children:[(0,O.jsx)(p,{size:13}),b(`addSoul`)]})})]})}),(0,O.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center`,children:[(0,O.jsxs)(`div`,{className:`relative flex-1`,children:[(0,O.jsx)(a,{size:13,className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-(--text-muted)`}),(0,O.jsx)(E,{value:y,onChange:e=>x(e.target.value),placeholder:b(`searchSouls`),className:`h-8 pl-8 text-[13px]`})]}),(0,O.jsx)(`div`,{className:`flex shrink-0 rounded-md border border-(--border-default) p-0.5 gap-0.5`,children:k.map(e=>(0,O.jsx)(_,{type:`button`,variant:w===e?`secondary`:`ghost`,size:`xs`,onClick:()=>T(e),className:`px-2`,children:b(`filter_${e}`)},e))})]}),(0,O.jsx)(v,{className:`bg-(--border-default)`}),e.length===0&&!d&&(0,O.jsxs)(`div`,{className:`rounded-lg border border-dashed border-(--border-default) py-8 text-center`,children:[(0,O.jsx)(`div`,{className:`text-[13px] text-(--text-primary)`,children:b(`noSouls`)}),(0,O.jsx)(`div`,{className:`mt-1 text-[11px] text-(--text-muted)`,children:b(`noSoulsHint`)})]}),e.length>0&&I.length===0&&(0,O.jsx)(`div`,{className:`py-8 text-center text-[12px] text-(--text-muted)`,children:b(`noMatches`)}),(0,O.jsx)(`div`,{className:`grid max-h-[420px] gap-2 overflow-y-auto pr-1`,children:I.map(e=>(0,O.jsx)(`div`,{className:S(`rounded-lg border p-3 transition-colors`,e.active?`border-(--border-strong) bg-(--bg-active)`:`border-(--border-default) bg-(--bg-primary) hover:bg-(--bg-hover)`),children:(0,O.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,O.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,O.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,O.jsx)(`span`,{className:`truncate text-[13px] font-medium text-(--text-primary)`,children:e.name}),(0,O.jsx)(C,{variant:`outline`,className:`h-4 rounded-md px-1.5 py-0 text-[10px]`,children:j(e.scope)}),e.active&&(0,O.jsx)(C,{className:`h-4 rounded-md border-0 bg-(--text-primary) px-1.5 py-0 text-[10px] text-(--bg-primary)`,children:b(`current`)})]}),(0,O.jsx)(`div`,{className:`mt-1 line-clamp-2 text-[11px] leading-4 text-(--text-muted)`,children:e.preview||b(`noPreview`)})]}),(0,O.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,O.jsx)(_,{variant:`ghost`,size:`icon-xs`,onClick:()=>g(e),title:b(`view`),children:(0,O.jsx)(r,{size:13})}),(0,O.jsx)(A,{checked:!!e.active,onClick:()=>{e.active||L(e.name)},title:e.active?b(`current`):b(`activate`)}),e.scope!==`builtin`&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(_,{variant:`ghost`,size:`icon-xs`,onClick:()=>m(e),title:b(`edit`),children:(0,O.jsx)(i,{size:13})}),(0,O.jsx)(_,{variant:`ghost`,size:`icon-xs`,onClick:()=>{confirm(b(`confirmDeleteSoul`).replace(`{{name}}`,e.name))&&R(e.name)},title:b(`delete`),className:`text-(--accent-red) hover:text-(--accent-red)`,children:(0,O.jsx)(o,{size:13})})]})]})]})},`${e.scope}-${e.name}`))}),(0,O.jsx)(P,{soul:h,open:!!h,onOpenChange:e=>{e||g(null)}}),(0,O.jsx)(N,{soul:d===`new`?null:d,open:!!d,onSave:()=>{m(null),M()},onOpenChange:e=>{e||m(null)}})]})}function I({open:e,onOpenChange:t}){return(0,O.jsx)(w,{open:e,onOpenChange:t,children:(0,O.jsxs)(m,{className:`sm:max-w-[760px] max-h-[86vh] overflow-hidden flex flex-col`,children:[(0,O.jsx)(T,{children:(0,O.jsx)(g,{children:b(`souls`)})}),(0,O.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0 pr-1`,children:(0,O.jsx)(F,{})})]})})}export{I as SoulDialog};
@@ -0,0 +1 @@
1
+ import{P as e}from"./index-DyIUhlc8.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};