@deepseekcode/cli 1.0.14 → 1.0.15

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 (22) hide show
  1. package/dist/cli.js +852 -846
  2. package/package.json +1 -1
  3. package/web/dist/assets/{AgentFlowView-CfSu-PAH.js → AgentFlowView-DrQSkIct.js} +1 -1
  4. package/web/dist/assets/{AgentsView-0Gf3EdnC.js → AgentsView-YGu_UDf3.js} +1 -1
  5. package/web/dist/assets/{AskQuestionModal-UE0P8HVH.js → AskQuestionModal-CZ_rBLKX.js} +1 -1
  6. package/web/dist/assets/{AuditView-DzmxbLTN.js → AuditView-DrrR2wek.js} +1 -1
  7. package/web/dist/assets/{AutomationView-zrlVDQLZ.js → AutomationView-UOaPNG7X.js} +1 -1
  8. package/web/dist/assets/{ChannelConfigView-3CHuvU_y.js → ChannelConfigView-BGoNP_fJ.js} +1 -1
  9. package/web/dist/assets/{FileTreeView-Cc3rRokq.js → FileTreeView-B0FyGNat.js} +1 -1
  10. package/web/dist/assets/HookApprovalModal-Cnm43UOW.js +1 -0
  11. package/web/dist/assets/{HookConfigView-C3-HYLVR.js → HookConfigView-D5AmWakw.js} +2 -2
  12. package/web/dist/assets/{InboxView-DkJjMxlg.js → InboxView-GnuBfoZI.js} +1 -1
  13. package/web/dist/assets/{ModelsView-DERNLd5f.js → ModelsView-D55ftBT-.js} +1 -1
  14. package/web/dist/assets/{SessionGrid-BD_2wvuD.js → SessionGrid-CU4xbLh6.js} +12 -12
  15. package/web/dist/assets/{SettingsPanel-BVIE5AdZ.js → SettingsPanel-CSrVortM.js} +1 -1
  16. package/web/dist/assets/{SkillsView-DU81ko6V.js → SkillsView-CEdocw75.js} +1 -1
  17. package/web/dist/assets/{TerminalView-DiRF3hQA.js → TerminalView-sY_xPkMQ.js} +1 -1
  18. package/web/dist/assets/{ToolsView-Bo87RtdV.js → ToolsView-CaPjukUV.js} +1 -1
  19. package/web/dist/assets/{index-CAwHhr7A.js → index-DcT4VX3U.js} +10 -10
  20. package/web/dist/index.html +1 -1
  21. package/web/dist/assets/HookApprovalModal-DVpdbNbM.js +0 -1
  22. package/web/dist/assets/hookRisk-Ds8oxbfO.js +0 -1
@@ -12,7 +12,7 @@
12
12
  <meta name="theme-color" content="#0d1117" />
13
13
  <meta name="color-scheme" content="dark light" />
14
14
  <title>DeepSeekCode Web</title>
15
- <script type="module" crossorigin src="/assets/index-CAwHhr7A.js"></script>
15
+ <script type="module" crossorigin src="/assets/index-DcT4VX3U.js"></script>
16
16
  <link rel="modulepreload" crossorigin href="/assets/icons-CjRO1znb.js">
17
17
  <link rel="modulepreload" crossorigin href="/assets/markdown-hmVtvQNZ.js">
18
18
  <link rel="modulepreload" crossorigin href="/assets/react-vendor-Dp4P972X.js">
@@ -1 +0,0 @@
1
- import{j as t}from"./markdown-hmVtvQNZ.js";import{r,e as K,A as W,av as z}from"./icons-CjRO1znb.js";import{e as G,j as U,w as k,p as F,c as q,k as Q,u as V,M as B,A as b,q as X}from"./index-CAwHhr7A.js";import{c as Y,R as Z,e as ee}from"./hookRisk-Ds8oxbfO.js";import"./react-vendor-Dp4P972X.js";import"./state-C_jK7HTi.js";const g=15;function oe({isOpen:x,onCloseModal:j}){const{t:o}=G("hook"),i=U(),p=i.pendingApprovals,E=i.autoMode,R=i.setAutoMode,[w,M]=r.useState(0),[n,_]=r.useState(!1),[m,I]=r.useState(g),l=r.useRef(null),d=r.useRef(!1);r.useEffect(()=>{if(p.length!==0){if(E){p.forEach(s=>{k.send({type:"hook_allow",data:JSON.stringify({approvalId:s.approvalId})})}),i.clearApprovals();return}M(s=>Math.min(s,p.length-1))}},[p.length,E]);const e=p[w]??null,y=p.length>0&&e!==null,H=p.length,T=y?H-w-1:0;r.useEffect(()=>{if(!(!y||n||!x||!e))return I(g),l.current=setInterval(()=>{I(s=>s<=1?(l.current&&clearInterval(l.current),0):s-1)},1e3),()=>{l.current&&clearInterval(l.current)}},[y,n,x,e==null?void 0:e.approvalId]);const c=e?Y(e.toolName,e.askPayload):{level:"MEDIUM",reasonKey:"risk_default"},f=Z[c.level],L=F[c.level==="CRITICAL"?"critical":c.level==="HIGH"?"high":c.level==="LOW"?"low":"medium"],$=e?ee(e.toolName,e.askPayload):null,O=m/g*100,S=m<=5,J=X(g-m),P=r.useCallback((s,a)=>{const N=q.getState().activeSessionId;N&&Q.getState().updateHookApprovalStatus(N,s,a)},[]),u=r.useCallback(s=>{e&&(s&&P(e.approvalId,s),_(!0),setTimeout(()=>{i.removeApproval(e.approvalId),M(0),_(!1),d.current=!1,I(g)},200))},[e==null?void 0:e.approvalId,i,P]),v=r.useCallback(()=>{!e||n||d.current||(d.current=!0,l.current&&clearInterval(l.current),k.send({type:"hook_allow",data:JSON.stringify({approvalId:e.approvalId})}),u("approved"))},[e,u,n]),h=r.useCallback(()=>{!e||n||d.current||(d.current=!0,l.current&&clearInterval(l.current),k.send({type:"hook_deny",data:JSON.stringify({approvalId:e.approvalId})}),u("denied"))},[e,u,n]),A=r.useCallback(()=>{!e||n||d.current||(d.current=!0,l.current&&clearInterval(l.current),i.addToSessionAllowList(e.toolName),k.send({type:"hook_allow",data:JSON.stringify({approvalId:e.approvalId})}),u("approved"))},[e,u,i,n]),C=r.useCallback(()=>{!e||n||d.current||(d.current=!0,l.current&&clearInterval(l.current),R(!0),V.getState().setAuto(!0),k.send({type:"hook_allow",data:JSON.stringify({approvalId:e.approvalId})}),u("approved"))},[e,u,n,R]),D=(e==null?void 0:e.timeoutAction)==="deny"?h:v;return r.useEffect(()=>{m===0&&x&&!n&&e&&D()},[m,x,n,e,D]),r.useEffect(()=>{if(!x)return;const s=a=>{a.key==="Escape"?(a.preventDefault(),a.stopPropagation(),h()):a.key==="Enter"?(a.preventDefault(),v()):a.key==="1"?v():a.key==="2"?h():a.key==="3"?A():a.key==="4"&&C()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[x,v,h,A,C]),!y||!e?null:t.jsx(B,{isOpen:x,onClose:()=>j==null?void 0:j(),title:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(z,{className:"w-4 h-4 text-yellow-400"}),t.jsx("span",{children:o("hookApproval")}),t.jsxs("span",{className:"text-xs text-dark-muted",children:["(",w+1,"/",H,")"]})]}),size:"lg",children:t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg ${f.bg} border ${f.border}`,children:[t.jsxs("span",{className:`px-1.5 py-0.5 rounded text-xs font-bold border ${f.badge}`,children:[f.icon," ",c.level]}),t.jsx("span",{className:"text-xs text-dark-muted",children:o(c.reasonKey)}),t.jsxs("div",{className:"flex items-center gap-1.5 ml-auto",children:[t.jsx(K,{size:12,className:S?"text-accent-red":"text-dark-muted"}),t.jsxs("span",{className:`text-xs font-mono ${S?"text-accent-red animate-pulse":"text-dark-muted"}`,children:[m,"s"]}),t.jsx("div",{className:"w-12 h-1.5 bg-dark-border rounded-full overflow-hidden",children:t.jsx("div",{className:`h-full rounded-full transition-all duration-700 ${S?"bg-accent-red":m<=8?"bg-accent-yellow":"bg-accent-green"}`,style:{width:`${O}%`}})})]})]}),t.jsxs("div",{className:"grid gap-3 md:grid-cols-[1fr_1.2fr]",children:[t.jsxs("div",{className:"bg-dark-bg rounded-lg p-3 border border-dark-border space-y-2",children:[t.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[t.jsx("span",{className:"text-dark-muted shrink-0",children:o("tool")}),t.jsx("code",{className:"text-accent-blue font-mono text-xs bg-dark-surface px-1.5 py-0.5 rounded truncate",children:e.toolName})]}),t.jsx("div",{className:"text-xs text-dark-muted",children:J}),t.jsx("div",{className:"text-xs text-dark-muted",children:L.label}),e.timeoutAction&&t.jsxs("div",{className:`text-xs ${e.timeoutAction==="deny"?"text-accent-red":"text-accent-green"}`,children:["timeout: ",e.timeoutAction==="allow"?"auto-allow":"auto-deny",e.timeoutMs?` (${(e.timeoutMs/1e3).toFixed(0)}s)`:""]})]}),t.jsxs("div",{className:"bg-dark-bg rounded-lg p-3 border border-dark-border space-y-2",children:[$&&t.jsx("pre",{className:"text-xs font-mono text-dark-text whitespace-pre-wrap break-all leading-relaxed max-h-36 overflow-y-auto custom-scrollbar",children:$}),(c.level==="CRITICAL"||c.level==="HIGH")&&t.jsxs("div",{className:`flex items-center gap-1.5 text-xs px-2 py-1.5 rounded ${f.bg} ${f.text}`,children:[t.jsx(W,{size:13}),t.jsx("span",{children:c.level==="CRITICAL"?o("highRiskWarning"):o("mediumRiskConfirm")})]})]})]}),t.jsx("div",{className:"grid gap-2 md:grid-cols-2",children:[b.allow,b.deny,b.allow_session,b.auto].map((s,a)=>{const N=[v,h,A,C][a];return t.jsxs("button",{onClick:N,disabled:n,className:"w-full text-left px-3 py-2 rounded-lg hover:bg-dark-hover transition-colors disabled:opacity-50 border border-transparent hover:border-dark-border/50",children:[t.jsxs("div",{className:"flex items-baseline gap-2",children:[t.jsxs("span",{className:"text-xs text-dark-muted font-mono shrink-0",children:[a+1,"."]}),t.jsx("span",{className:"text-sm text-dark-text",children:s.label}),t.jsxs("span",{className:"text-xs text-dark-muted",children:["[",s.key,"]"]})]}),t.jsx("div",{className:"text-xs text-dark-muted/60 ml-5 mt-0.5",children:a===0?o("optionAllowHint"):a===1?o("optionDenyHint"):a===2?o("optionAllowAlwaysHint",{tool:e.toolName}):o("optionAutoModeHint")})]},s.key)})}),t.jsxs("div",{className:"flex items-center justify-between text-xs text-dark-muted/60",children:[t.jsx("span",{children:o("shortcutHint")}),t.jsx("span",{children:T>0?o("morePending",{n:T}):o("lastItem")})]})]})})}export{oe as HookApprovalModal};
@@ -1 +0,0 @@
1
- import{r as t,s}from"./index-CAwHhr7A.js";function o(e,r){switch(t(e,r)){case"critical":return{level:"CRITICAL",reasonKey:"risk_critical"};case"high":return{level:"HIGH",reasonKey:/rm\s+-rf|sudo|chmod\s+777|curl.*\|\s*(ba)?sh|wget.*-O|>\/dev\/|mkfs/i.test(r)?"risk_critical_cmd":/write|edit|save|upload|deploy|publish/i.test(e)?"risk_high_file":/install|uninstall|npm|pip|cargo|gem|apt|brew|choco|yum|dnf/i.test(e)?"risk_high_pkg":"risk_high_shell"};case"low":return{level:"LOW",reasonKey:"risk_low"};default:return{level:"MEDIUM",reasonKey:/git|commit|push|merge|rebase/i.test(e)?"risk_git":"risk_network"}}}const b={CRITICAL:{bg:"bg-red-900/20",border:"border-red-500/40",text:"text-red-400",badge:"bg-red-500/20 text-red-400 border-red-500/30",icon:"🚨"},HIGH:{bg:"bg-orange-900/15",border:"border-orange-500/30",text:"text-orange-400",badge:"bg-orange-500/20 text-orange-400 border-orange-500/30",icon:"⚠️"},MEDIUM:{bg:"bg-yellow-900/10",border:"border-yellow-500/25",text:"text-yellow-400",badge:"bg-yellow-500/15 text-yellow-400 border-yellow-500/25",icon:"📋"},LOW:{bg:"bg-blue-900/10",border:"border-blue-500/25",text:"text-blue-400",badge:"bg-blue-500/15 text-blue-400 border-blue-500/25",icon:"✅"}};function a(e,r){return s(e,r)}export{b as R,o as c,a as e};