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

Function cfY

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

Source from the content-addressed store, hash-verified

6166`);return`${z}
6167${Y}`}).join(`
6168
6169`)}async function cfY(){let q=[];try{let _=new Promise((z,Y)=>{setTimeout(($)=>$(Error("Timeout")),500,Y)});await Promise.race([oK7(),_]),q=aK7(await hF8())}catch{}if(q.length>0)return{type:"text",value:wRK(q)};let K=aK7(await hF8());if(K.length>0)return{type:"text",value:wRK(K)};return{type:"text",value:`See the full changelog at: ${zRK}`}}var HRK=y(()=>{XS6()});var lfY,sK7;var JRK=y(()=>{lfY={description:"View release notes",name:"release-notes",type:"local",supportsNonInteractive:!0,load:()=>Promise.resolve().then(() => (HRK(),jRK))},sK7=lfY});function bF8(q){let K=[];for(let z of q){if(z.type!=="user"&&z.type!=="assistant")continue;if("isMeta"in z&&z.isMeta)continue;if("origin"in z&&z.origin&&z.origin.kind!=="human")continue;let Y=z.message.content;if(typeof Y==="string")K.push(Y);else if(Array.isArray(Y)){for(let $ of Y)if("type"in $&&$.type==="text"&&"text"in $)K.push($.text)}}let _=K.join(`
6170`);return _.length>MRK?_.slice(-MRK):_}async function h56(q,K){let _=q.trim();if(!_)return null;try{let z=await RG({systemPrompt:iK([nfY]),userPrompt:_,outputFormat:{type:"json_schema",schema:{type:"object",properties:{title:{type:"string"}},required:["title"],additionalProperties:!1}},signal:K,options:{querySource:"generate_session_title",agents:[],isNonInteractiveSession:i7(),hasAppendSystemPrompt:!1,mcpTools:[]}}),Y=L3(z.message.content),$=ifY().safeParse(m5(Y)),A=$.success?$.data.title.trim()||null:null;return d("tengu_session_title_generated",{success:A!==null}),A}catch(z){return N(`generateSessionTitle failed: ${z}`,{level:"error"}),d("tengu_session_title_generated",{success:!1}),null}}var MRK=1000,nfY=`Generate a concise, sentence-case title (3-7 words) that captures the main topic or goal of this coding session. The title should be clear enough that the user recognizes the session in a list. Use sentence case: capitalize only the first word and proper nouns.
6171

Callers

nothing calls this directly

Calls 6

setTimeoutFunction · 0.85
oK7Function · 0.85
aK7Function · 0.85
hF8Function · 0.85
wRKFunction · 0.85
$Function · 0.70

Tested by

no test coverage detected