@@ -24,11 +24,23 @@ if (typeof inqPrompt !== 'function') {
2424}
2525
2626const MODELS = [
27- { id : 'gemini-2.5-flash-lite' , name : 'Flash-Lite 2.5 (New & Lightest)' } ,
28- { id : 'gemini-2.5-flash' , name : 'Flash 2.5 (Fast & Balanced)' } ,
29- { id : 'gemini-3-flash-preview' , name : 'Flash 3 (Newest)' } ,
27+ // Gemini 3.5 Series (Latest Frontier Models)
28+ { id : 'gemini-3.5-flash' , name : 'Gemini 3.5 Flash (Agentic & High-Speed)' } ,
29+
30+ // Gemini 3.1 Series (Advanced Core Performance)
31+ { id : 'gemini-3.1-pro-preview' , name : 'Gemini 3.1 Pro (Flagship Reasoning - Paid)' } ,
32+ { id : 'gemini-3.1-flash-lite' , name : 'Gemini 3.1 Flash-Lite (High-Volume Automation)' } ,
33+
34+ // Gemini 3 Series (Stable Infrastructure)
35+ { id : 'gemini-3-flash' , name : 'Gemini 3 Flash (Fast Modulated Reasoning)' } ,
36+ { id : 'gemini-3-pro' , name : 'Gemini 3 Pro (Paid Complex Reasoning)' } ,
37+
38+ // Gemini 2.5 Series (Stable Long-Context)
39+ { id : 'gemini-2.5-pro' , name : 'Gemini 2.5 Pro (Paid Deep Reasoning)' } ,
40+ { id : 'gemini-2.5-flash' , name : 'Gemini 2.5 Flash (Balanced Price-Performance)' } ,
41+ { id : 'gemini-2.5-flash-lite' , name : 'Gemini 2.5 Flash-Lite (Low Latency)' } ,
3042] ;
31- const DEFAULT_MODEL = 'gemini-2 .5-flash' ;
43+ const DEFAULT_MODEL = 'gemini-3 .5-flash' ;
3244
3345function getModelId ( ) {
3446 return config . get ( 'model_id' ) ?? DEFAULT_MODEL ;
@@ -279,7 +291,7 @@ function getAI() {
279291 const apiKey = config . get ( 'gemini_key' ) ;
280292 if ( ! apiKey ) {
281293 console . log ( chalk . red ( "❌ No API Key found! Run 'git-mood setup' first." ) ) ;
282- process . exit ( 1 ) ;
294+ cleanupAndExit ( 1 ) ;
283295 }
284296 const genAI = new GoogleGenerativeAI ( apiKey ) ;
285297 const modelId = getModelId ( ) ;
@@ -525,7 +537,7 @@ async function modelCLI() {
525537program
526538 . name ( 'git-mood' )
527539 . description ( 'AI-Powered Git Assistant — conventional commits & code review' )
528- . version ( '2.0.9 ' ) ;
540+ . version ( '2.1.0 ' ) ;
529541
530542program . command ( 'setup' ) . description ( 'Set Gemini API key and model' ) . action ( setupCLI ) ;
531543program . command ( 'model' ) . description ( 'Change Gemini model' ) . action ( modelCLI ) ;
@@ -555,14 +567,14 @@ function cleanupAndExit(code) {
555567 // ignore
556568 }
557569 }
558- process . stdin . pause ( ) ;
559- if ( typeof process . stdin . unref === 'function' ) {
560- process . stdin . unref ( ) ;
561- }
562570 } catch {
563571 // ignore
564572 }
565- process . exit ( code ) ;
573+ // Delay the exit slightly to allow libuv handles/threads (e.g., keep-alive fetch connections)
574+ // to clean up and close gracefully, preventing Windows assertion crashes.
575+ setTimeout ( ( ) => {
576+ process . exit ( code ) ;
577+ } , 100 ) ;
566578}
567579
568580await program
0 commit comments