Skip to content

Commit 5c007ce

Browse files
authoredMar 30, 2024··
fix: make ai fields to be optional (#164)
1 parent b7ba5b4 commit 5c007ce

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎packages/cz-git/src/generator/questionAI.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { generateAISubjects } from './message'
1616

1717
export async function generateAIPrompt(options: CommitizenGitOptions, cz: CommitizenType) {
1818
const answers = await cz.prompt(generateAITypesQuestions(options))
19-
console.log(style.green('ℹ'), style.bold(options.messages!.generatingByAI))
19+
console.log(style.green('ℹ'), style.bold(options.messages!.generatingByAI!))
2020
const subjects = await generateAISubjects(answers, options)
2121
if (!Array.isArray(subjects))
2222
throw new Error('subjects fetch value failed')

‎packages/cz-git/src/shared/types/options.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ export interface Answers {
8282
/**
8383
* @default 'Generating your AI commit subject...'
8484
*/
85-
generatingByAI: string
85+
generatingByAI?: string
8686
/**
8787
* @default 'Select suitable subject by AI generated:'
8888
*/
89-
generatedSelectByAI: string
89+
generatedSelectByAI?: string
9090
footerPrefix?: string
9191
}
9292

0 commit comments

Comments
 (0)
Please sign in to comment.