MCPcopy Create free account
hub / github.com/ChinaSiro/claude-code-sourcemap / rGY

Function rGY

package/cli.js:6295–6298  ·  view source on GitHub ↗
(q,K,_,z,Y)

Source from the content-addressed store, hash-verified

6293- Potential risks and mitigations
6294</system-reminder>
6295`});function cGY(){return g8("tengu_ultraplan_model",n66.opus46.firstParty)}function iGY(q,K){let _=[];if(K)_.push("Here is a draft plan to refine:","",K,"");if(_.push(nGY),q)_.push("",q);return _.join(`
6296`)}function rGY(q,K,_,z,Y){let $=Date.now(),A=!1;(async()=>{try{let{plan:O,rejectCount:w,executionTarget:j}=await sSK(K,dGY,(H)=>{if(H==="needs_input")d("tengu_ultraplan_awaiting_input",{});A3(q,Y,(J)=>{if(J.status!=="running")return J;let M=H==="running"?void 0:H;return J.ultraplanPhase===M?J:{...J,ultraplanPhase:M}})},()=>z().tasks?.[q]?.status!=="running");if(d("tengu_ultraplan_approved",{duration_ms:Date.now()-$,plan_length:O.length,reject_count:w,execution_target:j}),j==="remote"){if(z().tasks?.[q]?.status!=="running")return;A3(q,Y,(J)=>J.status!=="running"?J:{...J,status:"completed",endTime:Date.now()}),Y((J)=>J.ultraplanSessionUrl===_?{...J,ultraplanSessionUrl:void 0}:J),IO({value:[`Ultraplan approved — executing in Claude Code on the web. Follow along at: ${_}`,"","Results will land as a pull request when the remote session finishes. There is nothing to do here."].join(`
6297`),mode:"task-notification"})}else Y((H)=>{let J=H.tasks?.[q];if(!J||J.status!=="running")return H;return{...H,ultraplanPendingChoice:{plan:O,sessionId:K,taskId:q}}})}catch(O){if(z().tasks?.[q]?.status!=="running")return;A=!0,d("tengu_ultraplan_failed",{duration_ms:Date.now()-$,reason:O instanceof Ms?O.reason:"network_or_unknown",reject_count:O instanceof Ms?O.rejectCount:void 0}),IO({value:`Ultraplan failed: ${d6(O)}
6298
6299Session: ${_}`,mode:"task-notification"}),$L6(K).catch((j)=>N(`ultraplan archive failed: ${String(j)}`)),Y((j)=>j.ultraplanSessionUrl===_?{...j,ultraplanSessionUrl:void 0}:j)}finally{if(A)A3(q,Y,(O)=>O.status!=="running"?O:{...O,status:"failed",endTime:Date.now()})}})()}function oGY(q){let K=q?`${Hq8} `:"";return`${NW} ultraplan
6300${K}Starting Claude Code on the web…`}function aGY(q){return`${NW} ultraplan · Monitor progress in Claude Code on the web ${q}
6301You can continue working — when the ${NW} fills, press ↓ to view results`}function _CK(q){return q?`ultraplan: already polling. Open ${q} to check status, or wait for the plan to land here.`:"ultraplan: already launching. Please wait for the session to start."}async function d57(q,K,_){await AL6.kill(q,_),_((Y)=>Y.ultraplanSessionUrl||Y.ultraplanPendingChoice||Y.ultraplanLaunching?{...Y,ultraplanSessionUrl:void 0,ultraplanPendingChoice:void 0,ultraplanLaunching:void 0}:Y);let z=MM(K,process.env.SESSION_INGRESS_URL);IO({value:`Ultraplan stopped.

Callers 1

sGYFunction · 0.85

Calls 12

sSKFunction · 0.85
dFunction · 0.85
A3Function · 0.85
IOFunction · 0.85
d6Function · 0.85
$L6Function · 0.85
NFunction · 0.85
nowMethod · 0.80
zFunction · 0.70
YFunction · 0.70
joinMethod · 0.45
catchMethod · 0.45

Tested by

no test coverage detected