import{ne as V,pe as B}from"./cli-0.5.3-jk6g9xwb.mjs";import{Mw as Q,Nw as q,ni as L,xK as U,yN as F,zK as w}from"./cli-0.5.3-jbzr8k4s.mjs";import{T8 as K,Y8 as k}from"./cli-0.5.3-t65dek0m.mjs";import{Nfa as I,Qfa as $}from"./cli-0.5.3-n3cxyxpg.mjs";import{Ega as G,Lga as _}from"./cli-0.5.3-c8bcrqa4.mjs";import{Xma as Z}from"./cli-0.5.3-0df3r78b.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};
