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

Function _wY

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

Source from the content-addressed store, hash-verified

5351)"
5352\`\`\`
5353
5354You have the capability to call multiple tools in a single response. Stage and create the commit using a single message. Do not use any other tools or do anything else. Do not send any other text or messages besides these tool calls.`}var bTK,sOY,xTK;var ITK=y(()=>{sm8();uL6();jH6();bTK=["Bash(git add:*)","Bash(git status:*)","Bash(git commit:*)"];sOY={type:"prompt",name:"commit",description:"Create a git commit",allowedTools:bTK,contentLength:0,progressMessage:"creating commit",source:"builtin",async getPromptForCommand(q,K){let _=aOY();return[{type:"text",text:await pQ(_,{...K,getAppState(){let Y=K.getAppState();return{...Y,toolPermissionContext:{...Y.toolPermissionContext,alwaysAllowRules:{...Y.toolPermissionContext.alwaysAllowRules,command:bTK}}}}},"/commit")}]}},xTK=sOY});var UTK={};T8(UTK,{fileExtension:()=>gTK,collectRecentAssistantTexts:()=>BTK,call:()=>OwY});import{mkdir as tOY,writeFile as eOY}from"fs/promises";import{tmpdir as qwY}from"os";import{join as mTK}from"path";function _wY(q){let K=oz.lexer(sq6(q)),_=[];for(let z of K)if(z.type==="code"){let Y=z;_.push({code:Y.text,lang:Y.lang})}return _}function BTK(q){let K=[];for(let _=q.length-1;_>=0&&K.length<KwY;_--){let z=q[_];if(z?.type!=="assistant"||z.isApiErrorMessage)continue;let Y=z.message.content;if(!Array.isArray(Y))continue;let $=L3(Y,`
5355
5356`);if($)K.push($)}return K}function gTK(q){if(q){let K=q.replace(/[^a-zA-Z0-9]/g,"");if(K&&K!=="plaintext")return`.${K}`}return".txt"}async function FTK(q,K){let _=mTK(uTK,K);return await tOY(uTK,{recursive:!0}),await eOY(_,q,"utf-8"),_}async function mq7(q,K){let _=await XX(q);if(_)process.stdout.write(_);let z=G$(q,`

Callers 1

OwYFunction · 0.85

Calls 3

sq6Function · 0.85
lexerMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected