File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 11import type { TextEditor , Uri } from 'vscode' ;
2- import { ProgressLocation , window } from 'vscode' ;
2+ import { ProgressLocation } from 'vscode' ;
33import type { Sources } from '../constants.telemetry' ;
44import type { Container } from '../container' ;
55import { GitUri } from '../git/gitUri' ;
@@ -82,12 +82,6 @@ export class GenerateCommitMessageCommand extends ActiveEditorCommand {
8282 } `;
8383 } catch ( ex ) {
8484 Logger . error ( ex , 'GenerateCommitMessageCommand' ) ;
85-
86- if ( ex instanceof Error && ex . message . startsWith ( 'No changes' ) ) {
87- void window . showInformationMessage ( 'No changes to generate a commit message from.' ) ;
88- return ;
89- }
90-
9185 void showGenericErrorMessage ( ex . message ) ;
9286 }
9387 }
Original file line number Diff line number Diff line change @@ -1847,7 +1847,7 @@ export class AIProviderService implements Disposable {
18471847 let diff = await changesOrRepo . git . diff . getDiff ?.( uncommittedStaged ) ;
18481848 if ( ! diff ?. contents ) {
18491849 diff = await changesOrRepo . git . diff . getDiff ?.( uncommitted ) ;
1850- if ( ! diff ?. contents ) throw new Error ( 'No changes to generate a commit message from.' ) ;
1850+ if ( ! diff ?. contents ) throw new AINoRequestDataError ( 'No changes to generate a commit message from.' ) ;
18511851 }
18521852 if ( options ?. cancellation ?. isCancellationRequested ) return undefined ;
18531853
You can’t perform that action at this time.
0 commit comments