import{ne as V,pe as B}from"./cli-0.5.4-0b2pyfqd.mjs";import{AN as F,BK as w,Ow as Q,Pw as q,oi as L,zK as U}from"./cli-0.5.4-k5fz4zd3.mjs";import{V8 as K,_8 as k}from"./cli-0.5.4-cbq01zg3.mjs";import{Pfa as I,Sfa as $}from"./cli-0.5.4-end8wj9r.mjs";import{Gga as G,Nga as _}from"./cli-0.5.4-sgcaw17t.mjs";import{Zma as Z}from"./cli-0.5.4-aacw1src.mjs";async function h(W,X){let E=V(W);if(!E)return null;try{let A=await U({systemPrompt:Q(['Generate a short kebab-case name (2-4 words) that captures the main topic of this conversation. Use lowercase words separated by hyphens. Examples: "fix-login-bug", "add-auth-feature", "refactor-api-client", "debug-test-failures". Return JSON with a "name" field.']),userPrompt:E,outputFormat:{type:"json_schema",schema:{type:"object",properties:{name:{type:"string"}},required:["name"],additionalProperties:!1}},signal:X,options:{querySource:"rename_generate_name",agents:[],isNonInteractiveSession:!1,hasAppendSystemPrompt:!1,mcpTools:[]}}),Y=L(A.message.content),z=K(Y);if(z&&typeof z==="object"&&"name"in z&&typeof z.name==="string")return z.name;return null}catch(A){return I(`generateSessionName failed: ${G(A)}`,{level:"error"}),null}}var D=Z(()=>{w();$();_();k();F();B();q()});
export{h as le,D as me};
