@bryanhu/codexly 0.15.0 → 0.16.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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/{chunk-47AJCGF6.js → chunk-HUKDTKO6.js} +21 -20
- package/dist/cli.js +2 -2
- package/dist/server/index.js +1 -1
- package/dist/web/.vite/manifest.json +61 -61
- package/dist/web/.vite/manifest.json.br +0 -0
- package/dist/web/.vite/manifest.json.gz +0 -0
- package/dist/web/assets/{button-group-BXsWRHx1.js → button-group-DxD1cvNd.js} +1 -1
- package/dist/web/assets/button-group-DxD1cvNd.js.br +0 -0
- package/dist/web/assets/button-group-DxD1cvNd.js.gz +0 -0
- package/dist/web/assets/{context-menu-D28EIDXC.js → context-menu-BxBZqph_.js} +1 -1
- package/dist/web/assets/context-menu-BxBZqph_.js.br +0 -0
- package/dist/web/assets/context-menu-BxBZqph_.js.gz +0 -0
- package/dist/web/assets/{file-review-dialog-D5uAITDY.js → file-review-dialog-4yb5qYp1.js} +1 -1
- package/dist/web/assets/file-review-dialog-4yb5qYp1.js.br +0 -0
- package/dist/web/assets/file-review-dialog-4yb5qYp1.js.gz +0 -0
- package/dist/web/assets/{git-history-panel-CJ0YniVw.js → git-history-panel-CLWc1FLl.js} +1 -1
- package/dist/web/assets/git-history-panel-CLWc1FLl.js.br +0 -0
- package/dist/web/assets/git-history-panel-CLWc1FLl.js.gz +0 -0
- package/dist/web/assets/{global-settings-dialog-DxUssxBm.js → global-settings-dialog-CzBgDgzH.js} +1 -1
- package/dist/web/assets/global-settings-dialog-CzBgDgzH.js.br +0 -0
- package/dist/web/assets/global-settings-dialog-CzBgDgzH.js.gz +0 -0
- package/dist/web/assets/index-CROvcy96.css +2 -0
- package/dist/web/assets/index-CROvcy96.css.br +0 -0
- package/dist/web/assets/index-CROvcy96.css.gz +0 -0
- package/dist/web/assets/{index-DU2EMreA.js → index-DuOx_QDa.js} +3 -3
- package/dist/web/assets/index-DuOx_QDa.js.br +0 -0
- package/dist/web/assets/index-DuOx_QDa.js.gz +0 -0
- package/dist/web/assets/{installed-skills-pane-B2bwKvYB.js → installed-skills-pane-yQ22YClZ.js} +1 -1
- package/dist/web/assets/installed-skills-pane-yQ22YClZ.js.br +0 -0
- package/dist/web/assets/installed-skills-pane-yQ22YClZ.js.gz +0 -0
- package/dist/web/assets/{lazy-message-response-CD-7ydp6.js → lazy-message-response-DxkPeKeK.js} +2 -2
- package/dist/web/assets/lazy-message-response-DxkPeKeK.js.br +0 -0
- package/dist/web/assets/lazy-message-response-DxkPeKeK.js.gz +0 -0
- package/dist/web/assets/{mcp-management-pane-Bu90n81z.js → mcp-management-pane-fBs42kaN.js} +1 -1
- package/dist/web/assets/mcp-management-pane-fBs42kaN.js.br +0 -0
- package/dist/web/assets/mcp-management-pane-fBs42kaN.js.gz +0 -0
- package/dist/web/assets/{message-response-4TUNdrGf.js → message-response-BSFnyRiN.js} +1 -1
- package/dist/web/assets/message-response-BSFnyRiN.js.br +0 -0
- package/dist/web/assets/message-response-BSFnyRiN.js.gz +0 -0
- package/dist/web/assets/{official-plugins-pane-BAplGO76.js → official-plugins-pane-DL3I574g.js} +1 -1
- package/dist/web/assets/official-plugins-pane-DL3I574g.js.br +0 -0
- package/dist/web/assets/official-plugins-pane-DL3I574g.js.gz +0 -0
- package/dist/web/assets/{project-file-popup-page-Dad56YW6.js → project-file-popup-page-D7w0o_EU.js} +1 -1
- package/dist/web/assets/project-file-popup-page-D7w0o_EU.js.br +0 -0
- package/dist/web/assets/project-file-popup-page-D7w0o_EU.js.gz +0 -0
- package/dist/web/assets/{project-source-panel-DdnLauha.js → project-source-panel-m_xiBT3O.js} +1 -1
- package/dist/web/assets/project-source-panel-m_xiBT3O.js.br +0 -0
- package/dist/web/assets/project-source-panel-m_xiBT3O.js.gz +0 -0
- package/dist/web/assets/prompt-input-BHBgVKPB.js +1 -0
- package/dist/web/assets/prompt-input-BHBgVKPB.js.br +0 -0
- package/dist/web/assets/prompt-input-BHBgVKPB.js.gz +0 -0
- package/dist/web/assets/{prompt-input-controls-Bu3i8AYj.js → prompt-input-controls-BZ7R1d1q.js} +1 -1
- package/dist/web/assets/prompt-input-controls-BZ7R1d1q.js.br +0 -0
- package/dist/web/assets/prompt-input-controls-BZ7R1d1q.js.gz +0 -0
- package/dist/web/assets/{scheduled-task-date-time-picker-DbSm8_GZ.js → scheduled-task-date-time-picker-CLz7pymx.js} +1 -1
- package/dist/web/assets/scheduled-task-date-time-picker-CLz7pymx.js.br +0 -0
- package/dist/web/assets/scheduled-task-date-time-picker-CLz7pymx.js.gz +0 -0
- package/dist/web/assets/{scheduled-tasks-container-mdJsjyAO.js → scheduled-tasks-container-DGrcqBWt.js} +2 -2
- package/dist/web/assets/scheduled-tasks-container-DGrcqBWt.js.br +0 -0
- package/dist/web/assets/scheduled-tasks-container-DGrcqBWt.js.gz +0 -0
- package/dist/web/assets/{sheet-fQvy64oz.js → sheet-BD5Iohov.js} +1 -1
- package/dist/web/assets/sheet-BD5Iohov.js.br +0 -0
- package/dist/web/assets/sheet-BD5Iohov.js.gz +0 -0
- package/dist/web/assets/{skills-market-container-D6fr7HYq.js → skills-market-container-E47PiSfc.js} +2 -2
- package/dist/web/assets/skills-market-container-E47PiSfc.js.br +0 -0
- package/dist/web/assets/skills-market-container-E47PiSfc.js.gz +0 -0
- package/dist/web/assets/{third-party-marketplace-pane-DH6UbCFu.js → third-party-marketplace-pane-BYKLDRVH.js} +1 -1
- package/dist/web/assets/third-party-marketplace-pane-BYKLDRVH.js.br +0 -0
- package/dist/web/assets/third-party-marketplace-pane-BYKLDRVH.js.gz +0 -0
- package/dist/web/assets/workbench-composer-DWYJJS3y.js +10 -0
- package/dist/web/assets/workbench-composer-DWYJJS3y.js.br +0 -0
- package/dist/web/assets/workbench-composer-DWYJJS3y.js.gz +0 -0
- package/dist/web/assets/{workbench-inspector-changes-DB14OhYw.js → workbench-inspector-changes-DS6N-4Ob.js} +1 -1
- package/dist/web/assets/workbench-inspector-changes-DS6N-4Ob.js.br +0 -0
- package/dist/web/assets/workbench-inspector-changes-DS6N-4Ob.js.gz +0 -0
- package/dist/web/assets/{workbench-pet-canvas-B8-i2EYj.js → workbench-pet-canvas-DdVnx74p.js} +1 -1
- package/dist/web/assets/workbench-pet-canvas-DdVnx74p.js.br +0 -0
- package/dist/web/assets/workbench-pet-canvas-DdVnx74p.js.gz +0 -0
- package/dist/web/assets/{workbench-shell-BqIxxcmn.js → workbench-shell-DXDRW3gW.js} +3 -3
- package/dist/web/assets/workbench-shell-DXDRW3gW.js.br +0 -0
- package/dist/web/assets/workbench-shell-DXDRW3gW.js.gz +0 -0
- package/dist/web/index.html +2 -2
- package/dist/web/index.html.br +0 -0
- package/dist/web/index.html.gz +0 -0
- package/package.json +1 -1
- package/dist/web/assets/button-group-BXsWRHx1.js.br +0 -0
- package/dist/web/assets/button-group-BXsWRHx1.js.gz +0 -0
- package/dist/web/assets/context-menu-D28EIDXC.js.br +0 -0
- package/dist/web/assets/context-menu-D28EIDXC.js.gz +0 -0
- package/dist/web/assets/file-review-dialog-D5uAITDY.js.br +0 -0
- package/dist/web/assets/file-review-dialog-D5uAITDY.js.gz +0 -0
- package/dist/web/assets/git-history-panel-CJ0YniVw.js.br +0 -0
- package/dist/web/assets/git-history-panel-CJ0YniVw.js.gz +0 -0
- package/dist/web/assets/global-settings-dialog-DxUssxBm.js.br +0 -0
- package/dist/web/assets/global-settings-dialog-DxUssxBm.js.gz +0 -0
- package/dist/web/assets/index-BfZBHCrX.css +0 -2
- package/dist/web/assets/index-BfZBHCrX.css.br +0 -0
- package/dist/web/assets/index-BfZBHCrX.css.gz +0 -0
- package/dist/web/assets/index-DU2EMreA.js.br +0 -0
- package/dist/web/assets/index-DU2EMreA.js.gz +0 -0
- package/dist/web/assets/installed-skills-pane-B2bwKvYB.js.br +0 -0
- package/dist/web/assets/installed-skills-pane-B2bwKvYB.js.gz +0 -0
- package/dist/web/assets/lazy-message-response-CD-7ydp6.js.br +0 -0
- package/dist/web/assets/lazy-message-response-CD-7ydp6.js.gz +0 -0
- package/dist/web/assets/mcp-management-pane-Bu90n81z.js.br +0 -0
- package/dist/web/assets/mcp-management-pane-Bu90n81z.js.gz +0 -0
- package/dist/web/assets/message-response-4TUNdrGf.js.br +0 -0
- package/dist/web/assets/message-response-4TUNdrGf.js.gz +0 -0
- package/dist/web/assets/official-plugins-pane-BAplGO76.js.br +0 -0
- package/dist/web/assets/official-plugins-pane-BAplGO76.js.gz +0 -0
- package/dist/web/assets/project-file-popup-page-Dad56YW6.js.br +0 -0
- package/dist/web/assets/project-file-popup-page-Dad56YW6.js.gz +0 -0
- package/dist/web/assets/project-source-panel-DdnLauha.js.br +0 -0
- package/dist/web/assets/project-source-panel-DdnLauha.js.gz +0 -0
- package/dist/web/assets/prompt-input-BLHOBOyz.js +0 -1
- package/dist/web/assets/prompt-input-BLHOBOyz.js.br +0 -0
- package/dist/web/assets/prompt-input-BLHOBOyz.js.gz +0 -0
- package/dist/web/assets/prompt-input-controls-Bu3i8AYj.js.br +0 -0
- package/dist/web/assets/prompt-input-controls-Bu3i8AYj.js.gz +0 -0
- package/dist/web/assets/scheduled-task-date-time-picker-DbSm8_GZ.js.br +0 -0
- package/dist/web/assets/scheduled-task-date-time-picker-DbSm8_GZ.js.gz +0 -0
- package/dist/web/assets/scheduled-tasks-container-mdJsjyAO.js.br +0 -0
- package/dist/web/assets/scheduled-tasks-container-mdJsjyAO.js.gz +0 -0
- package/dist/web/assets/sheet-fQvy64oz.js.br +0 -0
- package/dist/web/assets/sheet-fQvy64oz.js.gz +0 -0
- package/dist/web/assets/skills-market-container-D6fr7HYq.js.br +0 -0
- package/dist/web/assets/skills-market-container-D6fr7HYq.js.gz +0 -0
- package/dist/web/assets/third-party-marketplace-pane-DH6UbCFu.js.br +0 -0
- package/dist/web/assets/third-party-marketplace-pane-DH6UbCFu.js.gz +0 -0
- package/dist/web/assets/workbench-composer-CB04rkAG.js +0 -10
- package/dist/web/assets/workbench-composer-CB04rkAG.js.br +0 -0
- package/dist/web/assets/workbench-composer-CB04rkAG.js.gz +0 -0
- package/dist/web/assets/workbench-inspector-changes-DB14OhYw.js.br +0 -0
- package/dist/web/assets/workbench-inspector-changes-DB14OhYw.js.gz +0 -0
- package/dist/web/assets/workbench-pet-canvas-B8-i2EYj.js.br +0 -0
- package/dist/web/assets/workbench-pet-canvas-B8-i2EYj.js.gz +0 -0
- package/dist/web/assets/workbench-shell-BqIxxcmn.js.br +0 -0
- package/dist/web/assets/workbench-shell-BqIxxcmn.js.gz +0 -0
|
Binary file
|
|
Binary file
|
package/dist/web/assets/{installed-skills-pane-B2bwKvYB.js → installed-skills-pane-yQ22YClZ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{l as r,o as i,r as a}from"./initial-deps-CTprc_pY.js";import{A as o,K as s,_ as c,nt as l}from"./initial-deps-DqJTHr9A.js";import{n as u,t as d}from"./dist-Czw-hil0.js";import{Mt as f,mt as p}from"./index-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{l as r,o as i,r as a}from"./initial-deps-CTprc_pY.js";import{A as o,K as s,_ as c,nt as l}from"./initial-deps-DqJTHr9A.js";import{n as u,t as d}from"./dist-Czw-hil0.js";import{Mt as f,mt as p}from"./index-DuOx_QDa.js";var m=e(t(),1),h=n();function g({onOpen:e,onToggle:t,pending:n,skill:r}){let{t:i}=l(`workbench`);return(0,h.jsxs)(`li`,{className:`skills-installed-row`,children:[(0,h.jsxs)(`button`,{"aria-label":i(`skillsMarket.openSkill`,{name:r.displayName}),className:`skills-installed-row__open`,onClick:()=>{e(r)},type:`button`,children:[(0,h.jsx)(`span`,{"aria-hidden":`true`,className:`skills-market-glyph`,"data-tone":`skills`,children:(0,h.jsx)(s,{})}),(0,h.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`strong`,{className:`block truncate text-body-small`,children:r.displayName}),(0,h.jsx)(`span`,{className:`block truncate text-label text-muted-foreground`,title:r.path,children:r.description||r.path})]}),(0,h.jsx)(o,{"aria-hidden":`true`,className:`skills-installed-row__folder`})]}),(0,h.jsx)(d,{"aria-label":i(`skillsMarket.toggle`,{name:r.displayName}),checked:r.enabled,className:`skills-switch`,disabled:n,onCheckedChange:()=>{t(r)},children:(0,h.jsx)(u,{className:`skills-switch__thumb`})})]})}function _(){let{t:e}=l(`workbench`),{client:t,projects:n}=f(),o=r(),s=i({queryFn:()=>t.listInstalledSkills(),queryKey:[`extensions`,`skills`]}),u=a({mutationFn:e=>t.setSkillEnabled(e.path,!e.enabled),onSuccess:()=>o.invalidateQueries({queryKey:[`extensions`,`skills`]})}),d=a({meta:{actionNotification:{successMessage:!1}},mutationFn:e=>t.openSkillDirectory(e)}),_=(0,m.useMemo)(()=>{let t=new Map;t.set(`system`,{id:`system`,skills:[],title:e(`skillsMarket.scope.system`)}),t.set(`user`,{id:`user`,skills:[],title:e(`skillsMarket.scope.user`)});for(let e of n)t.set(e.id,{id:e.id,skills:[],title:e.name});t.set(`repo`,{id:`repo`,skills:[],title:e(`skillsMarket.scope.repo`)});for(let e of s.data?.data??[])e.scope===`system`||e.scope===`admin`?t.get(`system`)?.skills.push(e):e.scope===`user`?t.get(`user`)?.skills.push(e):t.get(e.projectId??`repo`)?.skills.push(e);return[...t.values()].filter(e=>e.skills.length>0)},[s.data,n,e]);return(0,h.jsxs)(`div`,{className:`skills-market-pane`,role:`tabpanel`,children:[(0,h.jsxs)(`div`,{className:`skills-market-toolbar`,children:[(0,h.jsx)(`span`,{className:`text-body-small text-muted-foreground`,children:e(`skillsMarket.installedCount`,{count:s.data?.data.length??0})}),(0,h.jsx)(p,{"aria-label":e(`skillsMarket.refresh`),disabled:s.isFetching,onClick:()=>void s.refetch(),size:`icon-sm`,title:e(`skillsMarket.refresh`),type:`button`,variant:`ghost`,children:(0,h.jsx)(c,{"aria-hidden":`true`,className:s.isFetching?`animate-spin`:``})})]}),s.isPending?(0,h.jsx)(`div`,{className:`skills-market-state`,role:`status`,children:e(`skillsMarket.loading`)}):s.error===null?_.length===0?(0,h.jsx)(`div`,{className:`skills-market-state`,children:e(`skillsMarket.emptyInstalled`)}):(0,h.jsx)(`div`,{className:`skills-installed-groups`,children:_.map(e=>(0,h.jsxs)(`section`,{className:`skills-installed-group`,children:[(0,h.jsxs)(`header`,{children:[(0,h.jsx)(`h3`,{children:e.title}),(0,h.jsx)(`span`,{children:e.skills.length})]}),(0,h.jsx)(`ul`,{children:e.skills.map(e=>(0,h.jsx)(g,{onOpen:e=>{d.mutate(e.path)},onToggle:e=>{u.mutate(e)},pending:u.isPending&&u.variables.id===e.id,skill:e},e.id))})]},e.id))}):(0,h.jsx)(`div`,{className:`skills-market-state`,role:`alert`,children:e(`skillsMarket.loadError`)})]})}export{_ as InstalledSkillsPane};
|
|
Binary file
|
|
Binary file
|
package/dist/web/assets/{lazy-message-response-CD-7ydp6.js → lazy-message-response-DxkPeKeK.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/message-response-
|
|
2
|
-
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{t}from"./initial-deps-Bx4af_YG.js";import{i as n,t as r}from"./react-runtime-DaCTDC27.js";import{Q as i}from"./initial-deps-DqJTHr9A.js";var a=i(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),o=e(n(),1),s=r();function c(){return t(()=>import(`./message-response-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/message-response-BSFnyRiN.js","assets/rolldown-runtime-CNC7AqOf.js","assets/react-runtime-DaCTDC27.js","assets/initial-deps-DqJTHr9A.js","assets/initial-deps-BsEyuMB0.js","assets/external-link-xbPJFZkP.js","assets/context-menu-BxBZqph_.js","assets/initial-deps-CQxWMuPh.js","assets/scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~project-file-p~olri0nvu-DAfditVv.js","assets/index-DuOx_QDa.js","assets/initial-deps-Bx4af_YG.js","assets/initial-deps-CTprc_pY.js","assets/initial-deps-CNK9MBOP.js","assets/initial-deps-Cq4pSOi-.js","assets/initial-deps-Dr1AWuHB.js","assets/index-CROvcy96.css","assets/chunk-BO2N2NFS-CiutqNGv.js","assets/lib-DE0ZEvGM.js","assets/prompt-reference-token-Cxx6C-IR.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{t}from"./initial-deps-Bx4af_YG.js";import{i as n,t as r}from"./react-runtime-DaCTDC27.js";import{Q as i}from"./initial-deps-DqJTHr9A.js";var a=i(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),o=e(n(),1),s=r();function c(){return t(()=>import(`./message-response-BSFnyRiN.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]))}var l=(0,o.lazy)(c);function u({children:e=``,className:t=``,...n}){return(0,s.jsx)(o.Suspense,{fallback:(0,s.jsx)(`div`,{className:`size-full whitespace-pre-wrap break-words ${t}`,children:(0,s.jsx)(`p`,{children:e})}),children:(0,s.jsx)(l,{className:t,...n,children:e})})}export{a as n,u as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./react-runtime-DaCTDC27.js";import{l as t,o as n,r}from"./initial-deps-CTprc_pY.js";import{_ as i,f as a,nt as o}from"./initial-deps-DqJTHr9A.js";import{n as s,t as c}from"./dist-Czw-hil0.js";import{Mt as l,mt as u}from"./index-
|
|
1
|
+
import{t as e}from"./react-runtime-DaCTDC27.js";import{l as t,o as n,r}from"./initial-deps-CTprc_pY.js";import{_ as i,f as a,nt as o}from"./initial-deps-DqJTHr9A.js";import{n as s,t as c}from"./dist-Czw-hil0.js";import{Mt as l,mt as u}from"./index-DuOx_QDa.js";var d=e();function f(){let{t:e}=o(`workbench`),{client:f}=l(),p=t(),m=n({queryFn:()=>f.listConfiguredMcpServers(),queryKey:[`extensions`,`mcp`]}),h=r({mutationFn:e=>f.setMcpServerEnabled(e.name,!e.enabled),onSuccess:()=>p.invalidateQueries({queryKey:[`extensions`,`mcp`]})});return(0,d.jsxs)(`div`,{className:`skills-market-pane`,role:`tabpanel`,children:[(0,d.jsxs)(`div`,{className:`skills-market-toolbar`,children:[(0,d.jsx)(`span`,{className:`text-body-small text-muted-foreground`,children:e(`skillsMarket.mcpCount`,{count:m.data?.data.length??0})}),(0,d.jsx)(u,{"aria-label":e(`skillsMarket.refreshMcp`),disabled:m.isFetching,onClick:()=>void m.refetch(),size:`icon-sm`,title:e(`skillsMarket.refreshMcp`),type:`button`,variant:`ghost`,children:(0,d.jsx)(i,{"aria-hidden":`true`,className:m.isFetching?`animate-spin`:``})})]}),m.isPending?(0,d.jsx)(`div`,{className:`skills-market-state`,role:`status`,children:e(`skillsMarket.loadingMcp`)}):m.error===null?m.data.data.length===0?(0,d.jsx)(`div`,{className:`skills-market-state`,children:e(`skillsMarket.emptyMcp`)}):(0,d.jsxs)(`section`,{className:`skills-installed-group`,children:[(0,d.jsxs)(`header`,{children:[(0,d.jsx)(`h3`,{children:`MCP`}),(0,d.jsx)(`span`,{children:m.data.data.length})]}),(0,d.jsx)(`ul`,{children:m.data.data.map(t=>(0,d.jsxs)(`li`,{className:`skills-installed-row`,children:[(0,d.jsxs)(`span`,{className:`skills-mcp-row__content`,children:[(0,d.jsx)(`span`,{"aria-hidden":`true`,className:`skills-market-glyph`,"data-tone":`mcp`,children:(0,d.jsx)(a,{})}),(0,d.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,d.jsx)(`strong`,{className:`block truncate text-body-small`,children:t.name}),(0,d.jsx)(`span`,{className:`skills-mcp-status`,"data-enabled":t.enabled,children:e(t.enabled?`skillsMarket.mcpEnabled`:`skillsMarket.mcpStopped`)})]})]}),(0,d.jsx)(c,{"aria-label":e(`skillsMarket.toggleMcp`,{name:t.name}),checked:t.enabled,className:`skills-switch`,disabled:h.isPending&&h.variables.name===t.name,onCheckedChange:()=>{h.mutate(t)},children:(0,d.jsx)(s,{className:`skills-switch__thumb`})})]},t.name))})]}):(0,d.jsx)(`div`,{className:`skills-market-state`,role:`alert`,children:e(`skillsMarket.mcpError`)})]})}export{f as McpManagementPane};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,r as n,t as r}from"./react-runtime-DaCTDC27.js";import{C as i,j as a,nt as o}from"./initial-deps-DqJTHr9A.js";import{t as s}from"./external-link-xbPJFZkP.js";import{c,n as l,r as u,t as d}from"./context-menu-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,r as n,t as r}from"./react-runtime-DaCTDC27.js";import{C as i,j as a,nt as o}from"./initial-deps-DqJTHr9A.js";import{t as s}from"./external-link-xbPJFZkP.js";import{c,n as l,r as u,t as d}from"./context-menu-BxBZqph_.js";import{mt as f}from"./index-DuOx_QDa.js";import{a as p,i as m,n as h,o as g,s as _}from"./chunk-BO2N2NFS-CiutqNGv.js";import{t as ee}from"./prompt-reference-token-Cxx6C-IR.js";var v=e(t(),1),te=e(n(),1),y=r(),b=/^::code-comment\{(.*)\}\s*$/,x=/([a-z]+)=(?:"((?:\\.|[^"\\])*)"|(\d+))/g,S=[`/apps/`,`/packages/`,`/src/`,`/tests/`,`/.superwork/`],C=8,w=12;function ne(e){try{return JSON.parse(`"${e}"`)}catch{return e}}function T(e){let t=new Map;for(let n of e.matchAll(x)){let e=n[1],r=n[2],i=n[3];e!==void 0&&t.set(e,r===void 0?i??``:ne(r))}let n=t.get(`body`),r=t.get(`file`),i=t.get(`title`);if(n===void 0||r===void 0||i===void 0)return null;let a=e=>{let n=t.get(e);return n===void 0?null:Number.parseInt(n,10)};return{body:n,end:a(`end`),file:r,priority:a(`priority`),start:a(`start`),title:i}}function E(e){let t=b.exec(e)?.[1];return t===void 0?null:T(t)}function D(e){for(let t of S){let n=e.indexOf(t);if(n>=0)return e.slice(n+1)}return e.split(/[\\/]/).at(-1)??e}function O(e){let t=D(e.file);return e.start===null?t:`${t}:${e.end===null||e.end===e.start?String(e.start):`${String(e.start)}-${String(e.end)}`}`}function k(e){return e.replace(/^\[P\d+\]\s*/,``)}function A({comment:e,commentIndex:t}){let n=(0,v.useRef)(null),r=(0,v.useRef)(null),i=(0,v.useId)(),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(),l=k(e.title),u=O(e),d=(0,v.useCallback)(()=>{let e=n.current,t=r.current;if(e===null||t===null)return;let i=e.getBoundingClientRect(),a=t.getBoundingClientRect(),o=Math.max(w,window.innerWidth-a.width-w),s=Math.min(Math.max(i.left,w),o),l=i.bottom+C+a.height<=window.innerHeight-w?i.bottom+C:i.top-a.height-C,u=Math.max(w,window.innerHeight-a.height-w);c({left:s,top:Math.min(Math.max(l,w),u)})},[]);return(0,v.useLayoutEffect)(()=>{if(!a){c(void 0);return}return d(),window.addEventListener(`resize`,d),window.addEventListener(`scroll`,d,!0),()=>{window.removeEventListener(`resize`,d),window.removeEventListener(`scroll`,d,!0)}},[a,d]),(0,y.jsxs)(`li`,{"aria-describedby":a?i:void 0,className:`flex min-w-0 cursor-pointer items-center gap-3 rounded-control px-1 py-2 text-body-small transition-colors hover:bg-control-hover focus-visible:bg-control-hover`,onBlur:()=>{o(!1)},onFocus:()=>{o(!0)},onMouseEnter:()=>{o(!0)},onMouseLeave:()=>{o(!1)},ref:n,tabIndex:0,children:[(0,y.jsx)(`span`,{className:`shrink-0 rounded-control border border-separator-strong px-1.5 py-0.5 text-label text-muted-foreground`,children:e.priority===null?`--`:`P${String(e.priority)}`}),(0,y.jsx)(`span`,{className:`min-w-0 shrink font-semibold text-foreground`,children:l}),(0,y.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:u}),a&&typeof document<`u`?(0,te.createPortal)((0,y.jsxs)(`div`,{className:`pointer-events-none fixed z-50 w-[min(28rem,calc(100vw-1.5rem))] rounded-surface border border-separator-strong bg-raised p-3 text-left shadow-floating`,"data-floating-surface":!0,id:i,ref:r,role:`tooltip`,style:s===void 0?{left:0,top:0,visibility:`hidden`}:{left:s.left,top:s.top},children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`rounded-control border border-separator-strong px-1.5 py-0.5 text-label text-muted-foreground`,children:e.priority===null?`--`:`P${String(e.priority)}`}),(0,y.jsx)(`p`,{className:`font-semibold text-foreground`,children:l})]}),(0,y.jsx)(`p`,{className:`mt-2 break-all font-mono text-meta text-muted-foreground`,children:u}),(0,y.jsx)(m,{className:`mt-2 text-body-small leading-5 text-foreground [&_a]:text-brand [&_a]:underline [&_a]:underline-offset-2 [&_code]:font-mono [&_code]:text-body-small [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,controls:!1,children:e.body})]}),document.body):null]},`${e.file}:${String(e.start)}:${String(t)}`)}function j({comments:e}){let{t}=o(`conversation`);return e.length===0?null:(0,y.jsxs)(`section`,{"aria-label":t(`agentComponents.codeComments`,{count:e.length}),className:`my-4 overflow-hidden rounded-surface border border-separator-strong bg-raised`,"data-code-comments":`true`,children:[(0,y.jsxs)(`header`,{className:`flex min-h-12 items-center gap-3 border-b border-separator px-4 text-body font-semibold`,children:[(0,y.jsx)(`span`,{className:`grid size-8 place-items-center rounded-control bg-control`,children:(0,y.jsx)(i,{className:`size-4 text-muted-foreground`,"aria-hidden":`true`})}),(0,y.jsx)(`span`,{children:t(`agentComponents.codeComments`,{count:e.length})})]}),(0,y.jsx)(`ol`,{className:`divide-y divide-separator px-4 py-1`,children:e.map((e,t)=>(0,y.jsx)(A,{comment:e,commentIndex:t},`${e.file}:${String(e.start)}:${String(t)}`))})]})}var M=/(?<=\]\()(?:[a-z]:[\\/]|\\\\)[^)\r\n]+?\.[a-z0-9]+(?::\d+(?::\d+)?)?(?=\))/gi,N=/(?<=\]\()(?![a-z][a-z0-9+.-]*:|\/|#)[^)\r\n]+?\.[a-z0-9]+(?::\d+(?::\d+)?)?(?=\))/gi,P=/(?<=\]\()\/(?!\/)[^)\r\n]+?\.[a-z0-9]+(?::\d+(?::\d+)?)?(?=\))/gi,F=/\s+|\S+/gu,I=/^\s+$/u,L=/\n{3,}/g,R=/\[\^[\w-]{1,200}\](?!:)/,z=/\[\^[\w-]{1,200}\]:/,B=`/__codexly_unc__/`,V=`/__codexly_relative__/`;function H(e){return e.replace(M,e=>{let t=e.replaceAll(`\\`,`/`);return/^[a-z]:/i.test(t)?`/${t}`:`${B}${t.slice(2)}`}).replace(N,e=>`${V}${e}`).replace(P,e=>e.replaceAll(` `,`%20`).replaceAll(` `,`%09`))}var U=class e{output;trailingWhitespace;constructor(e=``,t=``){this.output=e,this.trailingWhitespace=t}append(e){let t=[],n=this.output.length>0;for(let r of e.matchAll(F)){let e=r[0];if(I.test(e)){this.trailingWhitespace+=e;continue}n&&this.trailingWhitespace.length>0&&t.push(this.trailingWhitespace.replace(L,`
|
|
2
2
|
|
|
3
3
|
`)),this.trailingWhitespace=``,t.push(e),n=!0}t.length>0&&(this.output+=t.join(``))}clone(){return new e(this.output,this.trailingWhitespace)}materialize(){return this.output}};function W(e,t,n){let r=E(e);return r===null?n.discardBlankLines&&e.trim().length===0?!0:(n.whitespace.append(`${H(e)}${t?`
|
|
4
4
|
`:``}`),!1):(n.comments.push(r),t&&n.whitespace.append(`
|
|
Binary file
|
|
Binary file
|
package/dist/web/assets/{official-plugins-pane-BAplGO76.js → official-plugins-pane-DL3I574g.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{l as r,o as i,r as a}from"./initial-deps-CTprc_pY.js";import{E as o,L as s,Q as c,_ as l,m as u,nt as d}from"./initial-deps-DqJTHr9A.js";import{t as f}from"./external-link-xbPJFZkP.js";import{t as p}from"./info-whxTXvIJ.js";import{J as m,Mt as h,mt as g}from"./index-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{l as r,o as i,r as a}from"./initial-deps-CTprc_pY.js";import{E as o,L as s,Q as c,_ as l,m as u,nt as d}from"./initial-deps-DqJTHr9A.js";import{t as f}from"./external-link-xbPJFZkP.js";import{t as p}from"./info-whxTXvIJ.js";import{J as m,Mt as h,mt as g}from"./index-DuOx_QDa.js";import{a as _,i as v,n as y,o as b,r as x,t as S}from"./sheet-BD5Iohov.js";var C=c(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),w=c(`package-check`,[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`m16 17 2 2 4-4`,key:`uh5qu3`}],[`path`,{d:`M21 11.127V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l1.32-.753`,key:`kpkbpo`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}]]),T=c(`plug-zap`,[[`path`,{d:`M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z`,key:`goz73y`}],[`path`,{d:`m2 22 3-3`,key:`19mgm9`}],[`path`,{d:`M7.5 13.5 10 11`,key:`7xgeeb`}],[`path`,{d:`M10.5 16.5 13 14`,key:`10btkg`}],[`path`,{d:`m18 3-4 4h6l-4 4`,key:`16psg9`}]]),E=c(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),D=e(t(),1),O=n();function k(e){try{let t=new URL(e);t.protocol===`https:`&&window.open(t.href,`_blank`,`noopener,noreferrer`)}catch{}}function A({client:e,installResult:t,installing:n,onInstall:r,onOpenChange:a,onUninstall:s,plugin:c,uninstalling:l}){let{t:u}=d(`workbench`),m=i({queryFn:()=>e.getOfficialPlugin(c.marketplaceName,c.marketplacePath,c.pluginName),queryKey:[`extensions`,`plugins`,`detail`,c.marketplaceName,c.marketplacePath,c.pluginName],staleTime:5*6e4}),h=m.data,D=t?.appsNeedingAuth??h?.apps??[];return(0,O.jsx)(S,{onOpenChange:a,open:!0,children:(0,O.jsxs)(y,{className:`official-plugin-sheet`,closeLabel:u(`skillsMarket.closeDetails`),children:[(0,O.jsxs)(_,{className:`official-plugin-sheet__header`,children:[(0,O.jsx)(`div`,{className:`skills-market-glyph`,"data-tone":`plugins`,"aria-hidden":`true`,children:(0,O.jsx)(w,{})}),(0,O.jsxs)(`div`,{className:`min-w-0`,children:[(0,O.jsx)(b,{children:c.displayName}),(0,O.jsx)(x,{children:c.developerName??u(`skillsMarket.officialPublisher`)})]})]}),(0,O.jsx)(`div`,{className:`official-plugin-sheet__body`,children:m.isPending?(0,O.jsx)(`div`,{className:`skills-market-state`,role:`status`,children:u(`skillsMarket.loadingDetail`)}):m.error===null?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{className:`text-body-small leading-6 text-muted-foreground`,children:h?.description??c.description}),t===null?null:(0,O.jsxs)(`p`,{className:`official-plugin-session-note`,role:`status`,children:[(0,O.jsx)(p,{"aria-hidden":`true`}),u(`skillsMarket.newSessionRequired`)]}),(0,O.jsxs)(`div`,{className:`official-plugin-assets`,children:[(0,O.jsxs)(`section`,{children:[(0,O.jsxs)(`h4`,{children:[(0,O.jsx)(C,{"aria-hidden":`true`}),`Skills `,(0,O.jsx)(`span`,{children:h?.skills.length??0})]}),h?.skills.map(e=>(0,O.jsxs)(`div`,{className:`official-plugin-asset`,children:[(0,O.jsx)(`strong`,{children:e.name}),(0,O.jsx)(`p`,{children:e.description})]},e.name))]}),(0,O.jsxs)(`section`,{children:[(0,O.jsxs)(`h4`,{children:[(0,O.jsx)(T,{"aria-hidden":`true`}),`MCP `,(0,O.jsx)(`span`,{children:h?.mcpServers.length??0})]}),h?.mcpServers.map(e=>(0,O.jsx)(`div`,{className:`official-plugin-asset`,children:(0,O.jsx)(`strong`,{children:e})},e))]}),(0,O.jsxs)(`section`,{children:[(0,O.jsxs)(`h4`,{children:[(0,O.jsx)(E,{"aria-hidden":`true`}),`Apps `,(0,O.jsx)(`span`,{children:D.length})]}),D.map(e=>(0,O.jsxs)(`div`,{className:`official-plugin-asset`,children:[(0,O.jsx)(`strong`,{children:e.name}),(0,O.jsx)(`p`,{children:e.description}),e.installUrl===null?null:(0,O.jsxs)(g,{onClick:()=>{k(e.installUrl??``)},size:`compact`,type:`button`,variant:`outline`,children:[(0,O.jsx)(f,{"aria-hidden":`true`}),u(`skillsMarket.authorize`)]})]},e.id))]}),h?.hooks.length===0?null:(0,O.jsxs)(`section`,{children:[(0,O.jsxs)(`h4`,{children:[(0,O.jsx)(E,{"aria-hidden":`true`}),`Hooks `,(0,O.jsx)(`span`,{children:h?.hooks.length??0})]}),h?.hooks.map(e=>(0,O.jsx)(`div`,{className:`official-plugin-asset`,children:(0,O.jsx)(`strong`,{children:e})},e))]})]})]}):(0,O.jsx)(`div`,{className:`skills-market-state`,role:`alert`,children:u(`skillsMarket.pluginError`)})}),(0,O.jsx)(v,{className:`official-plugin-sheet__footer`,children:c.installed?(0,O.jsxs)(g,{disabled:l,onClick:s,type:`button`,variant:`destructive`,children:[l?(0,O.jsx)(o,{"aria-hidden":`true`,className:`animate-spin`}):null,u(`skillsMarket.uninstallPlugin`)]}):(0,O.jsxs)(g,{disabled:n||c.installPolicy===`NOT_AVAILABLE`||c.availability!==`AVAILABLE`,onClick:r,type:`button`,children:[n?(0,O.jsx)(o,{"aria-hidden":`true`,className:`animate-spin`,"data-icon":`loading`}):null,u(`skillsMarket.installPlugin`)]})})]})})}var j=[`extensions`,`plugins`];function M({onOpen:e,plugin:t}){let{t:n}=d(`workbench`);return(0,O.jsxs)(`button`,{className:`skills-market-card official-plugin-card`,onClick:()=>{e(t)},type:`button`,children:[(0,O.jsxs)(`span`,{className:`skills-market-card__topline`,children:[t.logoUrl===null?(0,O.jsx)(`span`,{className:`skills-market-glyph`,"data-tone":`plugins`,"aria-hidden":`true`,children:(0,O.jsx)(T,{})}):(0,O.jsx)(`img`,{className:`official-plugin-card__logo`,src:t.logoUrl,alt:``}),(0,O.jsxs)(`span`,{className:`min-w-0 flex-1 text-left`,children:[(0,O.jsx)(`strong`,{className:`block truncate text-body-small`,children:t.displayName}),(0,O.jsx)(`span`,{className:`block truncate text-label text-muted-foreground`,children:t.developerName??n(`skillsMarket.officialPublisher`)})]}),t.installed?(0,O.jsxs)(`span`,{className:`official-plugin-card__installed`,children:[(0,O.jsx)(s,{"aria-hidden":`true`}),n(`skillsMarket.installed`)]}):null]}),(0,O.jsx)(`span`,{className:`skills-market-card__summary`,children:t.description}),(0,O.jsx)(`span`,{className:`skills-market-card__footer`,children:(0,O.jsx)(`span`,{children:t.version===null?t.name:`v${t.version}`})})]})}function N({emptyLabel:e,onOpen:t,plugins:n,title:r}){return(0,O.jsxs)(`section`,{className:`official-plugin-group`,children:[(0,O.jsxs)(`header`,{children:[(0,O.jsx)(`h3`,{children:r}),(0,O.jsx)(`span`,{children:n.length})]}),n.length===0?(0,O.jsx)(`p`,{className:`official-plugin-group__empty`,children:e}):(0,O.jsx)(`div`,{className:`skills-market-grid official-plugin-grid`,children:n.map(e=>(0,O.jsx)(M,{onOpen:t,plugin:e},e.id))})]})}function P(){let{t:e}=d(`workbench`),{client:t}=h(),n=r(),[o,s]=(0,D.useState)(``),[c,f]=(0,D.useState)(null),[p,_]=(0,D.useState)(null),v=i({queryFn:()=>t.listOfficialPlugins(!1),queryKey:j,staleTime:6e4}),y=(0,D.useMemo)(()=>{let e=[],t=[],n=o.trim().toLocaleLowerCase();for(let r of v.data?.data??[]){let i=[r.displayName,r.name,r.description,r.developerName].filter(Boolean).join(` `).toLocaleLowerCase();n!==``&&!i.includes(n)||(r.installed?e:t).push(r)}return{available:t,installed:e}},[v.data?.data,o]),b=(e,t)=>{n.setQueryData(j,n=>n===void 0?n:{data:n.data.map(n=>n.id===e?{...n,enabled:t,installed:t}:n)})},x=a({mutationFn:e=>t.installOfficialPlugin(e.marketplaceName,e.marketplacePath,e.pluginName,globalThis.crypto.randomUUID()),onSuccess:(e,t)=>{_(e),b(t.id,!0)}}),S=a({mutationFn:e=>t.uninstallOfficialPlugin(e.marketplaceName,e.pluginName,e.id),onSuccess:(e,t)=>{_(null),b(t.id,!1),f(null)}}),C=v.data?.data.find(e=>e.id===c)??null,w=()=>n.fetchQuery({queryFn:()=>t.listOfficialPlugins(!0),queryKey:j,staleTime:0}),T=e=>{_(null),f(e.id)};return(0,O.jsxs)(`div`,{className:`skills-market-pane`,role:`tabpanel`,children:[(0,O.jsxs)(`div`,{className:`skills-market-toolbar`,children:[(0,O.jsxs)(`div`,{className:`skills-market-search`,children:[(0,O.jsx)(u,{"aria-hidden":`true`}),(0,O.jsx)(m,{"aria-label":e(`skillsMarket.searchPlugins`),onChange:e=>{s(e.currentTarget.value)},placeholder:e(`skillsMarket.searchPlugins`),value:o})]}),(0,O.jsxs)(g,{disabled:v.isFetching,onClick:()=>void w(),type:`button`,variant:`outline`,children:[(0,O.jsx)(l,{"aria-hidden":`true`,className:v.isFetching?`animate-spin`:``}),e(`skillsMarket.refreshPlugins`)]})]}),v.isPending?(0,O.jsx)(`div`,{className:`skills-market-state`,role:`status`,children:e(`skillsMarket.loadingPlugins`)}):v.error===null?(0,O.jsxs)(`div`,{className:`official-plugin-groups`,children:[(0,O.jsx)(N,{emptyLabel:e(`skillsMarket.emptyInstalledPlugins`),onOpen:T,plugins:y.installed,title:e(`skillsMarket.installedPlugins`)}),(0,O.jsx)(N,{emptyLabel:e(`skillsMarket.emptyAvailablePlugins`),onOpen:T,plugins:y.available,title:e(`skillsMarket.availablePlugins`)})]}):(0,O.jsx)(`div`,{className:`skills-market-state`,role:`alert`,children:e(`skillsMarket.pluginError`)}),C===null?null:(0,O.jsx)(A,{client:t,installResult:p,installing:x.isPending,onInstall:()=>{x.mutate(C)},onOpenChange:e=>{e||f(null)},onUninstall:()=>{S.mutate(C)},plugin:C,uninstalling:S.isPending})]})}export{P as OfficialPluginsPane};
|
|
Binary file
|
|
Binary file
|
package/dist/web/assets/{project-file-popup-page-Dad56YW6.js → project-file-popup-page-D7w0o_EU.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{t as r}from"./project-source-panel-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{t as r}from"./project-source-panel-m_xiBT3O.js";import{Mt as i}from"./index-DuOx_QDa.js";var a=e(t(),1),o=n();function s({projectId:e,search:t}){let{client:n}=i(),s=t.path.split(/[\\/]/u).at(-1)??t.path;return(0,a.useEffect)(()=>{document.title=s},[s]),(0,o.jsx)(`main`,{className:`h-full min-h-0 bg-raised`,children:(0,o.jsx)(r,{client:n,onClose:()=>{window.close()},previewKind:t.previewKind,projectId:e,reference:{lineNumber:t.lineNumber,path:t.path},...t.rootPath===void 0?{}:{rootPath:t.rootPath}})})}export{s as ProjectFilePopupPage};
|
|
Binary file
|
|
Binary file
|
package/dist/web/assets/{project-source-panel-DdnLauha.js → project-source-panel-m_xiBT3O.js}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/code-highlighter-Bp23lvQ1.js","assets/engine-compile-DcaAFSGO.js","assets/lib-DE0ZEvGM.js","assets/rolldown-runtime-CNC7AqOf.js","assets/code-languages-DVcuYjhn.js","assets/initial-deps-Bx4af_YG.js","assets/github-dark-C-LZuMrd.js","assets/github-light-EUqPIrTm.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{t}from"./initial-deps-Bx4af_YG.js";import{i as n,t as r}from"./react-runtime-DaCTDC27.js";import{t as i}from"./initial-deps-CTprc_pY.js";import{r as a}from"./initial-deps-Dr1AWuHB.js";import{M as o,Q as s,W as c,nt as l,s as u}from"./initial-deps-DqJTHr9A.js";import{n as d,t as f}from"./file-code-corner-CYF-BidF.js";import{n as p,t as m}from"./lazy-message-response-
|
|
2
|
+
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{t}from"./initial-deps-Bx4af_YG.js";import{i as n,t as r}from"./react-runtime-DaCTDC27.js";import{t as i}from"./initial-deps-CTprc_pY.js";import{r as a}from"./initial-deps-Dr1AWuHB.js";import{M as o,Q as s,W as c,nt as l,s as u}from"./initial-deps-DqJTHr9A.js";import{n as d,t as f}from"./file-code-corner-CYF-BidF.js";import{n as p,t as m}from"./lazy-message-response-DxkPeKeK.js";import{B as h,Ct as g,St as _,V as v,mt as y,wt as b,z as x}from"./index-DuOx_QDa.js";import{t as S}from"./code-languages-DVcuYjhn.js";var C=s(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),w=e(n(),1),T=`codexly:workbench:markdown-preview:v1`;function E(){try{return typeof window>`u`?void 0:window.localStorage}catch{return}}function D(e){if(e===void 0)return!1;try{let t=JSON.parse(e.getItem(T)??`null`);return k(t)?t.preview:!1}catch{return!1}}function O(e,t){if(t===void 0)return;let n={preview:e,version:1};try{t.setItem(T,JSON.stringify(n))}catch{}}function k(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.version===1&&typeof t.preview==`boolean`}var A=24*1024*1024,j=512*1024;function M(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16)}function N(e,t){return`${e}:${String(t.length)}:${M(t)}`}var P=class{maxSourceBytes;#e;constructor(e=A,t=128,n=j){this.maxSourceBytes=n,this.#e=new _({getRetainedBytes:(e,t)=>b(e)+g(t),maxBytes:e,maxEntries:t})}get retainedBytes(){return this.#e.retainedBytes}get size(){return this.#e.size}get(e,t){let n=this.#e.get(N(e,t));return n?.source===t?n.tokenized:void 0}set(e,t,n){return b(t)>this.maxSourceBytes?!1:this.#e.set(N(e,t),{source:t,tokenized:n})}},F=r(),I=(0,w.createContext)(null),L=new P;function R(){let e=(0,w.useContext)(I);if(e===null)throw Error(`CodeBlock components must be rendered inside CodeBlock`);return e}function z(e){return{background:`transparent`,foreground:`inherit`,lines:e.split(`
|
|
3
3
|
`).map(e=>e===``?[]:[{content:e,offset:0}])}}function B(e){let t=e.htmlStyle,n=e.color??t?.color,r=t?.[`--shiki-dark`],i=e.bgColor??t?.backgroundColor,a=t?.[`--shiki-dark-bg`];return{...t,backgroundColor:i===void 0||a===void 0?i:`light-dark(${i}, ${a})`,color:n===void 0||r===void 0?n:`light-dark(${n}, ${r})`}}async function V(e,n){if(n===`text`)return z(e);let r=L.get(n,e);if(r!==void 0)return r;let{highlightCode:i}=await t(async()=>{let{highlightCode:e}=await import(`./code-highlighter-Bp23lvQ1.js`);return{highlightCode:e}},__vite__mapDeps([0,1,2,3,4,5,6,7])),a=await i(e,n);return L.set(n,e,a),a}function H({className:e=``,code:t,highlightedLine:n=null,language:r,showLineNumbers:i=!1,...a}){let o=(0,w.useMemo)(()=>z(t),[t]),[s,c]=(0,w.useState)(o);return(0,w.useEffect)(()=>{let e=!0;return c(o),V(t,r).then(t=>{e&&c(t)}).catch(()=>{}),()=>{e=!1}},[t,r,o]),(0,F.jsx)(`div`,{className:`relative min-h-0 overflow-auto ${e}`,...a,children:(0,F.jsx)(`pre`,{className:`m-0 min-w-max bg-transparent py-3 font-mono text-body-small leading-6 text-foreground`,style:{backgroundColor:s.background,color:s.foreground},children:(0,F.jsx)(`code`,{children:s.lines.map((e,t)=>{let r=t+1,a=r===n;return(0,F.jsxs)(`span`,{className:`block min-h-6 px-3 ${i?`grid grid-cols-[4rem_minmax(0,1fr)]`:``} ${a?`bg-brand-soft text-brand-strong`:``}`,"data-code-line":r,"data-highlighted":a?`true`:void 0,children:[i?(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`select-none pr-4 text-right ${a?`text-brand`:`text-muted-foreground`}`,children:r}):null,(0,F.jsx)(`span`,{className:`whitespace-pre`,children:e.length===0?` `:e.map((e,t)=>(0,F.jsx)(`span`,{style:B(e),children:e.content},`${String(r)}-${String(t)}`))})]},r)})})})})}function U({children:e,className:t=``,code:n,highlightedLine:r=null,language:i,showLineNumbers:a=!1,style:o,...s}){let c=(0,w.useMemo)(()=>({code:n}),[n]);return(0,F.jsx)(I.Provider,{value:c,children:(0,F.jsxs)(`div`,{className:`relative w-full overflow-hidden rounded-surface bg-raised text-foreground shadow-sm ${t}`,"data-language":i,style:{containIntrinsicSize:`auto 200px`,contentVisibility:`auto`,...o},...s,children:[e,(0,F.jsx)(H,{code:n,highlightedLine:r,language:i,showLineNumbers:a})]})})}function W({className:e=``,...t}){return(0,F.jsx)(`div`,{className:`flex min-h-8 items-center justify-between border-b border-separator bg-control px-3 text-label text-muted-foreground ${e}`,...t})}function G({className:e=``,...t}){return(0,F.jsx)(`div`,{className:`flex min-w-0 items-center gap-2 ${e}`,...t})}function K({className:e=``,...t}){return(0,F.jsx)(`span`,{className:`truncate font-mono ${e}`,...t})}function q({className:e=``,...t}){return(0,F.jsx)(`div`,{className:`ml-auto flex items-center gap-1 ${e}`,...t})}function J({children:e,className:t=``,onClick:n,onCopy:r,onError:i,timeout:a=2e3,...o}){let{code:s}=R(),[u,f]=(0,w.useState)(!1),{t:p}=l(`conversation`),m=(0,w.useRef)(null);(0,w.useEffect)(()=>()=>{m.current!==null&&clearTimeout(m.current)},[]);let h=async()=>{try{await navigator.clipboard.writeText(s),f(!0),r?.(),m.current!==null&&clearTimeout(m.current),m.current=setTimeout(()=>{f(!1)},a)}catch(e){i?.(e instanceof Error?e:Error(`Unable to copy code`))}};return(0,F.jsx)(y,{variant:`ghost`,"aria-label":p(u?`agentComponents.copiedCode`:`agentComponents.copyCode`),className:`grid size-7 shrink-0 place-items-center rounded-control text-muted-foreground transition-colors hover:bg-control-hover hover:text-foreground ${t}`,onClick:e=>{n?.(e),e.defaultPrevented||h()},type:`button`,...o,children:e??(u?(0,F.jsx)(c,{className:`size-3.5`,"aria-hidden":`true`}):(0,F.jsx)(d,{className:`size-3.5`,"aria-hidden":`true`}))})}function Y(e){return e.split(/[\\/]/u).at(-1)??e}function X({actions:e,lineNumber:t,onClose:n,previewKind:r,sourcePath:i,sourceStatus:a}){let{t:o}=l(`workbench`);return(0,F.jsxs)(W,{className:`min-h-toolbar gap-3 overflow-hidden bg-raised px-3 shadow-toolbar sm:px-4`,children:[(0,F.jsxs)(G,{className:`w-0 flex-1 overflow-hidden`,children:[r===`image`?(0,F.jsx)(p,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}):(0,F.jsx)(f,{className:`size-4 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,F.jsxs)(x,{children:[(0,F.jsx)(v,{asChild:!0,children:(0,F.jsxs)(`div`,{className:`w-0 flex-1 overflow-hidden`,children:[(0,F.jsx)(`h2`,{className:`truncate text-body-small font-semibold`,children:(0,F.jsxs)(K,{children:[Y(i),t===null?null:` (line ${String(t)})`]})}),(0,F.jsx)(`p`,{className:`truncate text-caption text-muted-foreground`,children:i})]})}),(0,F.jsx)(h,{className:`break-all`,children:i})]})]}),a===null?null:(0,F.jsx)(`span`,{className:`shrink-0 text-label ${a===`error`?`text-danger`:`text-warning`}`,role:a===`error`?`alert`:`status`,children:o(a===`loading`?`projectDialog.loadingMoreSource`:a===`error`?`projectDialog.loadMoreSourceError`:`projectDialog.sourcePartial`)}),(0,F.jsxs)(q,{children:[e,n===void 0?null:(0,F.jsxs)(x,{children:[(0,F.jsx)(v,{asChild:!0,children:(0,F.jsx)(y,{"aria-label":o(r===`image`?`projectDialog.closeImagePreview`:`projectDialog.closeSource`),onClick:n,size:`icon-sm`,type:`button`,variant:`ghost`,children:(0,F.jsx)(u,{className:`size-3.5`,"aria-hidden":`true`})})}),(0,F.jsx)(h,{children:o(r===`image`?`projectDialog.closeImagePreview`:`projectDialog.closeSource`)})]})]})]})}var Z=400;function Q(e){return e.scrollHeight-e.scrollTop-e.clientHeight<=Z}function $(e,t){return e.nextCursor===null||e.nextCursor===t?void 0:e.nextCursor}function ee(e){let t=e[0],n=e.at(-1);if(!(t===void 0||n===void 0))return{content:e.map(e=>e.content).join(``),nextCursor:n.nextCursor,path:t.path}}function te({client:e,onClose:t,previewKind:n,projectId:r,reference:s,rootPath:c}){let{t:u}=l(`workbench`),d=(0,w.useRef)(null),[f,p]=(0,w.useState)(()=>D(E())),[g,_]=(0,w.useState)(!1),b=i({enabled:n===`source`,getNextPageParam:(e,t,n)=>$(e,n),initialPageParam:void 0,queryFn:async({pageParam:t,signal:n})=>e.readProjectSourceFile(r,c,s.path,t,{signal:n}),queryKey:[`projects`,r,c??null,`source-file`,s.path],staleTime:3e4}),T=b.data?.pages,k=b.fetchNextPage,A=b.hasNextPage,j=b.isFetchingNextPage,M=(0,w.useMemo)(()=>T===void 0?void 0:ee(T),[T]),N=M?.path??s.path,P=M?.content??``,I=Y(N),L=a(``,r,s.path,c),R=S(N),z=(R===`markdown`||R===`mdx`)&&M?.nextCursor===null,B=z&&f;(0,w.useEffect)(()=>{_(!1)},[n,s.path]),(0,w.useEffect)(()=>{let e=s.lineNumber;if(M===void 0||e===null||B)return;let t=d.current?.querySelector(`[data-code-line="${String(e)}"]`);if(t!=null){t.scrollIntoView({block:`center`});return}A&&!j&&k()},[k,A,j,s.lineNumber,M,B]);let V=M===void 0?null:j?`loading`:b.isFetchNextPageError?`error`:A?`partial`:null,H={lineNumber:s.lineNumber,...t===void 0?{}:{onClose:t},previewKind:n,sourcePath:N,sourceStatus:V},W=e=>{if(n!==`source`||!A||j)return;let t=e.target;!(t instanceof HTMLElement)||!Q(t)||k()},G=e=>{p(e),O(e,E())};return(0,F.jsx)(`section`,{"aria-label":N,className:`h-full min-h-0 bg-raised`,onScrollCapture:W,ref:d,children:n===`image`?(0,F.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)] bg-content`,children:[(0,F.jsx)(X,{...H}),(0,F.jsx)(`div`,{className:`grid min-h-0 place-items-center overflow-hidden p-4 sm:p-6`,children:g?(0,F.jsx)(`div`,{className:`text-body-small text-danger`,role:`alert`,children:u(`projectDialog.loadImageError`)}):(0,F.jsx)(`img`,{alt:I,className:`block size-full object-contain`,decoding:`async`,onError:()=>{_(!0)},src:L})})]}):M===void 0&&b.isPending?(0,F.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)]`,children:[(0,F.jsx)(X,{...H}),(0,F.jsx)(`div`,{className:`grid min-h-48 place-items-center text-body-small text-muted-foreground`,role:`status`,children:u(`projectDialog.loadingSource`)})]}):M===void 0&&b.error!==null?(0,F.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)]`,children:[(0,F.jsx)(X,{...H}),(0,F.jsx)(`div`,{className:`grid min-h-48 place-items-center text-body-small text-danger`,role:`alert`,children:u(`projectDialog.loadSourceError`)})]}):B?(0,F.jsxs)(`div`,{className:`grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)] bg-content`,children:[(0,F.jsx)(X,{...H,actions:(0,F.jsxs)(x,{children:[(0,F.jsx)(v,{asChild:!0,children:(0,F.jsx)(y,{"aria-label":u(`projectDialog.showRawContent`),onClick:()=>{G(!1)},size:`icon-sm`,type:`button`,variant:`ghost`,children:(0,F.jsx)(C,{className:`size-3.5`,"aria-hidden":`true`})})}),(0,F.jsx)(h,{children:u(`projectDialog.showRawContent`)})]})}),(0,F.jsx)(`div`,{className:`min-h-0 overflow-auto px-5 py-4 sm:px-8 sm:py-6`,children:(0,F.jsx)(m,{className:`mx-auto max-w-4xl`,children:P})})]}):(0,F.jsx)(U,{className:`grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)] rounded-none bg-content shadow-none`,code:P,highlightedLine:s.lineNumber,language:R,showLineNumbers:!0,children:(0,F.jsx)(X,{...H,actions:(0,F.jsxs)(F.Fragment,{children:[z?(0,F.jsxs)(x,{children:[(0,F.jsx)(v,{asChild:!0,children:(0,F.jsx)(y,{"aria-label":u(`projectDialog.previewMarkdown`),onClick:()=>{G(!0)},size:`icon-sm`,type:`button`,variant:`ghost`,children:(0,F.jsx)(o,{className:`size-3.5`,"aria-hidden":`true`})})}),(0,F.jsx)(h,{children:u(`projectDialog.previewMarkdown`)})]}):null,(0,F.jsx)(J,{})]})})})})}export{K as a,C as c,J as i,U as n,W as o,q as r,G as s,te as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{l as r}from"./initial-deps-BsEyuMB0.js";import{Q as i,nt as a}from"./initial-deps-DqJTHr9A.js";import{m as o}from"./prompt-input-controls-BZ7R1d1q.js";import"./index-DuOx_QDa.js";var s=i(`git-fork`,[[`circle`,{cx:`12`,cy:`18`,r:`3`,key:`1mpf1b`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`path`,{d:`M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9`,key:`1uq4wg`}],[`path`,{d:`M12 12v3`,key:`158kv8`}]]);function c(e){return e.approvalPolicy===`never`?`never`:e.approvalPolicy===`on-request`&&e.approvalsReviewer===`auto_review`?`auto-review`:`on-request`}function l(e,t){return t===`auto-review`?{...e,approvalPolicy:`on-request`,approvalsReviewer:`auto_review`}:{...e,approvalPolicy:t,approvalsReviewer:`user`}}var u=e(t(),1),d=n();function f(e,t,n){let r=0;for(let i=0;i<e.length;){let a=e.codePointAt(i);if(a===void 0)break;if(i+=a>65535?2:1,r+=1,r>t)return new File([e],n,{type:`text/plain`})}}function p(e,t){return t===void 0||t.trim()===``||t.split(`,`).some(t=>{let n=t.trim();return n.startsWith(`.`)?e.name.toLowerCase().endsWith(n.toLowerCase()):n.endsWith(`/*`)?e.type.startsWith(n.slice(0,-1)):e.type===n})}function m(e){e.previewUrl.startsWith(`blob:`)&&URL.revokeObjectURL(e.previewUrl)}function h({attachments:e,children:t,className:n=``,disabled:i=!1,fileAccept:s,globalDrop:c=!1,imageAccept:l,largePasteCharacterThreshold:h=1/0,maxFileTotalSize:g=1/0,maxFileSize:_=1/0,maxImageSize:v=1/0,maxImages:y=1/0,maxImageTotalSize:b=1/0,multiple:x=!1,onAttachmentsChange:S,onError:C,onPaste:w,onPasteCapture:T,onSubmit:E,pastedTextFileName:D=`Pasted text.txt`,resetKey:O,...k}){let{t:A}=a(`conversation`),[j,M]=(0,u.useState)([]),N=e??j,P=(0,u.useRef)(N),F=(0,u.useRef)(null),I=(0,u.useRef)(null),L=(0,u.useRef)(e!==void 0),R=(0,u.useRef)(O);P.current=N,L.current=e!==void 0;let z=(0,u.useCallback)(t=>{if(e!==void 0){S?.(t(e));return}M(e=>[...t(e)])},[e,S]),B=(0,u.useCallback)((e,t=!1)=>{z(n=>{if(i)return n;let a=[],o=n.filter(e=>e.kind===`image`).length,c=n.reduce((e,t)=>e+(t.kind===`image`?t.size:0),0),u=n.reduce((e,t)=>e+(t.kind===`image`?0:t.size),0);for(let n of e){let e=t?`text`:p(n,l)?`image`:`file`;if(!(e===`text`||(e===`image`?p(n,l):p(n,s)))){C?.({code:`invalid_file_type`,message:A(`agentComponents.invalidFileType`,{name:n.name})});continue}if(e!==`image`&&n.size>_){C?.({code:`file_too_large`,message:A(`agentComponents.fileTooLarge`,{name:n.name})});continue}if(e===`image`&&n.size>v){C?.({code:`file_too_large`,message:A(`agentComponents.fileTooLarge`,{name:n.name})});continue}if(e===`image`&&o>=y){C?.({code:`too_many_images`,message:A(`agentComponents.tooManyImages`,{count:y})});continue}if(e===`image`&&c+n.size>b){C?.({code:`total_size_exceeded`,message:A(`agentComponents.totalImageSizeExceeded`)});continue}if(e!==`image`&&u+n.size>g){C?.({code:`total_size_exceeded`,message:A(`agentComponents.totalAttachmentSizeExceeded`)});continue}if(a.push({file:n,id:r(),kind:e,mediaType:n.type,name:n.name,previewUrl:URL.createObjectURL(n),size:n.size,source:`browser`}),e===`image`?(o+=1,c+=n.size):u+=n.size,!x)break}return[...n,...a]})},[i,s,l,_,g,v,y,b,x,C,A,z]),V=(0,u.useCallback)(()=>{z(e=>(e.forEach(m),[]))},[z]),H=(0,u.useCallback)(e=>{(e===`image`?I:F).current?.click()},[]);(0,u.useLayoutEffect)(()=>{R.current!==O&&(R.current=O,e===void 0&&V())},[e,V,O]);let U=(0,u.useCallback)(e=>{z(t=>{let n=t.find(t=>t.id===e);return n!==void 0&&m(n),t.filter(t=>t.id!==e)})},[z]);(0,u.useEffect)(()=>()=>{L.current||P.current.forEach(m)},[]),(0,u.useEffect)(()=>{e===void 0&&S?.(j)},[e,j,S]),(0,u.useEffect)(()=>{if(!c||i)return;let e=e=>{e.dataTransfer?.types.includes(`Files`)===!0&&e.preventDefault()},t=e=>{e.dataTransfer?.files.length&&(e.preventDefault(),B([...e.dataTransfer.files]))};return document.addEventListener(`dragover`,e),document.addEventListener(`drop`,t),()=>{document.removeEventListener(`dragover`,e),document.removeEventListener(`drop`,t)}},[B,i,c]);let W=(0,u.useMemo)(()=>({clear:V,disabled:i,files:N,openFilePicker:H,remove:U}),[V,i,N,H,U]),G=e=>{let t=e.files;t!==null&&t.length>0&&B([...t]),e.value=``};return(0,d.jsx)(o.Provider,{value:W,children:(0,d.jsxs)(`form`,{...k,className:`overflow-visible rounded-surface border border-transparent bg-raised shadow-floating transition-[border-color,box-shadow] focus-within:border-brand focus-within:shadow-focus ${n}`,"data-prompt-input":``,onPasteCapture:e=>{if(T?.(e),i||e.defaultPrevented||e.clipboardData.files.length>0)return;let t=f(e.clipboardData.getData(`text/plain`),h,D);t!==void 0&&(e.preventDefault(),B([t],!0))},onPaste:e=>{if(w?.(e),i||e.defaultPrevented)return;let t=[...e.clipboardData.files];t.length>0&&(e.preventDefault(),B(t))},onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget).get(`message`);E?.({files:N,text:typeof t==`string`?t:``},e)},children:[(0,d.jsx)(`input`,{...s===void 0?{}:{accept:s},"data-prompt-input-picker":`file`,disabled:i,hidden:!0,multiple:x,onChange:e=>{G(e.currentTarget)},ref:F,type:`file`}),(0,d.jsx)(`input`,{...l===void 0?{}:{accept:l},"data-prompt-input-picker":`image`,disabled:i,hidden:!0,multiple:x,onChange:e=>{G(e.currentTarget)},ref:I,type:`file`}),t]})})}export{s as i,l as n,c as r,h as t};
|
|
Binary file
|
|
Binary file
|
package/dist/web/assets/{prompt-input-controls-Bu3i8AYj.js → prompt-input-controls-BZ7R1d1q.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{E as r,Q as i,nt as a,q as o,v as s}from"./initial-deps-DqJTHr9A.js";import{mt as c}from"./index-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,t as n}from"./react-runtime-DaCTDC27.js";import{E as r,Q as i,nt as a,q as o,v as s}from"./initial-deps-DqJTHr9A.js";import{mt as c}from"./index-DuOx_QDa.js";var l=i(`file-plus-corner`,[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]]),u=i(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),d=i(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),f=i(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),p=e(t(),1);function m(e){return e.isComposing||e.keyCode===229}function h(e){return e.key===`Enter`&&(e.shiftKey||e.metaKey||e.ctrlKey)}var g=(0,p.createContext)(void 0);function _(){let e=(0,p.useContext)(g);if(e===void 0)throw Error(`usePromptInputAttachments must be used inside PromptInput`);return e}var v=n();function y({className:e=``,...t}){return(0,v.jsx)(`div`,{className:`overflow-hidden rounded-surface border border-separator-strong bg-raised shadow-floating ${e}`,"data-prompt-input-command":``,role:`listbox`,...t})}function b({className:e=``,...t}){return(0,v.jsx)(`div`,{className:`max-h-96 overflow-y-auto p-1 ${e}`,"data-prompt-input-command-list":``,...t})}function x({children:e,className:t=``,label:n,...r}){return(0,v.jsxs)(`div`,{"aria-label":n,className:t,role:`group`,...r,children:[(0,v.jsx)(`div`,{className:`px-2 py-1.5 text-caption font-medium text-muted-foreground`,children:n}),e]})}function S({active:e=!1,className:t=``,onMouseDown:n,selected:r=!1,type:i=`button`,...a}){let o=(0,p.useRef)(null);return(0,p.useEffect)(()=>{e&&o.current?.scrollIntoView({block:`nearest`})},[e]),(0,v.jsx)(c,{variant:`ghost`,"aria-selected":r,className:`flex h-auto min-h-8 w-full items-center gap-2 whitespace-normal rounded-control px-2 py-2 text-left text-body-small text-foreground transition-colors hover:bg-control-hover disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent ${e?`bg-control-active`:``} ${t}`,"data-active":e||void 0,onMouseDown:e=>{e.preventDefault(),n?.(e)},ref:o,role:`option`,type:i,...a})}function C({className:e=``,...t}){return(0,v.jsx)(`div`,{className:`px-3 py-5 text-center text-body-small text-muted-foreground ${e}`,role:`status`,...t})}function w({className:e=``,...t}){return(0,v.jsx)(`div`,{className:`px-3 pt-2 ${e}`,...t})}function T({className:e=``,...t}){return(0,v.jsx)(`div`,{className:`px-3 pt-2 ${e}`,...t})}function E({className:e=``,...t}){return(0,v.jsx)(`div`,{className:`flex min-h-10 items-center justify-between gap-2 px-2 pb-2 ${e}`,...t})}function D({className:e=``,...t}){return(0,v.jsx)(`div`,{className:`flex min-w-0 items-center gap-1 ${e}`,...t})}(0,p.forwardRef)(function({className:e=``,name:t=`message`,onKeyDown:n,rows:r=2,...i},a){return(0,v.jsx)(`textarea`,{className:`max-h-40 min-h-12 w-full resize-none bg-transparent px-1 py-1 text-sm leading-5 text-foreground outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed ${e}`,name:t,onKeyDown:e=>{n?.(e),!e.defaultPrevented&&e.key===`Enter`&&!h(e)&&!m(e.nativeEvent)&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())},ref:a,rows:r,...i})});function O({label:e,onSelect:t,separated:n=!1,showHeading:r=!0}){let{t:i}=a(`conversation`);return(0,v.jsxs)(`div`,{"aria-label":e,className:n?`mt-1 border-t border-separator pt-1`:void 0,role:`group`,children:[r?(0,v.jsx)(`p`,{className:`px-2 pb-1 pt-1 text-caption text-muted-foreground`,children:e}):null,(0,v.jsxs)(c,{variant:`ghost`,className:`flex h-8 w-full items-center gap-2 rounded-control px-2 text-label text-foreground hover:bg-control-hover`,contentAlign:`start`,onClick:()=>{t(`image`)},role:`menuitem`,type:`button`,children:[(0,v.jsx)(u,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),i(`agentComponents.addImage`)]}),(0,v.jsxs)(c,{variant:`ghost`,className:`flex h-8 w-full items-center gap-2 rounded-control px-2 text-label text-foreground hover:bg-control-hover`,contentAlign:`start`,onClick:()=>{t(`file`)},role:`menuitem`,type:`button`,children:[(0,v.jsx)(l,{"aria-hidden":`true`,className:`size-4 text-muted-foreground`}),i(`agentComponents.addFile`)]})]})}function k({children:e,label:t,onClick:n,onSelectKind:r,showDeploymentHost:i=!1,...o}){let s=_(),{t:c}=a(`conversation`),[l,u]=(0,p.useState)(!1),f=(0,p.useRef)(null),m=o.disabled===!0||s.disabled,h=t??c(`agentComponents.addImageOrFile`);return(0,p.useEffect)(()=>{if(!l)return;let e=e=>{f.current?.contains(e.target)||u(!1)},t=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[l]),(0,v.jsxs)(`div`,{className:`relative`,ref:f,children:[(0,v.jsx)(A,{...o,"aria-expanded":l,"aria-haspopup":`menu`,"aria-label":h,disabled:m,onClick:e=>{n?.(e),e.defaultPrevented||u(e=>!e)},title:h,children:e??(0,v.jsx)(d,{"aria-hidden":`true`,className:`size-3.5`})}),(0,v.jsxs)(`div`,{className:`absolute bottom-9 left-0 z-50 min-w-40 rounded-control border border-separator-strong bg-raised p-1 shadow-floating`,"data-floating-surface":!0,hidden:!l,role:`menu`,children:[(0,v.jsx)(O,{label:c(`agentComponents.currentDevice`),onSelect:e=>{u(!1),s.openFilePicker(e)},showHeading:i}),i?(0,v.jsx)(O,{label:c(`agentComponents.deploymentHost`),onSelect:e=>{u(!1),r(e)},separated:!0}):null]})]})}function A({children:e,className:t=``,type:n=`button`,...r}){return(0,v.jsx)(c,{className:`max-workbench:min-w-11 ${t}`,size:`sm`,type:n,variant:`ghost`,...r,children:e??(0,v.jsx)(s,{className:`size-3.5`,"aria-hidden":`true`})})}function j({className:e=``,...t}){return(0,v.jsx)(`select`,{className:`h-7 w-auto max-w-40 appearance-none rounded-control border-0 bg-transparent px-1.5 text-label text-muted-foreground outline-none [field-sizing:content] hover:bg-control-hover disabled:cursor-not-allowed disabled:opacity-45 max-workbench:h-11 ${e}`,...t})}function M({children:e,className:t=``,status:n,type:i=`submit`,...a}){let s=n===`reconnecting`||n===`submitting`;return(0,v.jsx)(c,{className:t,size:`icon-compact`,type:i,variant:`inverse`,...a,children:e??(n===`running`?(0,v.jsx)(f,{className:`size-3.5 fill-current`,"aria-hidden":`true`}):s?(0,v.jsx)(r,{className:`size-4 animate-spin`,"aria-hidden":`true`}):(0,v.jsx)(o,{className:`size-4`,"aria-hidden":`true`}))})}export{_,C as a,u as b,b as c,j as d,M as f,h as g,m as h,y as i,E as l,g as m,w as n,x as o,D as p,A as r,S as s,k as t,T as u,f as v,l as x,d as y};
|
|
Binary file
|
|
Binary file
|