import{xe as V,ze as B}from"./cli-0.5.12-senanaj4.mjs";import{Ci as L,NK as U,PK as w,Pw as Q,Qw as q,SN as F}from"./cli-0.5.12-zc0qwdy2.mjs";import{U8 as K,Z8 as k}from"./cli-0.5.12-g4wb8mj2.mjs";import{fga as I,iga as $}from"./cli-0.5.12-p5ps8gf0.mjs";import{Gga as _,zga as G}from"./cli-0.5.12-tfdwzg37.mjs";import{aoa as Z}from"./cli-0.5.12-xzeb7mtb.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 ve,D as we};
