File tree 2 files changed +10
-5
lines changed
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 270
270
"command" : " tabby.chat.generateCommitMessage" ,
271
271
"when" : " tabby.chatEnabled" ,
272
272
"group" : " navigation@-1"
273
- },
274
- {
275
- "command" : " tabby.chat.generateBranchName" ,
276
- "when" : " tabby.chatEnabled" ,
277
- "group" : " navigation@-2"
278
273
}
279
274
],
280
275
"view/title" : [
Original file line number Diff line number Diff line change @@ -422,8 +422,18 @@ export class Commands {
422
422
{ repository : selectedRepo . rootUri . toString ( ) } ,
423
423
token ,
424
424
) ;
425
+
425
426
if ( result && selectedRepo . inputBox ) {
426
427
selectedRepo . inputBox . value = result . commitMessage ;
428
+
429
+ const repo = this . gitProvider . getRepository ( selectedRepo . rootUri ) ;
430
+ if ( repo && repo . state && repo . state . HEAD ) {
431
+ const currentBranch = repo . state . HEAD . name ;
432
+ // FIXME(Sma1lboy): let LLM model decide should we create a new branch or not
433
+ if ( currentBranch === "main" || currentBranch === "master" ) {
434
+ commands . executeCommand ( "tabby.chat.generateBranchName" , selectedRepo ) ;
435
+ }
436
+ }
427
437
}
428
438
} ,
429
439
) ;
You can’t perform that action at this time.
0 commit comments