cc-viewer 1.4.17 → 1.4.19

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.
@@ -355,7 +355,7 @@ html body {
355
355
  * Copyright (c) Paul O'Shannessy
356
356
  * SPDX-License-Identifier: ISC
357
357
  */var gK={L:Uc.QrCode.Ecc.LOW,M:Uc.QrCode.Ecc.MEDIUM,Q:Uc.QrCode.Ecc.QUARTILE,H:Uc.QrCode.Ecc.HIGH},xR=128,ER="L",kR="#FFFFFF",$R="#000000",RR=!1,TR=1,vK=4,_K=0,bK=.1;function NR(e,t=0){const n=[];return e.forEach(function(r,i){let s=null;r.forEach(function(o,l){if(!o&&s!==null){n.push(`M${s+t} ${i+t}h${l-s}v1H${s+t}z`),s=null;return}if(l===r.length-1){if(!o)return;s===null?n.push(`M${l+t},${i+t} h1v1H${l+t}z`):n.push(`M${s+t},${i+t} h${l+1-s}v1H${s+t}z`);return}o&&s===null&&(s=l)})}),n.join("")}function MR(e,t){return e.slice().map((n,r)=>r<t.y||r>=t.y+t.h?n:n.map((i,s)=>s<t.x||s>=t.x+t.w?i:!1))}function yK(e,t,n,r){if(r==null)return null;const i=e.length+n*2,s=Math.floor(t*bK),o=i/t,l=(r.width||s)*o,c=(r.height||s)*o,u=r.x==null?e.length/2-l/2:r.x*o,h=r.y==null?e.length/2-c/2:r.y*o,p=r.opacity==null?1:r.opacity;let m=null;if(r.excavate){let _=Math.floor(u),b=Math.floor(h),y=Math.ceil(l+u-_),w=Math.ceil(c+h-b);m={x:_,y:b,w:y,h:w}}const v=r.crossOrigin;return{x:u,y:h,h:c,w:l,excavation:m,opacity:p,crossOrigin:v}}function SK(e,t){return t!=null?Math.max(Math.floor(t),0):e?vK:_K}function OR({value:e,level:t,minVersion:n,includeMargin:r,marginSize:i,imageSettings:s,size:o,boostLevel:l}){let c=Q.useMemo(()=>{const _=(Array.isArray(e)?e:[e]).reduce((b,y)=>(b.push(...Uc.QrSegment.makeSegments(y)),b),[]);return Uc.QrCode.encodeSegments(_,gK[t],n,void 0,void 0,l)},[e,t,n,l]);const{cells:u,margin:h,numCells:p,calculatedImageSettings:m}=Q.useMemo(()=>{let v=c.getModules();const _=SK(r,i),b=v.length+_*2,y=yK(v,o,_,s);return{cells:v,margin:_,numCells:b,calculatedImageSettings:y}},[c,o,s,r,i]);return{qrcode:c,margin:h,cells:u,numCells:p,calculatedImageSettings:m}}var CK=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),IR=Q.forwardRef(function(t,n){const r=t,{value:i,size:s=xR,level:o=ER,bgColor:l=kR,fgColor:c=$R,includeMargin:u=RR,minVersion:h=TR,boostLevel:p,marginSize:m,imageSettings:v}=r,b=g1(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:y}=b,w=g1(b,["style"]),x=v==null?void 0:v.src,E=Q.useRef(null),k=Q.useRef(null),R=Q.useCallback(L=>{E.current=L,typeof n=="function"?n(L):n&&(n.current=L)},[n]),[T,M]=Q.useState(!1),{margin:I,cells:A,numCells:B,calculatedImageSettings:H}=OR({value:i,level:o,minVersion:h,boostLevel:p,includeMargin:u,marginSize:m,imageSettings:v,size:s});Q.useEffect(()=>{if(E.current!=null){const L=E.current,z=L.getContext("2d");if(!z)return;let F=A;const D=k.current,j=H!=null&&D!==null&&D.complete&&D.naturalHeight!==0&&D.naturalWidth!==0;j&&H.excavation!=null&&(F=MR(A,H.excavation));const V=window.devicePixelRatio||1;L.height=L.width=s*V;const U=s/B*V;z.scale(U,U),z.fillStyle=l,z.fillRect(0,0,B,B),z.fillStyle=c,CK?z.fill(new Path2D(NR(F,I))):A.forEach(function(W,G){W.forEach(function(K,Y){K&&z.fillRect(Y+I,G+I,1,1)})}),H&&(z.globalAlpha=H.opacity),j&&z.drawImage(D,H.x+I,H.y+I,H.w,H.h)}}),Q.useEffect(()=>{M(!1)},[x]);const N=m1({height:s,width:s},y);let P=null;return x!=null&&(P=Q.createElement("img",{src:x,key:x,style:{display:"none"},onLoad:()=>{M(!0)},ref:k,crossOrigin:H==null?void 0:H.crossOrigin})),Q.createElement(Q.Fragment,null,Q.createElement("canvas",m1({style:N,height:s,width:s,ref:R,role:"img"},w)),P)});IR.displayName="QRCodeCanvas";var wK=Q.forwardRef(function(t,n){const r=t,{value:i,size:s=xR,level:o=ER,bgColor:l=kR,fgColor:c=$R,includeMargin:u=RR,minVersion:h=TR,boostLevel:p,title:m,marginSize:v,imageSettings:_}=r,b=g1(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:y,cells:w,numCells:x,calculatedImageSettings:E}=OR({value:i,level:o,minVersion:h,boostLevel:p,includeMargin:u,marginSize:v,imageSettings:_,size:s});let k=w,R=null;_!=null&&E!=null&&(E.excavation!=null&&(k=MR(w,E.excavation)),R=Q.createElement("image",{href:_.src,height:E.h,width:E.w,x:E.x+y,y:E.y+y,preserveAspectRatio:"none",opacity:E.opacity,crossOrigin:E.crossOrigin}));const T=NR(k,y);return Q.createElement("svg",m1({height:s,width:s,viewBox:`0 0 ${x} ${x}`,ref:n,role:"img"},b),!!m&&Q.createElement("title",null,m),Q.createElement("path",{fill:l,d:`M0,0 h${x}v${x}H0z`,shapeRendering:"crispEdges"}),Q.createElement("path",{fill:c,d:T,shapeRendering:"crispEdges"}),R)});wK.displayName="QRCodeSVG";const bE=/command execution specialist|file search specialist|planning specialist|general-purpose agent/i;function Up(e){const t=e==null?void 0:e.system;return typeof t=="string"?t:Array.isArray(t)?t.map(n=>n&&n.text||"").join(""):""}function bi(e){if(!e)return!1;if(e.mainAgent){const s=Up(e.body||{});return!bE.test(s)}const t=e.body||{};if(!t.system||!Array.isArray(t.tools))return!1;const n=Up(t);if(!n.includes("You are Claude Code")||bE.test(n))return!1;const r=Array.isArray(t.system),i=t.tools.some(s=>s.name==="ToolSearch");if(r&&i){const s=t.messages||[];if((s.length>0?typeof s[0].content=="string"?s[0].content:Array.isArray(s[0].content)?s[0].content.map(l=>l.text||"").join(""):"":"").includes("<available-deferred-tools>"))return!0}if(t.tools.length>10){const s=t.tools.some(c=>c.name==="Edit"),o=t.tools.some(c=>c.name==="Bash"),l=t.tools.some(c=>c.name==="Task"||c.name==="Agent");if(s&&o&&l)return!0}return!1}function v1(e){return e?/^Base directory for this skill:/i.test(e.trim()):!1}function by(e){if(!e)return!0;const t=e.trim();return!!(!t||/^<[a-zA-Z_][\w-]*[\s>]/i.test(t)||/^\[SUGGESTION MODE:/i.test(t)||/^Your response was cut off because it exceeded the output token limit/i.test(t)||/^Base directory for this skill:/i.test(t))}function PR(e){if(!Array.isArray(e))return{commands:[],textBlocks:[],skillBlocks:[]};const t=e.some(s=>s.type==="text"&&/<command-message>/i.test(s.text||"")),n=[];if(t)for(const s of e){if(s.type!=="text")continue;const o=(s.text||"").match(/<command-name>\s*([^<]*)<\/command-name>/i);if(o){const l=o[1].trim();n.push(l.startsWith("/")?l:`/${l}`)}}let r=e.filter(s=>s.type==="text"&&!by(s.text));t&&(r=r.filter(s=>!/<command-message>/i.test(s.text||"")));const i=r.filter(s=>v1(s.text));return i.length>0&&(r=r.filter(s=>!v1(s.text))),{commands:n,textBlocks:r,skillBlocks:i}}function LR(e,t){var v,_;const n=e[t];if(!bi(n))return null;const r=(_=(v=n.response)==null?void 0:v.body)==null?void 0:_.usage;if(!r)return null;const i=r.cache_creation_input_tokens||0,s=r.cache_read_input_tokens||0;if(i===0||i<=s)return null;let o=null;for(let b=t-1;b>=0;b--)if(bi(e[b])){o=e[b];break}if(!o)return null;if(n.timestamp-o.timestamp>300*1e3)return{reason:"ttl"};const c=$l(o.body),u=$l(n.body);if(!c||!u)return{reason:"key_change"};const h=[];c.model!==u.model&&h.push("model_change"),JSON.stringify(c.system)!==JSON.stringify(u.system)&&h.push("system_change"),JSON.stringify(c.tools)!==JSON.stringify(u.tools)&&h.push("tools_change");const p=c.messages||[],m=u.messages||[];if(m.length<p.length)h.push("msg_truncated");else{const b=Math.min(p.length,m.length);let y=!0;for(let w=0;w<b;w++)if(JSON.stringify(p[w])!==JSON.stringify(m[w])){y=!1;break}y||h.push("msg_modified")}return h.length===0?{reason:"key_change"}:{reason:h[0],reasons:h}}function qp(e){return e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""}function AR(e){return e.content?typeof e.content=="string"?e.content:Array.isArray(e.content)?e.content.filter(t=>t.type==="text").map(t=>t.text).join(`
358
- `):JSON.stringify(e.content):String(e.content??"")}const xK=[{match:/claude/i,name:"Claude",color:"#000000",svg:'<svg t="1771495509570" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1570" width="200" height="200"><path d="M198.4 678.4l198.4-115.2 6.4-12.8H243.2l-96-6.4-102.4-6.4-19.2-6.4-25.6-25.6v-12.8l19.2-12.8h32l64 6.4 96 6.4 70.4 6.4L384 512h19.2V492.8l-6.4-6.4-102.4-64-108.8-76.8-51.2-38.4-32-19.2-19.2-25.6-6.4-38.4 32-32h44.8l38.4 32 83.2 64L384 364.8l12.8 12.8 6.4-6.4-6.4-12.8L339.2 256l-64-108.8-25.6-38.4-6.4-25.6c0-12.8-6.4-19.2-6.4-32l32-44.8 19.2-6.4 44.8 6.4 19.2 12.8 25.6 57.6 44.8 96 64 128 19.2 38.4 6.4 38.4 6.4 12.8h6.4V384l6.4-70.4 12.8-89.6 12.8-115.2 6.4-32 19.2-38.4 32-19.2 25.6 12.8 19.2 32v19.2l-32 70.4-19.2 121.6-19.2 83.2h6.4l12.8-12.8 44.8-57.6 70.4-89.6 32-32 38.4-38.4 25.6-19.2h44.8l32 51.2-12.8 51.2-51.2 57.6-38.4 51.2-51.2 70.4-38.4 57.6v6.4h6.4l121.6-25.6 64-12.8 76.8-12.8 38.4 19.2 6.4 19.2-12.8 32-83.2 19.2-96 19.2-147.2 32 64 6.4h96l128 6.4 32 19.2 25.6 38.4-6.4 19.2-51.2 25.6-70.4-12.8-160-38.4-57.6-12.8h-6.4v6.4l44.8 44.8 83.2 76.8 108.8 102.4 6.4 25.6-12.8 19.2h-12.8l-96-70.4-38.4-32-83.2-70.4h-6.4v6.4l19.2 25.6 102.4 147.2 6.4 44.8-6.4 12.8-25.6 6.4-25.6-6.4-57.6-83.2-64-83.2-51.2-83.2-6.4 6.4-25.6 307.2-12.8 12.8-32 12.8-25.6-19.2-12.8-32 12.8-64 19.2-83.2 12.8-64 12.8-83.2 6.4-25.6h-6.4l-64 83.2-96 128-70.4 76.8-19.2 6.4-32-12.8v-25.6l19.2-25.6 102.4-128 64-83.2 38.4-51.2v-6.4l-268.8 172.8-51.2 12.8-19.2-19.2v-32l12.8-12.8 76.8-57.6z m0 0" fill="#D97757" p-id="1571"></path></svg>'},{match:/gpt|o1|o3|o4/i,name:"OpenAI",color:"#00000",svg:'<svg t="1771495569354" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2752" width="200" height="200"><path d="M565.265178 954.519092c-22.289934 0-48.400999-8.151747-67.952455-14.838727a103.425292 103.425292 0 0 1-26.875292-11.272338c-12.737105-7.769634-15.411897-8.342804-19.806198-24.773669 21.971506-5.158528 81.581157-41.905075 103.871091-55.342721 148.896757-89.159735 119.028246-10.444426 119.028246-364.981743 15.029784 3.566389 82.791182 32.415932 82.791182 57.316972 0 133.102747 20.570425 273.847757-52.604243 354.91943-22.799418 25.47421-91.834527 58.972796-138.388646 58.972796z m-433.061569-299.321966c258.626916 136.860193 184.369594 157.048504 357.721593 52.094759 44.579867-27.193719 90.433445-49.292596 132.593263-77.568969v101.896839c-95.528287 22.226248-272.319304 227.038896-419.050754 100.686815l-25.856323-25.155782c-37.319718-43.943012-45.344094-72.410442-45.344094-151.889977z m375.744596-19.105658c-19.933569-13.310275-79.479535-51.330533-101.896839-57.316972v-133.739602a1158.312326 1158.312326 0 0 0 101.896839-57.316973c43.943012 10.189684 70.690933 47.063603 114.633945 57.316973v127.371049c-17.831947 12.10025-95.846715 58.718054-114.633945 63.749211z m-426.693016-178.31947c0-63.685525-4.26693-90.306074 38.84817-145.776166 23.945757-30.88748 47.509402-39.612396 82.090641-57.953828v261.110652c44.134069 23.372588 83.873836 49.037854 129.345301 74.448379l131.765351 78.396881c-59.545966 15.921381-63.685525 61.32916-109.602788 33.753328-104.699003-62.730242-272.38299-129.345301-272.38299-243.91556z m866.123138 127.37105c0 79.543221-47.573087 161.188063-121.002497 178.31947v-165.582365c0-82.791182 9.743885-84.574377-48.910483-116.608196L565.265178 362.371082c15.79401-23.62733 22.608361-19.105657 48.146256-34.835982 41.714019-25.47421 39.039227-16.112438 117.053995 28.785857 94.190891 54.196382 216.849212 100.559444 216.849212 228.885777z m-541.326961-197.425127v-95.528287c43.751956-23.181531 90.688187-50.94842 133.357489-76.804743 82.154327-49.547338 95.528287-63.303412 185.006449-63.303412 48.464684 0 102.533695 36.746548 125.651541 65.405034 42.223503 52.22213 39.930824 92.662439 39.930824 151.125751-31.078536-16.494551-192.393971-121.002497-222.899337-121.002498s-229.650003 123.422547-261.110652 140.108155z m-50.94842 159.213812c-16.36718-10.95391-63.112355-39.99451-82.791183-44.579867 0-168.320842-33.880699-314.606493 67.952455-390.519639 56.043262-41.714019 113.169178-53.814269 181.376375-30.696423 25.47421 8.661231 35.536523 20.888852 56.36169 26.429493-11.781822 16.048752-80.68956 50.311565-102.278953 63.303412-154.564769 93.235608-120.620384 7.451206-120.620384 376.063024z m-292.953415 121.002498c0 169.148754 115.143429 280.853165 274.293556 273.847756 59.800708-2.674792 26.811606-7.705949 69.417222 25.47421 97.820966 76.741057 228.822091 73.747838 319.637649 1.018969a251.939936 251.939936 0 0 0 52.604244-55.661149c58.20857-85.274918-10.95391-45.598836 81.96327-83.619094 130.236898-53.241099 199.399378-217.358696 128.64476-355.428914-27.448461-53.559526-40.249252-28.849543-28.276373-104.699003 18.723544-118.582447-63.176041-230.032116-157.621674-269.771884-98.90362-41.586648-129.090559 12.737105-178.892639-37.574459A161.888604 161.888604 0 0 0 580.103905 28.913674C474.003821-27.766443 331.284559 1.528898 258.428319 93.681853c-81.326415 102.979494 9.489143 54.705866-92.407697 98.648878C15.149614 257.353652-33.251385 439.175825 41.579107 561.06992c56.807488 92.598753 20.570425 4.967471 20.570424 106.800625z" fill="#EFA474" p-id="2753"></path></svg>'},{match:/gemini/i,name:"Gemini",color:"#4285F4",svg:'<svg t="1771495622863" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4556" width="200" height="200"><path d="M960 512.896A477.248 477.248 0 0 0 512.896 960h-1.792A477.184 477.184 0 0 0 64 512.896v-1.792A477.184 477.184 0 0 0 511.104 64h1.792A477.248 477.248 0 0 0 960 511.104z" fill="#448AFF" p-id="4557"></path></svg>'},{match:/qwen/i,name:"Qwen",color:"#00000",svg:'<svg t="1771495640319" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5634" width="200" height="200"><path d="M537.782857 57.161143c16.749714 29.44 33.426286 58.953143 50.102857 88.502857a7.68 7.68 0 0 0 6.692572 3.913143h236.873143c7.424 0 13.750857 4.681143 19.017142 13.933714l62.061715 109.677714c8.082286 14.372571 10.24 20.370286 1.024 35.693715a2262.893714 2262.893714 0 0 0-32.438857 55.478857l-15.652572 28.086857c-4.534857 8.338286-9.508571 11.922286-1.718857 21.833143l113.152 197.851428c7.314286 12.8 4.754286 21.065143-1.828571 32.841143-18.651429 33.499429-37.632 66.742857-56.978286 99.84-6.765714 11.593143-14.994286 16.018286-29.001143 15.798857a1833.398857 1833.398857 0 0 0-99.291429 0.658286 4.242286 4.242286 0 0 0-3.437714 2.157714 24571.830857 24571.830857 0 0 1-115.419428 202.24c-7.204571 12.507429-16.201143 15.469714-30.939429 15.506286-42.532571 0.146286-85.430857 0.182857-128.731429 0.109714a22.930286 22.930286 0 0 1-19.821714-11.556571l-56.978286-99.108571a3.84 3.84 0 0 0-3.547428-2.121143h-218.331429a76.288 76.288 0 0 1-34.377143-3.913143l-68.388571-118.198857a23.149714 23.149714 0 0 1-0.073143-23.04l51.492572-90.441143a8.448 8.448 0 0 0 0-8.411429 23594.496 23594.496 0 0 1-80.018286-139.593143L47.542857 425.325714c-6.838857-13.202286-7.387429-21.138286 4.022857-41.179428 19.858286-34.669714 39.570286-69.302857 59.209143-103.936 5.632-9.984 12.946286-14.262857 24.905143-14.262857 36.827429-0.182857 73.654857-0.182857 110.445714-0.073143 1.901714 0 3.657143-1.024 4.571429-2.669715l119.734857-208.859428a20.845714 20.845714 0 0 1 17.993143-10.496c22.381714-0.036571 44.946286 0 67.547428-0.256l43.410286-0.987429c14.555429-0.109714 30.866286 1.389714 38.4 14.518857z m-146.432 17.188571a2.56 2.56 0 0 0-2.194286 1.28l-122.331428 213.942857a6.692571 6.692571 0 0 1-5.741714 3.364572H138.788571c-2.377143 0-2.962286 1.060571-1.755428 3.145143l247.917714 433.334857c1.060571 1.792 0.548571 2.633143-1.462857 2.669714l-119.222857 0.658286a9.289143 9.289143 0 0 0-8.557714 4.937143l-56.32 98.56c-1.865143 3.328-0.914286 5.046857 2.925714 5.046857l243.858286 0.365714c1.974857 0 3.401143 0.841143 4.425142 2.56l59.867429 104.704c1.974857 3.474286 3.913143 3.510857 5.924571 0l213.577143-373.76 33.426286-58.953143a2.340571 2.340571 0 0 1 4.096 0l60.745143 107.958857a5.193143 5.193143 0 0 0 4.571428 2.633143l117.906286-0.841143a1.718857 1.718857 0 0 0 1.462857-2.56l-123.721143-217.014857a4.608 4.608 0 0 1 0-4.827428l12.507429-21.613715 47.798857-84.370285c1.024-1.755429 0.512-2.633143-1.499428-2.633143H392.521143c-2.486857 0-3.108571-1.097143-1.828572-3.291429l61.184-106.861714a4.571429 4.571429 0 0 0 0-4.864l-58.258285-102.253714a2.56 2.56 0 0 0-2.267429-1.316572z m268.361143 342.198857c1.974857 0 2.486857 0.841143 1.462857 2.56l-35.474286 62.500572-111.542857 195.620571a2.377143 2.377143 0 0 1-2.121143 1.243429 2.486857 2.486857 0 0 1-2.121142-1.243429l-147.346286-257.353143c-0.841143-1.462857-0.402286-2.230857 1.206857-2.304l9.216-0.512 286.793143-0.512h-0.073143z" fill="#7D5DED" p-id="5635"></path></svg>'},{match:/kimi|moonshot/i,name:"Kimi",color:"#00000",svg:'<svg t="1771495664798" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6649" width="200" height="200"><path d="M731.062857 590.262857v318.317714h-148.589714V443.977143a146.285714 146.285714 0 0 1-146.285714 146.285714l-214.491429-0.036571v318.354285H73.142857V165.814857h148.553143v275.858286h180.882286l119.771428-275.858286h167.753143l-67.84 156.269714a255.524571 255.524571 0 0 1-106.678857 119.588572h66.925714a148.553143 148.553143 0 0 1 148.516572 148.589714z m120.758857-473.965714a99.035429 99.035429 0 0 1 0 198.070857h-99.035428V215.332571a99.035429 99.035429 0 0 1 99.035428-99.035428z" fill="#F4F4F4" p-id="6650"></path></svg>'},{match:/glm|chatglm/i,name:"GLM",color:"#00000",svg:'<svg data-name="glm" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 217.2 200"> <!-- Generator: Adobe Illustrator 29.8.2, SVG Export Plug-In . SVG Version: 2.1.1 Build 3) --> <defs> <style> .st0 { fill: #fff; } </style> </defs> <path class="st0" d="M86.8,190.4H0L131.3,4.8h85.8L86.8,190.4h0ZM212.8,190h-107.9l14.9-21.6c2.3-3.3,6-5.2,9.9-5.2h83.1v26.8h0ZM99.4,26.3c-2.3,3.3-6,5.2-9.9,5.2H6.4V4.8h107.9l-14.9,21.6Z"/> </svg>'},{match:/minimax|abab/i,name:"MiniMax",color:"#00000",svg:'<svg viewBox="0 0 24 24" fill="#fff"><path d="M4 8l4-4 4 4 4-4 4 4v8l-4 4-4-4-4 4-4-4z" fill="none" stroke="#fff" stroke-width="1.5" stroke-linejoin="round"/></svg>'},{match:/deepseek/i,name:"DeepSeek",color:"#00000",svg:'<svg t="1771495947541" class="icon" viewBox="0 0 1391 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11539" width="200" height="200"><path d="M1326.70201318 112.02090779c-12.94676356-6.47485468-18.53640721 5.86654827-26.0997327 12.13814316-2.57756953 2.02376031-4.77807747 4.65435413-6.9785854 7.08168819-18.91788751 20.63528526-41.02017805 34.19182812-69.92725218 32.57311444-42.23384508-2.42733405-78.29772513 11.12773591-110.16384908 44.10589703-6.77679853-40.66668282-29.28560862-64.94444203-63.55255448-80.52327231-17.95608583-8.09209545-36.06388005-16.1856638-48.63358202-33.78825438-8.74900746-12.5431898-11.12773591-26.50330641-15.52727888-40.26016327-2.7823022-8.29535522-5.56460442-16.79249731-14.92044538-18.20942411-10.19244639-1.61871367-14.16337637 7.08168818-18.15934561 14.36516325-15.93232553 29.74073376-22.12880269 62.51710799-21.49692994 95.69705596 1.36684831 74.65672404 32.27117059 134.13819156 93.62469006 176.42358804 6.9800583 4.8546681 8.77551959 9.71080912 6.57501165 16.79102439-4.17271686 14.56695011-9.18056624 28.7303265-13.55506995 43.29727663-2.78377509 9.30723537-6.95501906 11.32952278-16.74241882 7.28347507-33.66158524-14.36516325-62.745407-35.60875491-88.46513227-61.30196806-43.62425973-43.09548975-83.0772755-90.64060097-132.26613965-127.86659667a581.67054343 581.67054343 0 0 0-35.07703915-24.48101901c-50.20074429-49.77065841 6.57501167-90.63912807 19.72650789-95.49526908 13.73181759-5.05792788 4.77955037-22.4572587-39.65480265-22.25547181s-85.07599655 15.3770434-136.87041526 35.60875491c-7.58541892 3.03416756-15.55379103 5.25971475-23.69596499 7.08168819-47.03990759-9.10544849-95.84876434-11.12773591-146.8596019-5.26118765-96.02551195 10.92594905-172.73103555 57.25739323-229.12678412 136.36373875-67.72674425 95.09022244-83.68558192 203.13015422-64.13582165 315.82149435 20.48504978 118.76262107 79.88992666 217.09027084 171.13736114 293.97106918 94.6350973 79.71317902 203.61031862 118.76262107 327.93607117 111.27735913 75.51542292-4.45256725 159.57953934-14.77020989 254.41642354-96.71040901 23.92426399 12.13961607 49.03715574 16.99575708 90.66564019 20.63675815 32.09295007 3.03416756 62.97223311-1.61871367 86.87145788-6.67664152 37.45429471-8.09209545 34.84874013-43.49906349 21.31870939-49.97244528-109.7838417-52.19946535-85.68283009-30.95587367-107.58333373-48.15194474 55.78891504-67.37324899 139.85303146-137.3770918 172.73103555-364.17669887 2.60408167-18.00616433 0.40357375-29.33568711 0-43.90263724-0.20325977-8.90218873 1.76894914-12.34287584 11.75960867-13.35328309 27.49014733-3.23742733 54.19671351-10.92594905 78.70277179-24.68280588 71.11440706-39.65480265 99.81822142-104.80250446 106.59649284-182.89844271 1.01188015-11.9363563-0.20178686-24.27775924-12.56970195-30.54935413M706.87018452 814.87993343c-106.36966673-85.37941333-157.98733782-113.5014334-179.30604722-112.28776638-19.92829476 1.21366703-16.33737217 24.48101902-11.96286844 39.65480264 4.5777635 14.97199677 10.57098089 25.2896394 18.94145384 38.44113563 5.76786417 8.70040186 9.76383341 21.64863831-5.78995762 31.35944742-34.26841876 21.64863831-93.82647692-7.28347506-96.60730623-8.69892897-69.3454579-41.67856295-127.33635378-96.710409-168.1797842-171.97249368-39.45154288-72.43117687-62.33888747-150.1220685-66.13306983-233.07267483-1.01188015-20.02992464 4.77955037-27.11161282 24.27923214-30.75408682a235.19659216 235.19659216 0 0 1 77.91771774-2.02228741c108.59668681 16.18713669 201.05631542 65.75453531 278.54394728 144.25552022 44.23256614 44.71125762 77.69089163 98.12439001 112.1861365 150.32385536 36.64567431 55.43394691 76.0986901 108.24024576 126.29943438 151.53604947 17.72778682 15.17378365 31.86465106 26.7065662 45.41972102 35.20370829-40.84343042 4.65435413-108.99878765 5.66476139-155.60860936-31.96628094m51.00936468-334.83953883c0-8.90218873 6.9815312-15.98387693 15.75557791-15.98387693q2.98408908 0.05155138 5.36134463 1.01188017a15.85720779 15.85720779 0 0 1 10.16740714 14.97199676 15.78061715 15.78061715 0 0 1-15.73053865 15.98387691 15.60386953 15.60386953 0 0 1-15.55379103-15.98387691m158.39238446 82.95060635c-10.1423679 4.24930749-20.30830215 7.89178146-30.09570191 8.29535522-15.12370514 0.81009328-31.66286419-5.46150162-40.61513142-13.15002332-13.96011661-11.93782919-23.92573689-18.61447073-28.09845373-39.45301577-1.79546129-8.90218873-0.81009328-22.65904557 0.78505403-30.54935414 3.59092258-16.99575708-0.40504665-27.92023321-12.13961606-37.8343021-9.55910075-8.09356835-21.72522894-10.31911553-35.07703915-10.31911552-4.98281013 0-9.55910075-2.22407429-12.94823645-4.04604774a13.27669246 13.27669246 0 0 1-5.76639128-18.61299783c1.39041466-2.8323807 8.16868608-9.71228202 9.7623605-10.92594905 18.13136058-10.52090241 39.04649623-7.08021529 58.36795748 0.81009328 17.93104659 7.48526194 31.46107731 21.24359167 51.01083757 40.6666828 19.92829476 23.46913885 23.51921733 29.94399353 34.84874013 47.54511123 8.97877936 13.75685685 17.14746545 27.92023321 22.71206987 44.10442409 3.41270206 10.11732865-0.98684091 18.41121097-12.74644958 23.46913885" fill="#4D6BFE" p-id="11540"></path></svg>'}];function EK(e){if(!e)return null;for(const t of xK)if(t.match.test(e))return{name:e.replace(/^claude-/,"").replace(/-\d{8,}$/,""),provider:t.name,color:t.color,svg:t.svg};return{name:e,provider:e,color:"#065f46",svg:Bc("agent")}}function Bc(e){return e==="user"?'<svg viewBox="0 0 24 24"><path d="M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z"/></svg>':e==="agent"?'<svg viewBox="0 0 24 24"><path d="M12 2a2 2 0 012 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 017 7h1a1 1 0 011 1v3a1 1 0 01-1 1h-1.17A7 7 0 0113 22h-2a7 7 0 01-6.83-3H3a1 1 0 01-1-1v-3a1 1 0 011-1h1a7 7 0 017-7h1V5.73c-.6-.34-1-.99-1-1.73a2 2 0 012-2zM9.5 13a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm5 0a1.5 1.5 0 100 3 1.5 1.5 0 000-3z"/></svg>':e==="sub-search"||e==="sub-explore"?'<svg viewBox="0 0 1024 1024"><path d="M128.957606 76.608479v495.401496c0 20.428928-17.875312 38.304239-38.304239 38.304239S52.349127 592.438903 52.349127 572.009975V38.304239c0-20.428928 17.875312-38.304239 38.30424-38.304239h426.453865c20.428928 0 38.304239 17.875312 38.304239 38.304239s-17.875312 38.304239-38.304239 38.30424H128.957606z m127.680798 127.680798v495.401496c0 20.428928-17.875312 38.304239-38.304239 38.304239S180.029925 720.119701 180.029925 699.690773V165.985037c0-20.428928 17.875312-38.304239 38.30424-38.304239h426.453865c20.428928 0 38.304239 17.875312 38.304239 38.304239s-17.875312 38.304239-38.304239 38.30424H256.638404z m579.670823 291.112219v-150.663341H399.640898v515.830424h76.608479c0 38.304239 30.643392 68.947631 43.411471 89.376558h-145.55611c-33.197007 0-61.286783-28.089776-61.286783-63.840399V321.755611c0-35.750623 28.089776-63.840399 61.286783-63.840399h490.294264c33.197007 0 61.286783 28.089776 61.286784 63.840399V564.349127c-20.428928-22.982544-58.733167-56.179551-89.376559-68.947631zM486.46384 411.13217h255.361596c15.321696 0 25.53616 10.214464 25.53616 25.536159s-10.214464 25.53616-25.53616 25.53616H486.46384c-15.321696 0-25.53616-10.214464-25.536159-25.53616s10.214464-25.53616 25.536159-25.536159z m0 102.144638h102.144639c15.321696 0 25.53616 10.214464 25.536159 25.53616s-10.214464 25.53616-25.536159 25.536159h-102.144639c-15.321696 0-25.53616-10.214464-25.536159-25.536159s10.214464-25.53616 25.536159-25.53616z m503.062345 492.84788c-2.553616 2.553616-7.660848 10.214464-12.76808 10.214464-10.214464 10.214464-35.750623 10.214464-45.965088 0l-81.71571-71.501247c-28.089776 17.875312-63.840399 28.089776-99.591023 28.089776-102.144638 0-186.413965-84.269327-186.413965-186.413965s84.269327-186.413965 186.413965-186.413965 186.413965 84.269327 186.413965 186.413965c0 38.304239-10.214464 71.501247-30.643391 99.591022l81.715711 71.501247c12.76808 12.76808 12.76808 35.750623 2.553616 48.518703z m-240.039901-324.309227c-58.733167 0-104.698254 48.518703-104.698254 104.698255 0 58.733167 48.518703 104.698254 104.698254 104.698254s104.698254-48.518703 104.698255-104.698254c2.553616-58.733167-45.965087-104.698254-104.698255-104.698255z" fill="#ffffff"/></svg>':e==="sub-plan"?'<svg viewBox="0 0 1024 1024"><path d="M674.507676 598.338391 287.079856 598.338391c-14.136975 0-25.638937 11.499915-25.638937 25.63689 0 14.137998 11.501962 25.640983 25.638937 25.640983l387.42782 0c14.137998 0 25.640983-11.501962 25.640983-25.640983C700.148659 609.838306 688.646698 598.338391 674.507676 598.338391zM794.746154 384.583029c-14.137998 0-25.640983 11.501962-25.640983 25.63996l0 494.299873c0 0.130983 0 0.280386-0.001023 0.433882-0.899486 0.279363-2.665713 0.644683-5.764284 0.644683L200.047664 905.601426c-4.312212 0-7.564279-2.971681-7.564279-6.913457L192.483384 191.851493c0-4.493338 0.974188-8.28878 1.811252-9.821693l373.337917 0c14.136975 0 25.63996-11.501962 25.63996-25.63996 0-14.136975-11.501962-25.638937-25.63996-25.638937l-374.069581 0c-30.336936 0-52.357462 25.696242-52.357462 61.099566l0 706.836477c0 32.086789 26.396183 58.19133 58.84113 58.19133l563.293223 0c34.119075 0 57.042157-21.041222 57.042157-52.356438L820.382021 410.224012C820.383044 396.086014 808.883129 384.583029 794.746154 384.583029zM674.507676 745.295394 287.079856 745.295394c-14.136975 0-25.638937 11.499915-25.638937 25.63689 0 14.137998 11.501962 25.640983 25.638937 25.640983l387.42782 0c14.137998 0 25.640983-11.501962 25.640983-25.640983C700.148659 756.795309 688.646698 745.295394 674.507676 745.295394zM879.595634 157.107177c-3.77293-14.409175-12.871145-28.250414-24.964578-37.975916l-43.827181-35.240619c-12.880355-10.352789-29.27679-16.290011-44.986587-16.290011-16.876366 0-31.594579 6.747681-41.439808 18.995633l-19.624966 24.381293c-6.380314 7.968485-7.987928 17.577331-5.222955 26.916023l-114.241904 142.063553-2.486634 3.090385-22.812565 85.303828c-9.749038 30.859845 4.449335 48.075949 13.806447 55.608505 6.783497 5.450129 14.468526 8.728802 22.851451 9.754155 0.984421 0.246617 2.125407 0.488117 3.440355 0.632403 1.003863 0.110517 2.053776 0.167822 3.118014 0.167822l0.014326 0c4.588505 0 10.047844-0.9967 17.180288-3.13541l2.877537-1.065262 83.402525-41.897226 119.874181-149.07934c0.440022 0.017396 0.880043 0.032746 1.320065 0.032746 9.218966 0 17.411555-3.862981 23.077601-10.892071l19.562545-24.342408C880.924909 191.1976 884.15037 174.495196 879.595634 157.107177zM674.469813 348.564697l-56.738235 28.537963c-2.958378 0.579191-5.734608 1.684362-8.277524 3.296069-0.313132 0.198521-0.615007 0.385786-0.905626 0.562818 0.12382-0.318248 0.25378-0.639566 0.39295-0.971118 0.99977-2.437515 1.588171-5.022387 1.753947-7.702426l17.732873-66.078974 105.73209-131.488707 48.647977 39.113833L674.469813 348.564697zM831.385633 172.919305l-7.679913 9.550517-68.139913-54.779627 7.687076-9.56382c0.291642-0.132006 1.144056-0.38374 2.604314-0.38374 4.28356 0 9.735735 2.071172 13.570063 5.15644l43.832298 35.245735c3.493567 2.805906 6.421246 7.018857 7.642051 10.993378C831.497173 171.081447 831.492056 172.446537 831.385633 172.919305zM487.474932 291.067168l-200.394053 0c-14.136975 0-25.638937 11.501962-25.638937 25.63996 0 14.136975 11.501962 25.637913 25.638937 25.637913l200.394053 0c14.137998 0 25.63996-11.500938 25.63996-25.637913C513.114892 302.56913 501.611907 291.067168 487.474932 291.067168zM674.507676 438.023148 287.079856 438.023148c-14.136975 0-25.638937 11.500938-25.638937 25.638937s11.501962 25.638937 25.638937 25.638937l387.42782 0c14.137998 0 25.640983-11.501962 25.640983-25.638937S688.646698 438.023148 674.507676 438.023148z" fill="#ffffff"/></svg>':'<svg viewBox="0 0 1024 1024"><path d="M810.666667 384l53.333333-117.333333L981.333333 213.333333l-117.333333-53.333333L810.666667 42.666667l-53.333334 117.333333L640 213.333333l117.333333 53.333334L810.666667 384zM810.666667 640l-53.333334 117.333333L640 810.666667l117.333333 53.333333L810.666667 981.333333l53.333333-117.333333L981.333333 810.666667l-117.333333-53.333334L810.666667 640zM490.666667 405.333333L384 170.666667 277.333333 405.333333 42.666667 512l234.666666 106.666667L384 853.333333l106.666667-234.666666L725.333333 512l-234.666666-106.666667z m-64.426667 148.906667L384 647.253333l-42.24-93.013333L248.746667 512l93.013333-42.24L384 376.746667l42.24 93.013333 93.013333 42.24-93.013333 42.24z" fill="#ffffff"/></svg>'}function Ar(e){return e==null||e===0?"0":e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e)}function $l(e){if(Array.isArray(e))return e.map($l);if(e&&typeof e=="object"){const t={};for(const n of Object.keys(e))n.startsWith("_")||(t[n]=$l(e[n]));return t}return e}function kK(e){var n,r,i;const t={};for(const s of e){const o=(r=(n=s.response)==null?void 0:n.body)==null?void 0:r.usage;if(!o)continue;const l=((i=s.body)==null?void 0:i.model)||"unknown";t[l]||(t[l]={input:0,output:0,cacheCreation:0,cacheRead:0});const c=t[l];c.input+=o.input_tokens||0,c.output+=o.output_tokens||0,c.cacheCreation+=o.cache_creation_input_tokens||0,c.cacheRead+=o.cache_read_input_tokens||0}return t}function $K(e){var n,r,i;const t={ttl:{count:0,cacheCreate:0},system_change:{count:0,cacheCreate:0},tools_change:{count:0,cacheCreate:0},model_change:{count:0,cacheCreate:0},msg_truncated:{count:0,cacheCreate:0},msg_modified:{count:0,cacheCreate:0},key_change:{count:0,cacheCreate:0}};for(let s=0;s<e.length;s++){const o=LR(e,s);if(!o)continue;const l=((i=(r=(n=e[s].response)==null?void 0:n.body)==null?void 0:r.usage)==null?void 0:i.cache_creation_input_tokens)||0,c=o.reasons||[o.reason];for(const u of c)t[u]&&(t[u].count++,t[u].cacheCreate+=l)}return t}function RK(e){var n,r;const t={};for(const i of e){const s=(r=(n=i.response)==null?void 0:n.body)==null?void 0:r.content;if(Array.isArray(s))for(const o of s)o.type==="tool_use"&&o.name&&(t[o.name]=(t[o.name]||0)+1)}return Object.entries(t).sort((i,s)=>s[1]-i[1])}function TK(e){var n;const t={};for(const r of e){const i=(n=r.body)==null?void 0:n.messages;if(Array.isArray(i))for(const s of i){if(s.role!=="user")continue;const o=s.content;if(Array.isArray(o))for(const l of o){if(l.type!=="text"||!v1(l.text))continue;const c=l.text.match(/^#\s+(.+)$/m),u=c?c[1]:"Skill";t[u]=(t[u]||0)+1}}}return Object.entries(t).sort((r,i)=>i[1]-r[1])}function Gp(e){return typeof e!="string"?!1:e.includes("<system-reminder>")&&e.includes("# claudeMd")}function Kp(e){return typeof e!="string"?!1:e.includes("<system-reminder>")&&e.includes("skills are available")}function NK(e){const t=e==null?void 0:e.messages;if(!Array.isArray(t))return!1;for(const n of t){const r=n==null?void 0:n.content;if(typeof r=="string"){if(Gp(r))return!0}else if(Array.isArray(r)){for(const i of r)if(i.type==="text"&&Gp(i.text))return!0}}return!1}function MK(e){const t=e==null?void 0:e.messages;if(!Array.isArray(t))return!1;for(const n of t){const r=n==null?void 0:n.content;if(typeof r=="string"){if(Kp(r))return!0}else if(Array.isArray(r)){for(const i of r)if(i.type==="text"&&Kp(i.text))return!0}}return!1}function OK(e){return e?e.replace(/^claude-/,"").replace(/-\d{8,}$/,""):null}function IK(e){const t=(e==null?void 0:e.url)||"";return!(e.isHeartbeat||e.isCountTokens||/\/api\/eval\/sdk-/.test(t)||/\/messages\/count_tokens/.test(t))}function Zo(e){return e.filter(IK)}function yE(e,t){for(let n=t-1;n>=0;n--)if(bi(e[n])&&e[n].timestamp)return e[n].timestamp;return null}function yy(e){const t=e==null?void 0:e.content;if(typeof t=="string")return t;if(Array.isArray(t)){for(const n of t)if((n==null?void 0:n.type)==="text"&&n.text)return n.text}return""}function PK(e){const t=e.body||{},n=Up(t);if(/Extract any file paths/i.test(n)||/process Bash commands/i.test(n)||/command execution specialist/i.test(n))return"Bash";if(/file search specialist/i.test(n))return"Search";if(/planning specialist/i.test(n))return"Plan";if(/general-purpose agent/i.test(n))return"General";const r=t.messages||[];for(let i=r.length-1;i>=0;i--){if(r[i].role!=="user")continue;const s=yy(r[i]);if(/^Command:/m.test(s))return"Bash";break}return null}function LK(e){var r;const t=(r=e.body)==null?void 0:r.messages;if(!Array.isArray(t)||t.length!==1)return!1;const n=t[0];return n.role==="user"&&n.content==="count"}function AK(e,t){var c;const n=e.body||{},r=n.tools,i=n.messages||[];if(Array.isArray(r)&&r.length>0||i.length!==1||i[0].role!=="user")return!1;const s=yy(i[0]);if(!s||s.trim()==="count")return!1;const o=s.trim();if(/^Command:/m.test(s)||/^<policy_spec>/i.test(o)||/^<task-notification>/i.test(o))return!1;const l=Up(n);if(!l.includes("Claude Code")||/process Bash commands/i.test(l)||/Extract any file paths/i.test(l))return!1;if(t){const u=((c=t.body)==null?void 0:c.messages)||[],h=s.slice(0,80);if(u.some(m=>{const v=m==null?void 0:m.content;return typeof v=="string"?v.includes(h):Array.isArray(v)?v.some(_=>(_==null?void 0:_.type)==="text"&&_.text&&_.text.includes(h)):!1}))return!0}return!1}function zl(e,t){var r;if(bi(e))return{type:"MainAgent",subType:null};if(e.isCountTokens||LK(e))return{type:"Count",subType:null};if(AK(e,t)){const i=yy((((r=e.body)==null?void 0:r.messages)||[])[0]);return/^Implement the following plan:/i.test(i.trim())?{type:"Plan",subType:"Prompt"}:{type:"Preflight",subType:null}}return{type:"SubAgent",subType:PK(e)}}function Xp(e,t){return e==="Plan"&&t?`Plan:${t}`:e==="SubAgent"&&t?`SubAgent:${t}`:e}const BK={"ui.guide.title":{zh:"欢迎使用 CC Viewer",en:"Welcome to CC Viewer","zh-TW":"歡迎使用 CC Viewer",ko:"CC Viewer에 오신 것을 환영합니다",ja:"CC Viewer へようこそ",de:"Willkommen bei CC Viewer",es:"Bienvenido a CC Viewer",fr:"Bienvenue sur CC Viewer",it:"Benvenuto in CC Viewer",da:"Velkommen til CC Viewer",pl:"Witamy w CC Viewer",ru:"Добро пожаловать в CC Viewer",ar:"مرحبًا بك في CC Viewer",no:"Velkommen til CC Viewer","pt-BR":"Bem-vindo ao CC Viewer",th:"ยินดีต้อนรับสู่ CC Viewer",tr:"CC Viewer'a hoş geldiniz",uk:"Ласкаво просимо до CC Viewer"},"ui.guide.step1":{zh:"你可以先尝试在 Claude 中发起一轮对话。不知道说什么?可以问问:",en:"Try starting a conversation in Claude. Not sure what to say? Try asking:","zh-TW":"你可以先嘗試在 Claude 中發起一輪對話。不知道說什麼?可以問問:",ko:"Claude에서 대화를 시작해 보세요. 무슨 말을 해야 할지 모르겠다면:",ja:"まず Claude で会話を始めてみましょう。何を言えばいいかわからない場合:",de:"Starten Sie ein Gespräch in Claude. Nicht sicher, was Sie sagen sollen? Fragen Sie:",es:"Intenta iniciar una conversación en Claude. ¿No sabes qué decir? Prueba preguntar:",fr:"Essayez de lancer une conversation dans Claude. Vous ne savez pas quoi dire ? Demandez :",it:"Prova ad avviare una conversazione in Claude. Non sai cosa dire? Prova a chiedere:",da:"Prøv at starte en samtale i Claude. Ikke sikker på hvad du skal sige? Prøv at spørge:",pl:"Spróbuj rozpocząć rozmowę w Claude. Nie wiesz co powiedzieć? Zapytaj:",ru:"Попробуйте начать разговор в Claude. Не знаете, что сказать? Спросите:",ar:"جرّب بدء محادثة في Claude. لا تعرف ماذا تقول؟ جرّب أن تسأل:",no:"Prøv å starte en samtale i Claude. Usikker på hva du skal si? Prøv å spørre:","pt-BR":"Tente iniciar uma conversa no Claude. Não sabe o que dizer? Pergunte:",th:"ลองเริ่มบทสนทนาใน Claude ไม่รู้จะพูดอะไร? ลองถามว่า:",tr:"Claude'da bir sohbet başlatmayı deneyin. Ne söyleyeceğinizi bilmiyor musunuz? Şunu sorun:",uk:"Спробуйте розпочати розмову в Claude. Не знаєте, що сказати? Запитайте:"},"ui.guide.exampleQuestion":{zh:"看看我现在有多少 skill",en:"How many skills do I have right now?","zh-TW":"看看我現在有多少 skill",ko:"지금 내가 가진 skill이 몇 개인지 확인해줘",ja:"今いくつの skill があるか見てみて",de:"Wie viele Skills habe ich gerade?",es:"¿Cuántos skills tengo ahora mismo?",fr:"Combien de skills ai-je en ce moment ?",it:"Quanti skill ho in questo momento?",da:"Hvor mange skills har jeg lige nu?",pl:"Ile mam teraz skills?",ru:"Сколько у меня сейчас skills?",ar:"كم عدد الـ skills لديّ الآن؟",no:"Hvor mange skills har jeg nå?","pt-BR":"Quantos skills eu tenho agora?",th:"ตอนนี้ฉันมีกี่ skill?",tr:"Şu anda kaç tane skill'im var?",uk:"Скільки у мене зараз skills?"},"ui.guide.step2":{zh:"你能看到这段文字,说明服务已经启动。如果 Claude 有响应但这里没有变化,可以让 Claude 帮你排查:",en:"If you can see this, the service is running. If Claude responds but nothing shows here, ask Claude to help troubleshoot:","zh-TW":"你能看到這段文字,說明服務已經啟動。如果 Claude 有回應但這裡沒有變化,可以讓 Claude 幫你排查:",ko:"이 텍스트가 보이면 서비스가 실행 중입니다. Claude가 응답하지만 여기에 변화가 없다면 Claude에게 문제 해결을 요청하세요:",ja:"このテキストが見えていればサービスは起動しています。Claude が応答しているのにここに変化がない場合、Claude にトラブルシューティングを依頼してください:",de:"Wenn Sie diesen Text sehen, läuft der Dienst. Wenn Claude antwortet, aber hier nichts angezeigt wird, bitten Sie Claude um Hilfe:",es:"Si puedes ver este texto, el servicio está funcionando. Si Claude responde pero aquí no cambia nada, pide a Claude que te ayude:",fr:"Si vous voyez ce texte, le service fonctionne. Si Claude répond mais rien ne s'affiche ici, demandez à Claude de vous aider :",it:"Se puoi vedere questo testo, il servizio è in esecuzione. Se Claude risponde ma qui non cambia nulla, chiedi a Claude di aiutarti:",da:"Hvis du kan se denne tekst, kører tjenesten. Hvis Claude svarer, men intet vises her, bed Claude om hjælp:",pl:"Jeśli widzisz ten tekst, usługa działa. Jeśli Claude odpowiada, ale tutaj nic się nie zmienia, poproś Claude o pomoc:",ru:"Если вы видите этот текст, сервис запущен. Если Claude отвечает, но здесь ничего не меняется, попросите Claude помочь:",ar:"إذا كنت ترى هذا النص، فالخدمة تعمل. إذا كان Claude يستجيب ولكن لا شيء يظهر هنا، اطلب من Claude المساعدة:",no:"Hvis du kan se denne teksten, kjører tjenesten. Hvis Claude svarer men ingenting vises her, be Claude om hjelp:","pt-BR":"Se você pode ver este texto, o serviço está rodando. Se o Claude responde mas nada aparece aqui, peça ao Claude para ajudar:",th:"ถ้าคุณเห็นข้อความนี้ แสดงว่าบริการกำลังทำงาน หาก Claude ตอบกลับแต่ที่นี่ไม่มีการเปลี่ยนแปลง ให้ขอให้ Claude ช่วยแก้ไข:",tr:"Bu metni görebiliyorsanız, hizmet çalışıyor. Claude yanıt veriyor ama burada bir değişiklik olmuyorsa, Claude'dan yardım isteyin:",uk:"Якщо ви бачите цей текст, сервіс працює. Якщо Claude відповідає, але тут нічого не змінюється, попросіть Claude допомогти:"},"ui.guide.troubleshootCmd":{zh:"我已经启动了 cc-viewer,但是无法看到 cc-viewer 的请求,检查 npm 包中 cc-viewer 的实现,检查问题,并修复",en:"I've started cc-viewer but can't see any requests. Check the cc-viewer npm package implementation, find the issue, and fix it","zh-TW":"我已經啟動了 cc-viewer,但是無法看到 cc-viewer 的請求,檢查 npm 包中 cc-viewer 的實現,檢查問題,並修復",ko:"cc-viewer를 시작했지만 요청을 볼 수 없습니다. cc-viewer npm 패키지 구현을 확인하고 문제를 찾아 수정해 주세요",ja:"cc-viewer を起動しましたがリクエストが表示されません。cc-viewer npm パッケージの実装を確認し、問題を見つけて修正してください",de:"Ich habe cc-viewer gestartet, kann aber keine Anfragen sehen. Überprüfen Sie die cc-viewer npm-Paket-Implementierung, finden Sie das Problem und beheben Sie es",es:"He iniciado cc-viewer pero no puedo ver las solicitudes. Revisa la implementación del paquete npm cc-viewer, encuentra el problema y corrígelo",fr:"J'ai démarré cc-viewer mais je ne vois aucune requête. Vérifiez l'implémentation du package npm cc-viewer, trouvez le problème et corrigez-le",it:"Ho avviato cc-viewer ma non riesco a vedere le richieste. Controlla l'implementazione del pacchetto npm cc-viewer, trova il problema e risolvilo",da:"Jeg har startet cc-viewer, men kan ikke se nogen forespørgsler. Tjek cc-viewer npm-pakkens implementering, find problemet og ret det",pl:"Uruchomiłem cc-viewer, ale nie widzę żadnych żądań. Sprawdź implementację pakietu npm cc-viewer, znajdź problem i napraw go",ru:"Я запустил cc-viewer, но не вижу запросов. Проверьте реализацию npm-пакета cc-viewer, найдите проблему и исправьте её",ar:"لقد قمت بتشغيل cc-viewer ولكن لا أستطيع رؤية أي طلبات. تحقق من تنفيذ حزمة npm الخاصة بـ cc-viewer، وابحث عن المشكلة وأصلحها",no:"Jeg har startet cc-viewer, men kan ikke se noen forespørsler. Sjekk cc-viewer npm-pakkens implementering, finn problemet og fiks det","pt-BR":"Iniciei o cc-viewer mas não consigo ver as requisições. Verifique a implementação do pacote npm cc-viewer, encontre o problema e corrija",th:"ฉันเริ่ม cc-viewer แล้วแต่ไม่เห็นคำขอใดๆ ตรวจสอบการใช้งานแพ็กเกจ npm ของ cc-viewer หาปัญหาและแก้ไข",tr:"cc-viewer'ı başlattım ama istekleri göremiyorum. cc-viewer npm paketinin uygulamasını kontrol edin, sorunu bulun ve düzeltin",uk:"Я запустив cc-viewer, але не бачу жодних запитів. Перевірте реалізацію npm-пакету cc-viewer, знайдіть проблему та виправте її"},"ui.guide.step3":{zh:"在极端情况下,native 版本的 Claude 无法拦截。你可以尝试切回 npm 版本:",en:"In extreme cases, the native version of Claude cannot be intercepted. You can try switching back to the npm version:","zh-TW":"在極端情況下,native 版本的 Claude 無法攔截。你可以嘗試切回 npm 版本:",ko:"극단적인 경우 native 버전의 Claude는 가로챌 수 없습니다. npm 버전으로 전환해 보세요:",ja:"極端な場合、ネイティブ版の Claude はインターセプトできません。npm 版に切り替えてみてください:",de:"In extremen Fällen kann die native Version von Claude nicht abgefangen werden. Versuchen Sie, zur npm-Version zu wechseln:",es:"En casos extremos, la versión nativa de Claude no puede ser interceptada. Puedes intentar volver a la versión npm:",fr:"Dans les cas extrêmes, la version native de Claude ne peut pas être interceptée. Essayez de revenir à la version npm :",it:"In casi estremi, la versione nativa di Claude non può essere intercettata. Puoi provare a tornare alla versione npm:",da:"I ekstreme tilfælde kan den native version af Claude ikke opsnappes. Du kan prøve at skifte tilbage til npm-versionen:",pl:"W skrajnych przypadkach natywna wersja Claude nie może być przechwycona. Możesz spróbować przełączyć się na wersję npm:",ru:"В крайних случаях нативная версия Claude не может быть перехвачена. Попробуйте переключиться на npm-версию:",ar:"في الحالات القصوى، لا يمكن اعتراض النسخة الأصلية من Claude. يمكنك محاولة العودة إلى نسخة npm:",no:"I ekstreme tilfeller kan den native versjonen av Claude ikke fanges opp. Du kan prøve å bytte tilbake til npm-versjonen:","pt-BR":"Em casos extremos, a versão nativa do Claude não pode ser interceptada. Você pode tentar voltar para a versão npm:",th:"ในกรณีสุดขีด เวอร์ชัน native ของ Claude ไม่สามารถดักจับได้ คุณสามารถลองเปลี่ยนกลับไปใช้เวอร์ชัน npm:",tr:"Aşırı durumlarda, Claude'un native sürümü yakalanamaz. npm sürümüne geri dönmeyi deneyebilirsiniz:",uk:"У крайніх випадках нативну версію Claude неможливо перехопити. Спробуйте переключитися на npm-версію:"},"cli.alreadyWorking":{zh:"CC Viewer 已经能工作了",en:"CC Viewer is already working","zh-TW":"CC Viewer 已經能工作了",ko:"CC Viewer가 이미 작동 중입니다",ja:"CC Viewer は既に動作しています",de:"CC Viewer funktioniert bereits",es:"CC Viewer ya está funcionando",fr:"CC Viewer fonctionne déjà",it:"CC Viewer è già funzionante",da:"CC Viewer fungerer allerede",pl:"CC Viewer już działa",ru:"CC Viewer уже работает",ar:"CC Viewer يعمل بالفعل",no:"CC Viewer fungerer allerede","pt-BR":"CC Viewer já está funcionando",th:"CC Viewer ทำงานอยู่แล้ว",tr:"CC Viewer zaten çalışıyor",uk:"CC Viewer вже працює"},"cli.inject.success":{zh:"CC Viewer 安装成功",en:"CC Viewer installed successfully","zh-TW":"CC Viewer 安裝成功",ko:"CC Viewer 설치 성공",ja:"CC Viewer インストール成功",de:"CC Viewer erfolgreich installiert",es:"CC Viewer instalado correctamente",fr:"CC Viewer installé avec succès",it:"CC Viewer installato con successo",da:"CC Viewer installeret",pl:"CC Viewer zainstalowany pomyślnie",ru:"CC Viewer успешно установлен",ar:"تم تثبيت CC Viewer بنجاح",no:"CC Viewer installert","pt-BR":"CC Viewer instalado com sucesso",th:"ติดตั้ง CC Viewer สำเร็จ",tr:"CC Viewer başarıyla kuruldu",uk:"CC Viewer успішно встановлено"},"cli.inject.exists":{zh:"CC Viewer 已安装,无需重复操作",en:"CC Viewer already installed, no action needed","zh-TW":"CC Viewer 已安裝,無需重複操作",ko:"CC Viewer 이미 설치됨, 추가 작업 불필요",ja:"CC Viewer は既にインストール済み、操作不要",de:"CC Viewer bereits installiert, keine Aktion nötig",es:"CC Viewer ya instalado, no se requiere acción",fr:"CC Viewer déjà installé, aucune action nécessaire",it:"CC Viewer già installato, nessuna azione necessaria",da:"CC Viewer allerede installeret, ingen handling nødvendig",pl:"CC Viewer już zainstalowany, nie wymaga działania",ru:"CC Viewer уже установлен, действий не требуется",ar:"CC Viewer مثبت بالفعل، لا حاجة لأي إجراء",no:"CC Viewer allerede installert, ingen handling nødvendig","pt-BR":"CC Viewer já instalado, nenhuma ação necessária",th:"CC Viewer ติดตั้งแล้ว ไม่ต้องดำเนินการ",tr:"CC Viewer zaten kurulu, işlem gerekmiyor",uk:"CC Viewer вже встановлено, дій не потрібно"},"cli.inject.fail":{zh:"❌ 安装失败: {error}",en:"❌ Installation failed: {error}","zh-TW":"❌ 安裝失敗: {error}",ko:"❌ 설치 실패: {error}",ja:"❌ インストール失敗: {error}",de:"❌ Installation fehlgeschlagen: {error}",es:"❌ Instalación fallida: {error}",fr:"❌ Échec de l'installation : {error}",it:"❌ Installazione fallita: {error}",da:"❌ Installation mislykkedes: {error}",pl:"❌ Instalacja nie powiodła się: {error}",ru:"❌ Ошибка установки: {error}",ar:"❌ فشل التثبيت: {error}",no:"❌ Installasjon mislyktes: {error}","pt-BR":"❌ Falha na instalação: {error}",th:"❌ ติดตั้งล้มเหลว: {error}",tr:"❌ Kurulum başarısız: {error}",uk:"❌ Помилка встановлення: {error}"},"cli.inject.notFound":{zh:"❌ 找不到 Claude Code cli.js: {path}",en:"❌ Claude Code cli.js not found: {path}","zh-TW":"❌ 找不到 Claude Code cli.js: {path}",ko:"❌ Claude Code cli.js를 찾을 수 없음: {path}",ja:"❌ Claude Code cli.js が見つかりません: {path}",de:"❌ Claude Code cli.js nicht gefunden: {path}",es:"❌ Claude Code cli.js no encontrado: {path}",fr:"❌ Claude Code cli.js introuvable : {path}",it:"❌ Claude Code cli.js non trovato: {path}",da:"❌ Claude Code cli.js ikke fundet: {path}",pl:"❌ Nie znaleziono Claude Code cli.js: {path}",ru:"❌ Claude Code cli.js не найден: {path}",ar:"❌ لم يتم العثور على Claude Code cli.js: {path}",no:"❌ Claude Code cli.js ikke funnet: {path}","pt-BR":"❌ Claude Code cli.js não encontrado: {path}",th:"❌ ไม่พบ Claude Code cli.js: {path}",tr:"❌ Claude Code cli.js bulunamadı: {path}",uk:"❌ Claude Code cli.js не знайдено: {path}"},"cli.inject.notFoundHint":{zh:" 请确认 @anthropic-ai/claude-code 已安装",en:" Please make sure @anthropic-ai/claude-code is installed","zh-TW":" 請確認 @anthropic-ai/claude-code 已安裝",ko:" @anthropic-ai/claude-code가 설치되어 있는지 확인하세요",ja:" @anthropic-ai/claude-code がインストールされていることを確認してください",de:" Bitte stellen Sie sicher, dass @anthropic-ai/claude-code installiert ist",es:" Asegúrese de que @anthropic-ai/claude-code esté instalado",fr:" Veuillez vérifier que @anthropic-ai/claude-code est installé",it:" Assicurati che @anthropic-ai/claude-code sia installato",da:" Sørg for at @anthropic-ai/claude-code er installeret",pl:" Upewnij się, że @anthropic-ai/claude-code jest zainstalowany",ru:" Убедитесь, что @anthropic-ai/claude-code установлен",ar:" يرجى التأكد من تثبيت @anthropic-ai/claude-code",no:" Sørg for at @anthropic-ai/claude-code er installert","pt-BR":" Certifique-se de que @anthropic-ai/claude-code está instalado",th:" กรุณาตรวจสอบว่า @anthropic-ai/claude-code ถูกติดตั้งแล้ว",tr:" @anthropic-ai/claude-code'un kurulu olduğundan emin olun",uk:" Переконайтеся, що @anthropic-ai/claude-code встановлено"},"cli.hook.exists":{zh:"自动修复 hook 已存在于 {path}",en:"Auto-repair hook already exists in {path}","zh-TW":"自動修復 hook 已存在於 {path}",ko:"자동 복구 hook이 이미 {path}에 존재함",ja:"自動修復 hook は既に {path} に存在します",de:"Auto-Reparatur-Hook existiert bereits in {path}",es:"Hook de auto-reparación ya existe en {path}",fr:"Hook de réparation auto déjà présent dans {path}",it:"Hook di auto-riparazione già presente in {path}",da:"Auto-reparations-hook findes allerede i {path}",pl:"Hook auto-naprawy już istnieje w {path}",ru:"Hook автовосстановления уже существует в {path}",ar:"hook الإصلاح التلقائي موجود بالفعل في {path}",no:"Auto-reparasjons-hook finnes allerede i {path}","pt-BR":"Hook de auto-reparo já existe em {path}",th:"hook ซ่อมอัตโนมัติมีอยู่แล้วใน {path}",tr:"Otomatik onarım hook'u zaten {path} dosyasında mevcut",uk:"Hook автовідновлення вже існує в {path}"},"cli.hook.fail":{zh:"⚠️ shell hook 写入失败: {error}",en:"⚠️ Failed to write shell hook: {error}","zh-TW":"⚠️ shell hook 寫入失敗: {error}",ko:"⚠️ shell hook 작성 실패: {error}",ja:"⚠️ shell hook の書き込みに失敗: {error}",de:"⚠️ Shell-Hook konnte nicht geschrieben werden: {error}",es:"⚠️ Error al escribir el shell hook: {error}",fr:"⚠️ Échec de l'écriture du shell hook : {error}",it:"⚠️ Impossibile scrivere il shell hook: {error}",da:"⚠️ Kunne ikke skrive shell hook: {error}",pl:"⚠️ Nie udało się zapisać shell hook: {error}",ru:"⚠️ Не удалось записать shell hook: {error}",ar:"⚠️ فشل كتابة shell hook: {error}",no:"⚠️ Kunne ikke skrive shell hook: {error}","pt-BR":"⚠️ Falha ao escrever shell hook: {error}",th:"⚠️ เขียน shell hook ล้มเหลว: {error}",tr:"⚠️ Shell hook yazılamadı: {error}",uk:"⚠️ Не вдалося записати shell hook: {error}"},"cli.usage.hint":{zh:`
358
+ `):JSON.stringify(e.content):String(e.content??"")}const xK=[{match:/claude/i,name:"Claude",color:"#000000",svg:'<svg t="1771495509570" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1570" width="200" height="200"><path d="M198.4 678.4l198.4-115.2 6.4-12.8H243.2l-96-6.4-102.4-6.4-19.2-6.4-25.6-25.6v-12.8l19.2-12.8h32l64 6.4 96 6.4 70.4 6.4L384 512h19.2V492.8l-6.4-6.4-102.4-64-108.8-76.8-51.2-38.4-32-19.2-19.2-25.6-6.4-38.4 32-32h44.8l38.4 32 83.2 64L384 364.8l12.8 12.8 6.4-6.4-6.4-12.8L339.2 256l-64-108.8-25.6-38.4-6.4-25.6c0-12.8-6.4-19.2-6.4-32l32-44.8 19.2-6.4 44.8 6.4 19.2 12.8 25.6 57.6 44.8 96 64 128 19.2 38.4 6.4 38.4 6.4 12.8h6.4V384l6.4-70.4 12.8-89.6 12.8-115.2 6.4-32 19.2-38.4 32-19.2 25.6 12.8 19.2 32v19.2l-32 70.4-19.2 121.6-19.2 83.2h6.4l12.8-12.8 44.8-57.6 70.4-89.6 32-32 38.4-38.4 25.6-19.2h44.8l32 51.2-12.8 51.2-51.2 57.6-38.4 51.2-51.2 70.4-38.4 57.6v6.4h6.4l121.6-25.6 64-12.8 76.8-12.8 38.4 19.2 6.4 19.2-12.8 32-83.2 19.2-96 19.2-147.2 32 64 6.4h96l128 6.4 32 19.2 25.6 38.4-6.4 19.2-51.2 25.6-70.4-12.8-160-38.4-57.6-12.8h-6.4v6.4l44.8 44.8 83.2 76.8 108.8 102.4 6.4 25.6-12.8 19.2h-12.8l-96-70.4-38.4-32-83.2-70.4h-6.4v6.4l19.2 25.6 102.4 147.2 6.4 44.8-6.4 12.8-25.6 6.4-25.6-6.4-57.6-83.2-64-83.2-51.2-83.2-6.4 6.4-25.6 307.2-12.8 12.8-32 12.8-25.6-19.2-12.8-32 12.8-64 19.2-83.2 12.8-64 12.8-83.2 6.4-25.6h-6.4l-64 83.2-96 128-70.4 76.8-19.2 6.4-32-12.8v-25.6l19.2-25.6 102.4-128 64-83.2 38.4-51.2v-6.4l-268.8 172.8-51.2 12.8-19.2-19.2v-32l12.8-12.8 76.8-57.6z m0 0" fill="#D97757" p-id="1571"></path></svg>'},{match:/gpt|o1|o3|o4/i,name:"OpenAI",color:"#00000",svg:'<svg t="1771495569354" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2752" width="200" height="200"><path d="M565.265178 954.519092c-22.289934 0-48.400999-8.151747-67.952455-14.838727a103.425292 103.425292 0 0 1-26.875292-11.272338c-12.737105-7.769634-15.411897-8.342804-19.806198-24.773669 21.971506-5.158528 81.581157-41.905075 103.871091-55.342721 148.896757-89.159735 119.028246-10.444426 119.028246-364.981743 15.029784 3.566389 82.791182 32.415932 82.791182 57.316972 0 133.102747 20.570425 273.847757-52.604243 354.91943-22.799418 25.47421-91.834527 58.972796-138.388646 58.972796z m-433.061569-299.321966c258.626916 136.860193 184.369594 157.048504 357.721593 52.094759 44.579867-27.193719 90.433445-49.292596 132.593263-77.568969v101.896839c-95.528287 22.226248-272.319304 227.038896-419.050754 100.686815l-25.856323-25.155782c-37.319718-43.943012-45.344094-72.410442-45.344094-151.889977z m375.744596-19.105658c-19.933569-13.310275-79.479535-51.330533-101.896839-57.316972v-133.739602a1158.312326 1158.312326 0 0 0 101.896839-57.316973c43.943012 10.189684 70.690933 47.063603 114.633945 57.316973v127.371049c-17.831947 12.10025-95.846715 58.718054-114.633945 63.749211z m-426.693016-178.31947c0-63.685525-4.26693-90.306074 38.84817-145.776166 23.945757-30.88748 47.509402-39.612396 82.090641-57.953828v261.110652c44.134069 23.372588 83.873836 49.037854 129.345301 74.448379l131.765351 78.396881c-59.545966 15.921381-63.685525 61.32916-109.602788 33.753328-104.699003-62.730242-272.38299-129.345301-272.38299-243.91556z m866.123138 127.37105c0 79.543221-47.573087 161.188063-121.002497 178.31947v-165.582365c0-82.791182 9.743885-84.574377-48.910483-116.608196L565.265178 362.371082c15.79401-23.62733 22.608361-19.105657 48.146256-34.835982 41.714019-25.47421 39.039227-16.112438 117.053995 28.785857 94.190891 54.196382 216.849212 100.559444 216.849212 228.885777z m-541.326961-197.425127v-95.528287c43.751956-23.181531 90.688187-50.94842 133.357489-76.804743 82.154327-49.547338 95.528287-63.303412 185.006449-63.303412 48.464684 0 102.533695 36.746548 125.651541 65.405034 42.223503 52.22213 39.930824 92.662439 39.930824 151.125751-31.078536-16.494551-192.393971-121.002497-222.899337-121.002498s-229.650003 123.422547-261.110652 140.108155z m-50.94842 159.213812c-16.36718-10.95391-63.112355-39.99451-82.791183-44.579867 0-168.320842-33.880699-314.606493 67.952455-390.519639 56.043262-41.714019 113.169178-53.814269 181.376375-30.696423 25.47421 8.661231 35.536523 20.888852 56.36169 26.429493-11.781822 16.048752-80.68956 50.311565-102.278953 63.303412-154.564769 93.235608-120.620384 7.451206-120.620384 376.063024z m-292.953415 121.002498c0 169.148754 115.143429 280.853165 274.293556 273.847756 59.800708-2.674792 26.811606-7.705949 69.417222 25.47421 97.820966 76.741057 228.822091 73.747838 319.637649 1.018969a251.939936 251.939936 0 0 0 52.604244-55.661149c58.20857-85.274918-10.95391-45.598836 81.96327-83.619094 130.236898-53.241099 199.399378-217.358696 128.64476-355.428914-27.448461-53.559526-40.249252-28.849543-28.276373-104.699003 18.723544-118.582447-63.176041-230.032116-157.621674-269.771884-98.90362-41.586648-129.090559 12.737105-178.892639-37.574459A161.888604 161.888604 0 0 0 580.103905 28.913674C474.003821-27.766443 331.284559 1.528898 258.428319 93.681853c-81.326415 102.979494 9.489143 54.705866-92.407697 98.648878C15.149614 257.353652-33.251385 439.175825 41.579107 561.06992c56.807488 92.598753 20.570425 4.967471 20.570424 106.800625z" fill="#EFA474" p-id="2753"></path></svg>'},{match:/gemini/i,name:"Gemini",color:"#4285F4",svg:'<svg t="1771495622863" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4556" width="200" height="200"><path d="M960 512.896A477.248 477.248 0 0 0 512.896 960h-1.792A477.184 477.184 0 0 0 64 512.896v-1.792A477.184 477.184 0 0 0 511.104 64h1.792A477.248 477.248 0 0 0 960 511.104z" fill="#448AFF" p-id="4557"></path></svg>'},{match:/qwen/i,name:"Qwen",color:"#00000",svg:'<svg t="1771495640319" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5634" width="200" height="200"><path d="M537.782857 57.161143c16.749714 29.44 33.426286 58.953143 50.102857 88.502857a7.68 7.68 0 0 0 6.692572 3.913143h236.873143c7.424 0 13.750857 4.681143 19.017142 13.933714l62.061715 109.677714c8.082286 14.372571 10.24 20.370286 1.024 35.693715a2262.893714 2262.893714 0 0 0-32.438857 55.478857l-15.652572 28.086857c-4.534857 8.338286-9.508571 11.922286-1.718857 21.833143l113.152 197.851428c7.314286 12.8 4.754286 21.065143-1.828571 32.841143-18.651429 33.499429-37.632 66.742857-56.978286 99.84-6.765714 11.593143-14.994286 16.018286-29.001143 15.798857a1833.398857 1833.398857 0 0 0-99.291429 0.658286 4.242286 4.242286 0 0 0-3.437714 2.157714 24571.830857 24571.830857 0 0 1-115.419428 202.24c-7.204571 12.507429-16.201143 15.469714-30.939429 15.506286-42.532571 0.146286-85.430857 0.182857-128.731429 0.109714a22.930286 22.930286 0 0 1-19.821714-11.556571l-56.978286-99.108571a3.84 3.84 0 0 0-3.547428-2.121143h-218.331429a76.288 76.288 0 0 1-34.377143-3.913143l-68.388571-118.198857a23.149714 23.149714 0 0 1-0.073143-23.04l51.492572-90.441143a8.448 8.448 0 0 0 0-8.411429 23594.496 23594.496 0 0 1-80.018286-139.593143L47.542857 425.325714c-6.838857-13.202286-7.387429-21.138286 4.022857-41.179428 19.858286-34.669714 39.570286-69.302857 59.209143-103.936 5.632-9.984 12.946286-14.262857 24.905143-14.262857 36.827429-0.182857 73.654857-0.182857 110.445714-0.073143 1.901714 0 3.657143-1.024 4.571429-2.669715l119.734857-208.859428a20.845714 20.845714 0 0 1 17.993143-10.496c22.381714-0.036571 44.946286 0 67.547428-0.256l43.410286-0.987429c14.555429-0.109714 30.866286 1.389714 38.4 14.518857z m-146.432 17.188571a2.56 2.56 0 0 0-2.194286 1.28l-122.331428 213.942857a6.692571 6.692571 0 0 1-5.741714 3.364572H138.788571c-2.377143 0-2.962286 1.060571-1.755428 3.145143l247.917714 433.334857c1.060571 1.792 0.548571 2.633143-1.462857 2.669714l-119.222857 0.658286a9.289143 9.289143 0 0 0-8.557714 4.937143l-56.32 98.56c-1.865143 3.328-0.914286 5.046857 2.925714 5.046857l243.858286 0.365714c1.974857 0 3.401143 0.841143 4.425142 2.56l59.867429 104.704c1.974857 3.474286 3.913143 3.510857 5.924571 0l213.577143-373.76 33.426286-58.953143a2.340571 2.340571 0 0 1 4.096 0l60.745143 107.958857a5.193143 5.193143 0 0 0 4.571428 2.633143l117.906286-0.841143a1.718857 1.718857 0 0 0 1.462857-2.56l-123.721143-217.014857a4.608 4.608 0 0 1 0-4.827428l12.507429-21.613715 47.798857-84.370285c1.024-1.755429 0.512-2.633143-1.499428-2.633143H392.521143c-2.486857 0-3.108571-1.097143-1.828572-3.291429l61.184-106.861714a4.571429 4.571429 0 0 0 0-4.864l-58.258285-102.253714a2.56 2.56 0 0 0-2.267429-1.316572z m268.361143 342.198857c1.974857 0 2.486857 0.841143 1.462857 2.56l-35.474286 62.500572-111.542857 195.620571a2.377143 2.377143 0 0 1-2.121143 1.243429 2.486857 2.486857 0 0 1-2.121142-1.243429l-147.346286-257.353143c-0.841143-1.462857-0.402286-2.230857 1.206857-2.304l9.216-0.512 286.793143-0.512h-0.073143z" fill="#7D5DED" p-id="5635"></path></svg>'},{match:/kimi|moonshot/i,name:"Kimi",color:"#00000",svg:'<svg t="1771495664798" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6649" width="200" height="200"><path d="M731.062857 590.262857v318.317714h-148.589714V443.977143a146.285714 146.285714 0 0 1-146.285714 146.285714l-214.491429-0.036571v318.354285H73.142857V165.814857h148.553143v275.858286h180.882286l119.771428-275.858286h167.753143l-67.84 156.269714a255.524571 255.524571 0 0 1-106.678857 119.588572h66.925714a148.553143 148.553143 0 0 1 148.516572 148.589714z m120.758857-473.965714a99.035429 99.035429 0 0 1 0 198.070857h-99.035428V215.332571a99.035429 99.035429 0 0 1 99.035428-99.035428z" fill="#F4F4F4" p-id="6650"></path></svg>'},{match:/glm|chatglm/i,name:"GLM",color:"#00000",svg:'<svg data-name="glm" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 217.2 200"> <!-- Generator: Adobe Illustrator 29.8.2, SVG Export Plug-In . SVG Version: 2.1.1 Build 3) --> <defs> <style> .st0 { fill: #fff; } </style> </defs> <path class="st0" d="M86.8,190.4H0L131.3,4.8h85.8L86.8,190.4h0ZM212.8,190h-107.9l14.9-21.6c2.3-3.3,6-5.2,9.9-5.2h83.1v26.8h0ZM99.4,26.3c-2.3,3.3-6,5.2-9.9,5.2H6.4V4.8h107.9l-14.9,21.6Z"/> </svg>'},{match:/minimax|abab/i,name:"MiniMax",color:"#00000",svg:'<svg viewBox="0 0 24 24" fill="#fff"><path d="M4 8l4-4 4 4 4-4 4 4v8l-4 4-4-4-4 4-4-4z" fill="none" stroke="#fff" stroke-width="1.5" stroke-linejoin="round"/></svg>'},{match:/deepseek/i,name:"DeepSeek",color:"#00000",svg:'<svg t="1771495947541" class="icon" viewBox="0 0 1391 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11539" width="200" height="200"><path d="M1326.70201318 112.02090779c-12.94676356-6.47485468-18.53640721 5.86654827-26.0997327 12.13814316-2.57756953 2.02376031-4.77807747 4.65435413-6.9785854 7.08168819-18.91788751 20.63528526-41.02017805 34.19182812-69.92725218 32.57311444-42.23384508-2.42733405-78.29772513 11.12773591-110.16384908 44.10589703-6.77679853-40.66668282-29.28560862-64.94444203-63.55255448-80.52327231-17.95608583-8.09209545-36.06388005-16.1856638-48.63358202-33.78825438-8.74900746-12.5431898-11.12773591-26.50330641-15.52727888-40.26016327-2.7823022-8.29535522-5.56460442-16.79249731-14.92044538-18.20942411-10.19244639-1.61871367-14.16337637 7.08168818-18.15934561 14.36516325-15.93232553 29.74073376-22.12880269 62.51710799-21.49692994 95.69705596 1.36684831 74.65672404 32.27117059 134.13819156 93.62469006 176.42358804 6.9800583 4.8546681 8.77551959 9.71080912 6.57501165 16.79102439-4.17271686 14.56695011-9.18056624 28.7303265-13.55506995 43.29727663-2.78377509 9.30723537-6.95501906 11.32952278-16.74241882 7.28347507-33.66158524-14.36516325-62.745407-35.60875491-88.46513227-61.30196806-43.62425973-43.09548975-83.0772755-90.64060097-132.26613965-127.86659667a581.67054343 581.67054343 0 0 0-35.07703915-24.48101901c-50.20074429-49.77065841 6.57501167-90.63912807 19.72650789-95.49526908 13.73181759-5.05792788 4.77955037-22.4572587-39.65480265-22.25547181s-85.07599655 15.3770434-136.87041526 35.60875491c-7.58541892 3.03416756-15.55379103 5.25971475-23.69596499 7.08168819-47.03990759-9.10544849-95.84876434-11.12773591-146.8596019-5.26118765-96.02551195 10.92594905-172.73103555 57.25739323-229.12678412 136.36373875-67.72674425 95.09022244-83.68558192 203.13015422-64.13582165 315.82149435 20.48504978 118.76262107 79.88992666 217.09027084 171.13736114 293.97106918 94.6350973 79.71317902 203.61031862 118.76262107 327.93607117 111.27735913 75.51542292-4.45256725 159.57953934-14.77020989 254.41642354-96.71040901 23.92426399 12.13961607 49.03715574 16.99575708 90.66564019 20.63675815 32.09295007 3.03416756 62.97223311-1.61871367 86.87145788-6.67664152 37.45429471-8.09209545 34.84874013-43.49906349 21.31870939-49.97244528-109.7838417-52.19946535-85.68283009-30.95587367-107.58333373-48.15194474 55.78891504-67.37324899 139.85303146-137.3770918 172.73103555-364.17669887 2.60408167-18.00616433 0.40357375-29.33568711 0-43.90263724-0.20325977-8.90218873 1.76894914-12.34287584 11.75960867-13.35328309 27.49014733-3.23742733 54.19671351-10.92594905 78.70277179-24.68280588 71.11440706-39.65480265 99.81822142-104.80250446 106.59649284-182.89844271 1.01188015-11.9363563-0.20178686-24.27775924-12.56970195-30.54935413M706.87018452 814.87993343c-106.36966673-85.37941333-157.98733782-113.5014334-179.30604722-112.28776638-19.92829476 1.21366703-16.33737217 24.48101902-11.96286844 39.65480264 4.5777635 14.97199677 10.57098089 25.2896394 18.94145384 38.44113563 5.76786417 8.70040186 9.76383341 21.64863831-5.78995762 31.35944742-34.26841876 21.64863831-93.82647692-7.28347506-96.60730623-8.69892897-69.3454579-41.67856295-127.33635378-96.710409-168.1797842-171.97249368-39.45154288-72.43117687-62.33888747-150.1220685-66.13306983-233.07267483-1.01188015-20.02992464 4.77955037-27.11161282 24.27923214-30.75408682a235.19659216 235.19659216 0 0 1 77.91771774-2.02228741c108.59668681 16.18713669 201.05631542 65.75453531 278.54394728 144.25552022 44.23256614 44.71125762 77.69089163 98.12439001 112.1861365 150.32385536 36.64567431 55.43394691 76.0986901 108.24024576 126.29943438 151.53604947 17.72778682 15.17378365 31.86465106 26.7065662 45.41972102 35.20370829-40.84343042 4.65435413-108.99878765 5.66476139-155.60860936-31.96628094m51.00936468-334.83953883c0-8.90218873 6.9815312-15.98387693 15.75557791-15.98387693q2.98408908 0.05155138 5.36134463 1.01188017a15.85720779 15.85720779 0 0 1 10.16740714 14.97199676 15.78061715 15.78061715 0 0 1-15.73053865 15.98387691 15.60386953 15.60386953 0 0 1-15.55379103-15.98387691m158.39238446 82.95060635c-10.1423679 4.24930749-20.30830215 7.89178146-30.09570191 8.29535522-15.12370514 0.81009328-31.66286419-5.46150162-40.61513142-13.15002332-13.96011661-11.93782919-23.92573689-18.61447073-28.09845373-39.45301577-1.79546129-8.90218873-0.81009328-22.65904557 0.78505403-30.54935414 3.59092258-16.99575708-0.40504665-27.92023321-12.13961606-37.8343021-9.55910075-8.09356835-21.72522894-10.31911553-35.07703915-10.31911552-4.98281013 0-9.55910075-2.22407429-12.94823645-4.04604774a13.27669246 13.27669246 0 0 1-5.76639128-18.61299783c1.39041466-2.8323807 8.16868608-9.71228202 9.7623605-10.92594905 18.13136058-10.52090241 39.04649623-7.08021529 58.36795748 0.81009328 17.93104659 7.48526194 31.46107731 21.24359167 51.01083757 40.6666828 19.92829476 23.46913885 23.51921733 29.94399353 34.84874013 47.54511123 8.97877936 13.75685685 17.14746545 27.92023321 22.71206987 44.10442409 3.41270206 10.11732865-0.98684091 18.41121097-12.74644958 23.46913885" fill="#4D6BFE" p-id="11540"></path></svg>'}];function EK(e){if(!e)return null;for(const t of xK)if(t.match.test(e))return{name:e.replace(/^claude-/,"").replace(/-\d{8,}$/,""),provider:t.name,color:t.color,svg:t.svg};return{name:e,provider:e,color:"#065f46",svg:Bc("agent")}}function Bc(e){return e==="user"?'<svg viewBox="0 0 24 24"><path d="M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z"/></svg>':e==="agent"?'<svg viewBox="0 0 24 24"><path d="M12 2a2 2 0 012 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 017 7h1a1 1 0 011 1v3a1 1 0 01-1 1h-1.17A7 7 0 0113 22h-2a7 7 0 01-6.83-3H3a1 1 0 01-1-1v-3a1 1 0 011-1h1a7 7 0 017-7h1V5.73c-.6-.34-1-.99-1-1.73a2 2 0 012-2zM9.5 13a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm5 0a1.5 1.5 0 100 3 1.5 1.5 0 000-3z"/></svg>':e==="sub-search"||e==="sub-explore"?'<svg viewBox="0 0 1024 1024"><path d="M128.957606 76.608479v495.401496c0 20.428928-17.875312 38.304239-38.304239 38.304239S52.349127 592.438903 52.349127 572.009975V38.304239c0-20.428928 17.875312-38.304239 38.30424-38.304239h426.453865c20.428928 0 38.304239 17.875312 38.304239 38.304239s-17.875312 38.304239-38.304239 38.30424H128.957606z m127.680798 127.680798v495.401496c0 20.428928-17.875312 38.304239-38.304239 38.304239S180.029925 720.119701 180.029925 699.690773V165.985037c0-20.428928 17.875312-38.304239 38.30424-38.304239h426.453865c20.428928 0 38.304239 17.875312 38.304239 38.304239s-17.875312 38.304239-38.304239 38.30424H256.638404z m579.670823 291.112219v-150.663341H399.640898v515.830424h76.608479c0 38.304239 30.643392 68.947631 43.411471 89.376558h-145.55611c-33.197007 0-61.286783-28.089776-61.286783-63.840399V321.755611c0-35.750623 28.089776-63.840399 61.286783-63.840399h490.294264c33.197007 0 61.286783 28.089776 61.286784 63.840399V564.349127c-20.428928-22.982544-58.733167-56.179551-89.376559-68.947631zM486.46384 411.13217h255.361596c15.321696 0 25.53616 10.214464 25.53616 25.536159s-10.214464 25.53616-25.53616 25.53616H486.46384c-15.321696 0-25.53616-10.214464-25.536159-25.53616s10.214464-25.53616 25.536159-25.536159z m0 102.144638h102.144639c15.321696 0 25.53616 10.214464 25.536159 25.53616s-10.214464 25.53616-25.536159 25.536159h-102.144639c-15.321696 0-25.53616-10.214464-25.536159-25.536159s10.214464-25.53616 25.536159-25.53616z m503.062345 492.84788c-2.553616 2.553616-7.660848 10.214464-12.76808 10.214464-10.214464 10.214464-35.750623 10.214464-45.965088 0l-81.71571-71.501247c-28.089776 17.875312-63.840399 28.089776-99.591023 28.089776-102.144638 0-186.413965-84.269327-186.413965-186.413965s84.269327-186.413965 186.413965-186.413965 186.413965 84.269327 186.413965 186.413965c0 38.304239-10.214464 71.501247-30.643391 99.591022l81.715711 71.501247c12.76808 12.76808 12.76808 35.750623 2.553616 48.518703z m-240.039901-324.309227c-58.733167 0-104.698254 48.518703-104.698254 104.698255 0 58.733167 48.518703 104.698254 104.698254 104.698254s104.698254-48.518703 104.698255-104.698254c2.553616-58.733167-45.965087-104.698254-104.698255-104.698255z" fill="#ffffff"/></svg>':e==="sub-plan"?'<svg viewBox="0 0 1024 1024"><path d="M674.507676 598.338391 287.079856 598.338391c-14.136975 0-25.638937 11.499915-25.638937 25.63689 0 14.137998 11.501962 25.640983 25.638937 25.640983l387.42782 0c14.137998 0 25.640983-11.501962 25.640983-25.640983C700.148659 609.838306 688.646698 598.338391 674.507676 598.338391zM794.746154 384.583029c-14.137998 0-25.640983 11.501962-25.640983 25.63996l0 494.299873c0 0.130983 0 0.280386-0.001023 0.433882-0.899486 0.279363-2.665713 0.644683-5.764284 0.644683L200.047664 905.601426c-4.312212 0-7.564279-2.971681-7.564279-6.913457L192.483384 191.851493c0-4.493338 0.974188-8.28878 1.811252-9.821693l373.337917 0c14.136975 0 25.63996-11.501962 25.63996-25.63996 0-14.136975-11.501962-25.638937-25.63996-25.638937l-374.069581 0c-30.336936 0-52.357462 25.696242-52.357462 61.099566l0 706.836477c0 32.086789 26.396183 58.19133 58.84113 58.19133l563.293223 0c34.119075 0 57.042157-21.041222 57.042157-52.356438L820.382021 410.224012C820.383044 396.086014 808.883129 384.583029 794.746154 384.583029zM674.507676 745.295394 287.079856 745.295394c-14.136975 0-25.638937 11.499915-25.638937 25.63689 0 14.137998 11.501962 25.640983 25.638937 25.640983l387.42782 0c14.137998 0 25.640983-11.501962 25.640983-25.640983C700.148659 756.795309 688.646698 745.295394 674.507676 745.295394zM879.595634 157.107177c-3.77293-14.409175-12.871145-28.250414-24.964578-37.975916l-43.827181-35.240619c-12.880355-10.352789-29.27679-16.290011-44.986587-16.290011-16.876366 0-31.594579 6.747681-41.439808 18.995633l-19.624966 24.381293c-6.380314 7.968485-7.987928 17.577331-5.222955 26.916023l-114.241904 142.063553-2.486634 3.090385-22.812565 85.303828c-9.749038 30.859845 4.449335 48.075949 13.806447 55.608505 6.783497 5.450129 14.468526 8.728802 22.851451 9.754155 0.984421 0.246617 2.125407 0.488117 3.440355 0.632403 1.003863 0.110517 2.053776 0.167822 3.118014 0.167822l0.014326 0c4.588505 0 10.047844-0.9967 17.180288-3.13541l2.877537-1.065262 83.402525-41.897226 119.874181-149.07934c0.440022 0.017396 0.880043 0.032746 1.320065 0.032746 9.218966 0 17.411555-3.862981 23.077601-10.892071l19.562545-24.342408C880.924909 191.1976 884.15037 174.495196 879.595634 157.107177zM674.469813 348.564697l-56.738235 28.537963c-2.958378 0.579191-5.734608 1.684362-8.277524 3.296069-0.313132 0.198521-0.615007 0.385786-0.905626 0.562818 0.12382-0.318248 0.25378-0.639566 0.39295-0.971118 0.99977-2.437515 1.588171-5.022387 1.753947-7.702426l17.732873-66.078974 105.73209-131.488707 48.647977 39.113833L674.469813 348.564697zM831.385633 172.919305l-7.679913 9.550517-68.139913-54.779627 7.687076-9.56382c0.291642-0.132006 1.144056-0.38374 2.604314-0.38374 4.28356 0 9.735735 2.071172 13.570063 5.15644l43.832298 35.245735c3.493567 2.805906 6.421246 7.018857 7.642051 10.993378C831.497173 171.081447 831.492056 172.446537 831.385633 172.919305zM487.474932 291.067168l-200.394053 0c-14.136975 0-25.638937 11.501962-25.638937 25.63996 0 14.136975 11.501962 25.637913 25.638937 25.637913l200.394053 0c14.137998 0 25.63996-11.500938 25.63996-25.637913C513.114892 302.56913 501.611907 291.067168 487.474932 291.067168zM674.507676 438.023148 287.079856 438.023148c-14.136975 0-25.638937 11.500938-25.638937 25.638937s11.501962 25.638937 25.638937 25.638937l387.42782 0c14.137998 0 25.640983-11.501962 25.640983-25.638937S688.646698 438.023148 674.507676 438.023148z" fill="#ffffff"/></svg>':'<svg viewBox="0 0 1024 1024"><path d="M810.666667 384l53.333333-117.333333L981.333333 213.333333l-117.333333-53.333333L810.666667 42.666667l-53.333334 117.333333L640 213.333333l117.333333 53.333334L810.666667 384zM810.666667 640l-53.333334 117.333333L640 810.666667l117.333333 53.333333L810.666667 981.333333l53.333333-117.333333L981.333333 810.666667l-117.333333-53.333334L810.666667 640zM490.666667 405.333333L384 170.666667 277.333333 405.333333 42.666667 512l234.666666 106.666667L384 853.333333l106.666667-234.666666L725.333333 512l-234.666666-106.666667z m-64.426667 148.906667L384 647.253333l-42.24-93.013333L248.746667 512l93.013333-42.24L384 376.746667l42.24 93.013333 93.013333 42.24-93.013333 42.24z" fill="#ffffff"/></svg>'}function Ar(e){return e==null||e===0?"0":e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e)}function $l(e){if(Array.isArray(e))return e.map($l);if(e&&typeof e=="object"){const t={};for(const n of Object.keys(e))n.startsWith("_")||(t[n]=$l(e[n]));return t}return e}function kK(e){var n,r,i;const t={};for(const s of e){const o=(r=(n=s.response)==null?void 0:n.body)==null?void 0:r.usage;if(!o)continue;const l=((i=s.body)==null?void 0:i.model)||"unknown";t[l]||(t[l]={input:0,output:0,cacheCreation:0,cacheRead:0});const c=t[l];c.input+=o.input_tokens||0,c.output+=o.output_tokens||0,c.cacheCreation+=o.cache_creation_input_tokens||0,c.cacheRead+=o.cache_read_input_tokens||0}return t}function $K(e){var n,r,i;const t={ttl:{count:0,cacheCreate:0},system_change:{count:0,cacheCreate:0},tools_change:{count:0,cacheCreate:0},model_change:{count:0,cacheCreate:0},msg_truncated:{count:0,cacheCreate:0},msg_modified:{count:0,cacheCreate:0},key_change:{count:0,cacheCreate:0}};for(let s=0;s<e.length;s++){const o=LR(e,s);if(!o)continue;const l=((i=(r=(n=e[s].response)==null?void 0:n.body)==null?void 0:r.usage)==null?void 0:i.cache_creation_input_tokens)||0,c=o.reasons||[o.reason];for(const u of c)t[u]&&(t[u].count++,t[u].cacheCreate+=l)}return t}function RK(e){var n,r;const t={};for(const i of e){const s=(r=(n=i.response)==null?void 0:n.body)==null?void 0:r.content;if(Array.isArray(s))for(const o of s)o.type==="tool_use"&&o.name&&(t[o.name]=(t[o.name]||0)+1)}return Object.entries(t).sort((i,s)=>s[1]-i[1])}function TK(e){var n;const t={};for(const r of e){const i=(n=r.body)==null?void 0:n.messages;if(Array.isArray(i))for(const s of i){if(s.role!=="user")continue;const o=s.content;if(Array.isArray(o))for(const l of o){if(l.type!=="text"||!v1(l.text))continue;const c=l.text.match(/^#\s+(.+)$/m),u=c?c[1]:"Skill";t[u]=(t[u]||0)+1}}}return Object.entries(t).sort((r,i)=>i[1]-r[1])}function Gp(e){return typeof e!="string"?!1:e.includes("<system-reminder>")&&e.includes("# claudeMd")}function Kp(e){return typeof e!="string"?!1:e.includes("<system-reminder>")&&e.includes("skills are available")}function NK(e){const t=e==null?void 0:e.messages;if(!Array.isArray(t))return!1;for(const n of t){const r=n==null?void 0:n.content;if(typeof r=="string"){if(Gp(r))return!0}else if(Array.isArray(r)){for(const i of r)if(i.type==="text"&&Gp(i.text))return!0}}return!1}function MK(e){const t=e==null?void 0:e.messages;if(!Array.isArray(t))return!1;for(const n of t){const r=n==null?void 0:n.content;if(typeof r=="string"){if(Kp(r))return!0}else if(Array.isArray(r)){for(const i of r)if(i.type==="text"&&Kp(i.text))return!0}}return!1}function OK(e){return e?e.replace(/^claude-/,"").replace(/-\d{8,}$/,""):null}function IK(e){const t=(e==null?void 0:e.url)||"";return!(e.isHeartbeat||e.isCountTokens||/\/api\/eval\/sdk-/.test(t)||/\/messages\/count_tokens/.test(t)||e.inProgress===!0||e.response&&e.response.status===0)}function Zo(e){return e.filter(IK)}function yE(e,t){for(let n=t-1;n>=0;n--)if(bi(e[n])&&e[n].timestamp)return e[n].timestamp;return null}function yy(e){const t=e==null?void 0:e.content;if(typeof t=="string")return t;if(Array.isArray(t)){for(const n of t)if((n==null?void 0:n.type)==="text"&&n.text)return n.text}return""}function PK(e){const t=e.body||{},n=Up(t);if(/Extract any file paths/i.test(n)||/process Bash commands/i.test(n)||/command execution specialist/i.test(n))return"Bash";if(/file search specialist/i.test(n))return"Search";if(/planning specialist/i.test(n))return"Plan";if(/general-purpose agent/i.test(n))return"General";const r=t.messages||[];for(let i=r.length-1;i>=0;i--){if(r[i].role!=="user")continue;const s=yy(r[i]);if(/^Command:/m.test(s))return"Bash";break}return null}function LK(e){var r;const t=(r=e.body)==null?void 0:r.messages;if(!Array.isArray(t)||t.length!==1)return!1;const n=t[0];return n.role==="user"&&n.content==="count"}function AK(e,t){var c;const n=e.body||{},r=n.tools,i=n.messages||[];if(Array.isArray(r)&&r.length>0||i.length!==1||i[0].role!=="user")return!1;const s=yy(i[0]);if(!s||s.trim()==="count")return!1;const o=s.trim();if(/^Command:/m.test(s)||/^<policy_spec>/i.test(o)||/^<task-notification>/i.test(o))return!1;const l=Up(n);if(!l.includes("Claude Code")||/process Bash commands/i.test(l)||/Extract any file paths/i.test(l))return!1;if(t){const u=((c=t.body)==null?void 0:c.messages)||[],h=s.slice(0,80);if(u.some(m=>{const v=m==null?void 0:m.content;return typeof v=="string"?v.includes(h):Array.isArray(v)?v.some(_=>(_==null?void 0:_.type)==="text"&&_.text&&_.text.includes(h)):!1}))return!0}return!1}function zl(e,t){var r;if(bi(e))return{type:"MainAgent",subType:null};if(e.isCountTokens||LK(e))return{type:"Count",subType:null};if(AK(e,t)){const i=yy((((r=e.body)==null?void 0:r.messages)||[])[0]);return/^Implement the following plan:/i.test(i.trim())?{type:"Plan",subType:"Prompt"}:{type:"Preflight",subType:null}}return{type:"SubAgent",subType:PK(e)}}function Xp(e,t){return e==="Plan"&&t?`Plan:${t}`:e==="SubAgent"&&t?`SubAgent:${t}`:e}const BK={"ui.guide.title":{zh:"欢迎使用 CC Viewer",en:"Welcome to CC Viewer","zh-TW":"歡迎使用 CC Viewer",ko:"CC Viewer에 오신 것을 환영합니다",ja:"CC Viewer へようこそ",de:"Willkommen bei CC Viewer",es:"Bienvenido a CC Viewer",fr:"Bienvenue sur CC Viewer",it:"Benvenuto in CC Viewer",da:"Velkommen til CC Viewer",pl:"Witamy w CC Viewer",ru:"Добро пожаловать в CC Viewer",ar:"مرحبًا بك في CC Viewer",no:"Velkommen til CC Viewer","pt-BR":"Bem-vindo ao CC Viewer",th:"ยินดีต้อนรับสู่ CC Viewer",tr:"CC Viewer'a hoş geldiniz",uk:"Ласкаво просимо до CC Viewer"},"ui.guide.step1":{zh:"你可以先尝试在 Claude 中发起一轮对话。不知道说什么?可以问问:",en:"Try starting a conversation in Claude. Not sure what to say? Try asking:","zh-TW":"你可以先嘗試在 Claude 中發起一輪對話。不知道說什麼?可以問問:",ko:"Claude에서 대화를 시작해 보세요. 무슨 말을 해야 할지 모르겠다면:",ja:"まず Claude で会話を始めてみましょう。何を言えばいいかわからない場合:",de:"Starten Sie ein Gespräch in Claude. Nicht sicher, was Sie sagen sollen? Fragen Sie:",es:"Intenta iniciar una conversación en Claude. ¿No sabes qué decir? Prueba preguntar:",fr:"Essayez de lancer une conversation dans Claude. Vous ne savez pas quoi dire ? Demandez :",it:"Prova ad avviare una conversazione in Claude. Non sai cosa dire? Prova a chiedere:",da:"Prøv at starte en samtale i Claude. Ikke sikker på hvad du skal sige? Prøv at spørge:",pl:"Spróbuj rozpocząć rozmowę w Claude. Nie wiesz co powiedzieć? Zapytaj:",ru:"Попробуйте начать разговор в Claude. Не знаете, что сказать? Спросите:",ar:"جرّب بدء محادثة في Claude. لا تعرف ماذا تقول؟ جرّب أن تسأل:",no:"Prøv å starte en samtale i Claude. Usikker på hva du skal si? Prøv å spørre:","pt-BR":"Tente iniciar uma conversa no Claude. Não sabe o que dizer? Pergunte:",th:"ลองเริ่มบทสนทนาใน Claude ไม่รู้จะพูดอะไร? ลองถามว่า:",tr:"Claude'da bir sohbet başlatmayı deneyin. Ne söyleyeceğinizi bilmiyor musunuz? Şunu sorun:",uk:"Спробуйте розпочати розмову в Claude. Не знаєте, що сказати? Запитайте:"},"ui.guide.exampleQuestion":{zh:"看看我现在有多少 skill",en:"How many skills do I have right now?","zh-TW":"看看我現在有多少 skill",ko:"지금 내가 가진 skill이 몇 개인지 확인해줘",ja:"今いくつの skill があるか見てみて",de:"Wie viele Skills habe ich gerade?",es:"¿Cuántos skills tengo ahora mismo?",fr:"Combien de skills ai-je en ce moment ?",it:"Quanti skill ho in questo momento?",da:"Hvor mange skills har jeg lige nu?",pl:"Ile mam teraz skills?",ru:"Сколько у меня сейчас skills?",ar:"كم عدد الـ skills لديّ الآن؟",no:"Hvor mange skills har jeg nå?","pt-BR":"Quantos skills eu tenho agora?",th:"ตอนนี้ฉันมีกี่ skill?",tr:"Şu anda kaç tane skill'im var?",uk:"Скільки у мене зараз skills?"},"ui.guide.step2":{zh:"你能看到这段文字,说明服务已经启动。如果 Claude 有响应但这里没有变化,可以让 Claude 帮你排查:",en:"If you can see this, the service is running. If Claude responds but nothing shows here, ask Claude to help troubleshoot:","zh-TW":"你能看到這段文字,說明服務已經啟動。如果 Claude 有回應但這裡沒有變化,可以讓 Claude 幫你排查:",ko:"이 텍스트가 보이면 서비스가 실행 중입니다. Claude가 응답하지만 여기에 변화가 없다면 Claude에게 문제 해결을 요청하세요:",ja:"このテキストが見えていればサービスは起動しています。Claude が応答しているのにここに変化がない場合、Claude にトラブルシューティングを依頼してください:",de:"Wenn Sie diesen Text sehen, läuft der Dienst. Wenn Claude antwortet, aber hier nichts angezeigt wird, bitten Sie Claude um Hilfe:",es:"Si puedes ver este texto, el servicio está funcionando. Si Claude responde pero aquí no cambia nada, pide a Claude que te ayude:",fr:"Si vous voyez ce texte, le service fonctionne. Si Claude répond mais rien ne s'affiche ici, demandez à Claude de vous aider :",it:"Se puoi vedere questo testo, il servizio è in esecuzione. Se Claude risponde ma qui non cambia nulla, chiedi a Claude di aiutarti:",da:"Hvis du kan se denne tekst, kører tjenesten. Hvis Claude svarer, men intet vises her, bed Claude om hjælp:",pl:"Jeśli widzisz ten tekst, usługa działa. Jeśli Claude odpowiada, ale tutaj nic się nie zmienia, poproś Claude o pomoc:",ru:"Если вы видите этот текст, сервис запущен. Если Claude отвечает, но здесь ничего не меняется, попросите Claude помочь:",ar:"إذا كنت ترى هذا النص، فالخدمة تعمل. إذا كان Claude يستجيب ولكن لا شيء يظهر هنا، اطلب من Claude المساعدة:",no:"Hvis du kan se denne teksten, kjører tjenesten. Hvis Claude svarer men ingenting vises her, be Claude om hjelp:","pt-BR":"Se você pode ver este texto, o serviço está rodando. Se o Claude responde mas nada aparece aqui, peça ao Claude para ajudar:",th:"ถ้าคุณเห็นข้อความนี้ แสดงว่าบริการกำลังทำงาน หาก Claude ตอบกลับแต่ที่นี่ไม่มีการเปลี่ยนแปลง ให้ขอให้ Claude ช่วยแก้ไข:",tr:"Bu metni görebiliyorsanız, hizmet çalışıyor. Claude yanıt veriyor ama burada bir değişiklik olmuyorsa, Claude'dan yardım isteyin:",uk:"Якщо ви бачите цей текст, сервіс працює. Якщо Claude відповідає, але тут нічого не змінюється, попросіть Claude допомогти:"},"ui.guide.troubleshootCmd":{zh:"我已经启动了 cc-viewer,但是无法看到 cc-viewer 的请求,检查 npm 包中 cc-viewer 的实现,检查问题,并修复",en:"I've started cc-viewer but can't see any requests. Check the cc-viewer npm package implementation, find the issue, and fix it","zh-TW":"我已經啟動了 cc-viewer,但是無法看到 cc-viewer 的請求,檢查 npm 包中 cc-viewer 的實現,檢查問題,並修復",ko:"cc-viewer를 시작했지만 요청을 볼 수 없습니다. cc-viewer npm 패키지 구현을 확인하고 문제를 찾아 수정해 주세요",ja:"cc-viewer を起動しましたがリクエストが表示されません。cc-viewer npm パッケージの実装を確認し、問題を見つけて修正してください",de:"Ich habe cc-viewer gestartet, kann aber keine Anfragen sehen. Überprüfen Sie die cc-viewer npm-Paket-Implementierung, finden Sie das Problem und beheben Sie es",es:"He iniciado cc-viewer pero no puedo ver las solicitudes. Revisa la implementación del paquete npm cc-viewer, encuentra el problema y corrígelo",fr:"J'ai démarré cc-viewer mais je ne vois aucune requête. Vérifiez l'implémentation du package npm cc-viewer, trouvez le problème et corrigez-le",it:"Ho avviato cc-viewer ma non riesco a vedere le richieste. Controlla l'implementazione del pacchetto npm cc-viewer, trova il problema e risolvilo",da:"Jeg har startet cc-viewer, men kan ikke se nogen forespørgsler. Tjek cc-viewer npm-pakkens implementering, find problemet og ret det",pl:"Uruchomiłem cc-viewer, ale nie widzę żadnych żądań. Sprawdź implementację pakietu npm cc-viewer, znajdź problem i napraw go",ru:"Я запустил cc-viewer, но не вижу запросов. Проверьте реализацию npm-пакета cc-viewer, найдите проблему и исправьте её",ar:"لقد قمت بتشغيل cc-viewer ولكن لا أستطيع رؤية أي طلبات. تحقق من تنفيذ حزمة npm الخاصة بـ cc-viewer، وابحث عن المشكلة وأصلحها",no:"Jeg har startet cc-viewer, men kan ikke se noen forespørsler. Sjekk cc-viewer npm-pakkens implementering, finn problemet og fiks det","pt-BR":"Iniciei o cc-viewer mas não consigo ver as requisições. Verifique a implementação do pacote npm cc-viewer, encontre o problema e corrija",th:"ฉันเริ่ม cc-viewer แล้วแต่ไม่เห็นคำขอใดๆ ตรวจสอบการใช้งานแพ็กเกจ npm ของ cc-viewer หาปัญหาและแก้ไข",tr:"cc-viewer'ı başlattım ama istekleri göremiyorum. cc-viewer npm paketinin uygulamasını kontrol edin, sorunu bulun ve düzeltin",uk:"Я запустив cc-viewer, але не бачу жодних запитів. Перевірте реалізацію npm-пакету cc-viewer, знайдіть проблему та виправте її"},"ui.guide.step3":{zh:"在极端情况下,native 版本的 Claude 无法拦截。你可以尝试切回 npm 版本:",en:"In extreme cases, the native version of Claude cannot be intercepted. You can try switching back to the npm version:","zh-TW":"在極端情況下,native 版本的 Claude 無法攔截。你可以嘗試切回 npm 版本:",ko:"극단적인 경우 native 버전의 Claude는 가로챌 수 없습니다. npm 버전으로 전환해 보세요:",ja:"極端な場合、ネイティブ版の Claude はインターセプトできません。npm 版に切り替えてみてください:",de:"In extremen Fällen kann die native Version von Claude nicht abgefangen werden. Versuchen Sie, zur npm-Version zu wechseln:",es:"En casos extremos, la versión nativa de Claude no puede ser interceptada. Puedes intentar volver a la versión npm:",fr:"Dans les cas extrêmes, la version native de Claude ne peut pas être interceptée. Essayez de revenir à la version npm :",it:"In casi estremi, la versione nativa di Claude non può essere intercettata. Puoi provare a tornare alla versione npm:",da:"I ekstreme tilfælde kan den native version af Claude ikke opsnappes. Du kan prøve at skifte tilbage til npm-versionen:",pl:"W skrajnych przypadkach natywna wersja Claude nie może być przechwycona. Możesz spróbować przełączyć się na wersję npm:",ru:"В крайних случаях нативная версия Claude не может быть перехвачена. Попробуйте переключиться на npm-версию:",ar:"في الحالات القصوى، لا يمكن اعتراض النسخة الأصلية من Claude. يمكنك محاولة العودة إلى نسخة npm:",no:"I ekstreme tilfeller kan den native versjonen av Claude ikke fanges opp. Du kan prøve å bytte tilbake til npm-versjonen:","pt-BR":"Em casos extremos, a versão nativa do Claude não pode ser interceptada. Você pode tentar voltar para a versão npm:",th:"ในกรณีสุดขีด เวอร์ชัน native ของ Claude ไม่สามารถดักจับได้ คุณสามารถลองเปลี่ยนกลับไปใช้เวอร์ชัน npm:",tr:"Aşırı durumlarda, Claude'un native sürümü yakalanamaz. npm sürümüne geri dönmeyi deneyebilirsiniz:",uk:"У крайніх випадках нативну версію Claude неможливо перехопити. Спробуйте переключитися на npm-версію:"},"cli.alreadyWorking":{zh:"CC Viewer 已经能工作了",en:"CC Viewer is already working","zh-TW":"CC Viewer 已經能工作了",ko:"CC Viewer가 이미 작동 중입니다",ja:"CC Viewer は既に動作しています",de:"CC Viewer funktioniert bereits",es:"CC Viewer ya está funcionando",fr:"CC Viewer fonctionne déjà",it:"CC Viewer è già funzionante",da:"CC Viewer fungerer allerede",pl:"CC Viewer już działa",ru:"CC Viewer уже работает",ar:"CC Viewer يعمل بالفعل",no:"CC Viewer fungerer allerede","pt-BR":"CC Viewer já está funcionando",th:"CC Viewer ทำงานอยู่แล้ว",tr:"CC Viewer zaten çalışıyor",uk:"CC Viewer вже працює"},"cli.inject.success":{zh:"CC Viewer 安装成功",en:"CC Viewer installed successfully","zh-TW":"CC Viewer 安裝成功",ko:"CC Viewer 설치 성공",ja:"CC Viewer インストール成功",de:"CC Viewer erfolgreich installiert",es:"CC Viewer instalado correctamente",fr:"CC Viewer installé avec succès",it:"CC Viewer installato con successo",da:"CC Viewer installeret",pl:"CC Viewer zainstalowany pomyślnie",ru:"CC Viewer успешно установлен",ar:"تم تثبيت CC Viewer بنجاح",no:"CC Viewer installert","pt-BR":"CC Viewer instalado com sucesso",th:"ติดตั้ง CC Viewer สำเร็จ",tr:"CC Viewer başarıyla kuruldu",uk:"CC Viewer успішно встановлено"},"cli.inject.exists":{zh:"CC Viewer 已安装,无需重复操作",en:"CC Viewer already installed, no action needed","zh-TW":"CC Viewer 已安裝,無需重複操作",ko:"CC Viewer 이미 설치됨, 추가 작업 불필요",ja:"CC Viewer は既にインストール済み、操作不要",de:"CC Viewer bereits installiert, keine Aktion nötig",es:"CC Viewer ya instalado, no se requiere acción",fr:"CC Viewer déjà installé, aucune action nécessaire",it:"CC Viewer già installato, nessuna azione necessaria",da:"CC Viewer allerede installeret, ingen handling nødvendig",pl:"CC Viewer już zainstalowany, nie wymaga działania",ru:"CC Viewer уже установлен, действий не требуется",ar:"CC Viewer مثبت بالفعل، لا حاجة لأي إجراء",no:"CC Viewer allerede installert, ingen handling nødvendig","pt-BR":"CC Viewer já instalado, nenhuma ação necessária",th:"CC Viewer ติดตั้งแล้ว ไม่ต้องดำเนินการ",tr:"CC Viewer zaten kurulu, işlem gerekmiyor",uk:"CC Viewer вже встановлено, дій не потрібно"},"cli.inject.fail":{zh:"❌ 安装失败: {error}",en:"❌ Installation failed: {error}","zh-TW":"❌ 安裝失敗: {error}",ko:"❌ 설치 실패: {error}",ja:"❌ インストール失敗: {error}",de:"❌ Installation fehlgeschlagen: {error}",es:"❌ Instalación fallida: {error}",fr:"❌ Échec de l'installation : {error}",it:"❌ Installazione fallita: {error}",da:"❌ Installation mislykkedes: {error}",pl:"❌ Instalacja nie powiodła się: {error}",ru:"❌ Ошибка установки: {error}",ar:"❌ فشل التثبيت: {error}",no:"❌ Installasjon mislyktes: {error}","pt-BR":"❌ Falha na instalação: {error}",th:"❌ ติดตั้งล้มเหลว: {error}",tr:"❌ Kurulum başarısız: {error}",uk:"❌ Помилка встановлення: {error}"},"cli.inject.notFound":{zh:"❌ 找不到 Claude Code cli.js: {path}",en:"❌ Claude Code cli.js not found: {path}","zh-TW":"❌ 找不到 Claude Code cli.js: {path}",ko:"❌ Claude Code cli.js를 찾을 수 없음: {path}",ja:"❌ Claude Code cli.js が見つかりません: {path}",de:"❌ Claude Code cli.js nicht gefunden: {path}",es:"❌ Claude Code cli.js no encontrado: {path}",fr:"❌ Claude Code cli.js introuvable : {path}",it:"❌ Claude Code cli.js non trovato: {path}",da:"❌ Claude Code cli.js ikke fundet: {path}",pl:"❌ Nie znaleziono Claude Code cli.js: {path}",ru:"❌ Claude Code cli.js не найден: {path}",ar:"❌ لم يتم العثور على Claude Code cli.js: {path}",no:"❌ Claude Code cli.js ikke funnet: {path}","pt-BR":"❌ Claude Code cli.js não encontrado: {path}",th:"❌ ไม่พบ Claude Code cli.js: {path}",tr:"❌ Claude Code cli.js bulunamadı: {path}",uk:"❌ Claude Code cli.js не знайдено: {path}"},"cli.inject.notFoundHint":{zh:" 请确认 @anthropic-ai/claude-code 已安装",en:" Please make sure @anthropic-ai/claude-code is installed","zh-TW":" 請確認 @anthropic-ai/claude-code 已安裝",ko:" @anthropic-ai/claude-code가 설치되어 있는지 확인하세요",ja:" @anthropic-ai/claude-code がインストールされていることを確認してください",de:" Bitte stellen Sie sicher, dass @anthropic-ai/claude-code installiert ist",es:" Asegúrese de que @anthropic-ai/claude-code esté instalado",fr:" Veuillez vérifier que @anthropic-ai/claude-code est installé",it:" Assicurati che @anthropic-ai/claude-code sia installato",da:" Sørg for at @anthropic-ai/claude-code er installeret",pl:" Upewnij się, że @anthropic-ai/claude-code jest zainstalowany",ru:" Убедитесь, что @anthropic-ai/claude-code установлен",ar:" يرجى التأكد من تثبيت @anthropic-ai/claude-code",no:" Sørg for at @anthropic-ai/claude-code er installert","pt-BR":" Certifique-se de que @anthropic-ai/claude-code está instalado",th:" กรุณาตรวจสอบว่า @anthropic-ai/claude-code ถูกติดตั้งแล้ว",tr:" @anthropic-ai/claude-code'un kurulu olduğundan emin olun",uk:" Переконайтеся, що @anthropic-ai/claude-code встановлено"},"cli.hook.exists":{zh:"自动修复 hook 已存在于 {path}",en:"Auto-repair hook already exists in {path}","zh-TW":"自動修復 hook 已存在於 {path}",ko:"자동 복구 hook이 이미 {path}에 존재함",ja:"自動修復 hook は既に {path} に存在します",de:"Auto-Reparatur-Hook existiert bereits in {path}",es:"Hook de auto-reparación ya existe en {path}",fr:"Hook de réparation auto déjà présent dans {path}",it:"Hook di auto-riparazione già presente in {path}",da:"Auto-reparations-hook findes allerede i {path}",pl:"Hook auto-naprawy już istnieje w {path}",ru:"Hook автовосстановления уже существует в {path}",ar:"hook الإصلاح التلقائي موجود بالفعل في {path}",no:"Auto-reparasjons-hook finnes allerede i {path}","pt-BR":"Hook de auto-reparo já existe em {path}",th:"hook ซ่อมอัตโนมัติมีอยู่แล้วใน {path}",tr:"Otomatik onarım hook'u zaten {path} dosyasında mevcut",uk:"Hook автовідновлення вже існує в {path}"},"cli.hook.fail":{zh:"⚠️ shell hook 写入失败: {error}",en:"⚠️ Failed to write shell hook: {error}","zh-TW":"⚠️ shell hook 寫入失敗: {error}",ko:"⚠️ shell hook 작성 실패: {error}",ja:"⚠️ shell hook の書き込みに失敗: {error}",de:"⚠️ Shell-Hook konnte nicht geschrieben werden: {error}",es:"⚠️ Error al escribir el shell hook: {error}",fr:"⚠️ Échec de l'écriture du shell hook : {error}",it:"⚠️ Impossibile scrivere il shell hook: {error}",da:"⚠️ Kunne ikke skrive shell hook: {error}",pl:"⚠️ Nie udało się zapisać shell hook: {error}",ru:"⚠️ Не удалось записать shell hook: {error}",ar:"⚠️ فشل كتابة shell hook: {error}",no:"⚠️ Kunne ikke skrive shell hook: {error}","pt-BR":"⚠️ Falha ao escrever shell hook: {error}",th:"⚠️ เขียน shell hook ล้มเหลว: {error}",tr:"⚠️ Shell hook yazılamadı: {error}",uk:"⚠️ Не вдалося записати shell hook: {error}"},"cli.usage.hint":{zh:`
359
359
  如需卸载,请运行: ccv --uninstall`,en:`
360
360
  To uninstall, run: ccv --uninstall`,"zh-TW":`
361
361
  如需卸載,請執行: ccv --uninstall`,ko:`
package/dist/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <title>Claude Code Viewer</title>
7
7
  <link rel="icon" href="/favicon.ico?v=1">
8
8
  <link rel="shortcut icon" href="/favicon.ico?v=1">
9
- <script type="module" crossorigin src="/assets/index-DdzkBF7P.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-LxuWMLD-.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-k2L1uWUr.css">
11
11
  </head>
12
12
  <body>
package/interceptor.js CHANGED
@@ -602,7 +602,14 @@ export function setupInterceptor() {
602
602
  }
603
603
  }
604
604
 
605
- // 在发起请求前先写入一条无 response 的条目,让前端可以检测在途请求
605
+ // 生成唯一请求 ID,用于关联在途请求和完成请求
606
+ const requestId = `${Date.now()}_${Math.random().toString(36).substring(2, 11)}`;
607
+ if (requestEntry) {
608
+ requestEntry.requestId = requestId;
609
+ requestEntry.inProgress = true; // 标记为在途请求
610
+ }
611
+
612
+ // 在发起请求前先写入一条未完成的条目,让前端可以检测在途请求
606
613
  if (requestEntry) {
607
614
  try {
608
615
  appendFileSync(LOG_FILE, JSON.stringify(requestEntry, null, 2) + '\n---\n');
@@ -667,9 +674,14 @@ export function setupInterceptor() {
667
674
  // 直接使用组装后的 message 对象作为 response.body
668
675
  // 如果组装失败(例如非标准 SSE),则使用原始流内容
669
676
  requestEntry.response.body = assembledMessage || streamedContent;
677
+ // 移除在途请求标记,保持原始报文
678
+ delete requestEntry.inProgress;
679
+ delete requestEntry.requestId;
670
680
  appendFileSync(LOG_FILE, JSON.stringify(requestEntry, null, 2) + '\n---\n');
671
681
  } catch (err) {
672
682
  requestEntry.response.body = streamedContent.slice(0, 1000);
683
+ delete requestEntry.inProgress;
684
+ delete requestEntry.requestId;
673
685
  appendFileSync(LOG_FILE, JSON.stringify(requestEntry, null, 2) + '\n---\n');
674
686
  }
675
687
  controller.close();
@@ -698,6 +710,8 @@ export function setupInterceptor() {
698
710
  headers: Object.fromEntries(response.headers.entries()),
699
711
  body: '[Streaming Response - Capture failed]'
700
712
  };
713
+ delete requestEntry.inProgress;
714
+ delete requestEntry.requestId;
701
715
  appendFileSync(LOG_FILE, JSON.stringify(requestEntry, null, 2) + '\n---\n');
702
716
  }
703
717
  } else {
@@ -719,9 +733,13 @@ export function setupInterceptor() {
719
733
  headers: Object.fromEntries(response.headers.entries()),
720
734
  body: responseData
721
735
  };
736
+ delete requestEntry.inProgress;
737
+ delete requestEntry.requestId;
722
738
 
723
739
  appendFileSync(LOG_FILE, JSON.stringify(requestEntry, null, 2) + '\n---\n');
724
740
  } catch (err) {
741
+ delete requestEntry.inProgress;
742
+ delete requestEntry.requestId;
725
743
  appendFileSync(LOG_FILE, JSON.stringify(requestEntry, null, 2) + '\n---\n');
726
744
  }
727
745
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-viewer",
3
- "version": "1.4.17",
3
+ "version": "1.4.19",
4
4
  "description": "Claude Code Logger visualization management tool",
5
5
  "license": "MIT",
6
6
  "main": "server.js",
@@ -55,6 +55,7 @@
55
55
  "plugin-loader.js",
56
56
  "pty-manager.js",
57
57
  "locales/",
58
+ "workspace-registry.js",
58
59
  "concepts/"
59
60
  ],
60
61
  "devDependencies": {
@@ -0,0 +1,82 @@
1
+ // Workspace Registry - 工作区持久化管理
2
+ import { readFileSync, writeFileSync, existsSync, mkdirSync, statSync, readdirSync } from 'node:fs';
3
+ import { join, basename, resolve } from 'node:path';
4
+ import { randomBytes } from 'node:crypto';
5
+ import { LOG_DIR } from './findcc.js';
6
+
7
+ const WORKSPACES_FILE = join(LOG_DIR, 'workspaces.json');
8
+
9
+ export function loadWorkspaces() {
10
+ try {
11
+ if (!existsSync(WORKSPACES_FILE)) return [];
12
+ const data = JSON.parse(readFileSync(WORKSPACES_FILE, 'utf-8'));
13
+ return Array.isArray(data.workspaces) ? data.workspaces : [];
14
+ } catch {
15
+ return [];
16
+ }
17
+ }
18
+
19
+ export function saveWorkspaces(list) {
20
+ try {
21
+ mkdirSync(LOG_DIR, { recursive: true });
22
+ writeFileSync(WORKSPACES_FILE, JSON.stringify({ workspaces: list }, null, 2));
23
+ } catch (err) {
24
+ console.error('[CC Viewer] Failed to save workspaces:', err.message);
25
+ }
26
+ }
27
+
28
+ export function registerWorkspace(absolutePath) {
29
+ const resolvedPath = resolve(absolutePath);
30
+ const projectName = basename(resolvedPath).replace(/[^a-zA-Z0-9_\-\.]/g, '_');
31
+ const list = loadWorkspaces();
32
+ const existing = list.find(w => w.path === resolvedPath);
33
+ if (existing) {
34
+ existing.lastUsed = new Date().toISOString();
35
+ existing.projectName = projectName;
36
+ saveWorkspaces(list);
37
+ return existing;
38
+ }
39
+ const entry = {
40
+ id: randomBytes(6).toString('hex'),
41
+ path: resolvedPath,
42
+ projectName,
43
+ lastUsed: new Date().toISOString(),
44
+ createdAt: new Date().toISOString(),
45
+ };
46
+ list.push(entry);
47
+ saveWorkspaces(list);
48
+ return entry;
49
+ }
50
+
51
+ export function removeWorkspace(id) {
52
+ const list = loadWorkspaces();
53
+ const filtered = list.filter(w => w.id !== id);
54
+ if (filtered.length !== list.length) {
55
+ saveWorkspaces(filtered);
56
+ return true;
57
+ }
58
+ return false;
59
+ }
60
+
61
+ export function getWorkspaces() {
62
+ const list = loadWorkspaces();
63
+ return list
64
+ .map(w => {
65
+ let logCount = 0;
66
+ let totalSize = 0;
67
+ const logDir = join(LOG_DIR, w.projectName);
68
+ try {
69
+ if (existsSync(logDir)) {
70
+ const files = readdirSync(logDir);
71
+ for (const f of files) {
72
+ if (f.endsWith('.jsonl')) {
73
+ logCount++;
74
+ try { totalSize += statSync(join(logDir, f)).size; } catch {}
75
+ }
76
+ }
77
+ }
78
+ } catch {}
79
+ return { ...w, logCount, totalSize };
80
+ })
81
+ .sort((a, b) => new Date(b.lastUsed) - new Date(a.lastUsed));
82
+ }