MCPcopy Index your code
hub / github.com/ChinaSiro/claude-code-sourcemap / Swz

Function Swz

package/cli.js:1793–1793  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1791
1792${P}
1793
1794Once they complete the flow, the server's tools will become available automatically.`}};return{data:{status:"auth_url",message:`Authentication completed silently for ${q}. The server's tools should now be available.`}}}catch(P){return{data:{status:"error",message:`Failed to start OAuth flow for ${q}: ${d6(P)}. Ask the user to run /mcp and authenticate manually.`}}}},mapToolResultToToolResultBlockParam(A,O){return{tool_use_id:O,type:"tool_result",content:A.message}}}}var Nwz;var QR4=y(()=>{By8();x7();or();PD();ok();y8();E8();Nwz=B6(()=>L.object({}))});import{mkdir as Ewz,writeFile as Lwz}from"fs/promises";import{join as gB1}from"path";function cR4(q,K){if(!Number.isFinite(K))return K;let z=g8(hwz,{})?.[q];if(typeof z==="number"&&Number.isFinite(z)&&z>0)return z;return Math.min(K,XN4)}function Swz(){return gB1(_2(r1()),N8())}function Bq6(){return gB1(Swz(),FB1)}function Ma6(q,K){let _=K?"json":"txt";return gB1(Bq6(),`${q}.${_}`)}async function Cw6(){try{await Ewz(Bq6(),{recursive:!0})}catch{}}async function XE8(q,K){let _=Array.isArray(q);if(_){if(q.some((w)=>w.type!=="text"))return{error:"Cannot persist tool results containing non-text content"}}await Cw6();let z=Ma6(K,_),Y=_?g6(q,null,2):q;try{await Lwz(z,Y,{encoding:"utf-8",flag:"wx"}),N(`Persisted tool result to ${z} (${m4(Y.length)})`)}catch(O){if(s1(O)!=="EEXIST")return H6(x1(O)),{error:Uwz(x1(O))}}let{preview:$,hasMore:A}=Xa6(Y,WN6);return{filepath:z,originalSize:Y.length,isJson:_,preview:$,hasMore:A}}function DN6(q){let K=`${dR4}
1795`;return K+=`Output too large (${m4(q.originalSize)}). Full output saved to: ${q.filepath}
1796

Callers 1

Bq6Function · 0.85

Calls 2

r1Function · 0.85
N8Function · 0.85

Tested by

no test coverage detected