improved prompt to display more consise messages

This commit is contained in:
Hassan El Mghari
2023-04-08 11:30:14 -07:00
parent 42a2a39f6f
commit 1bf3b0f635

View File

@@ -100,7 +100,7 @@ const sanitizeMessage = (message: string) => message.trim().replace(/[\n\r]/g, '
const deduplicateMessages = (array: string[]) => Array.from(new Set(array)); const deduplicateMessages = (array: string[]) => Array.from(new Set(array));
const getPrompt = (locale: string, diff: string) => `Write an insightful but concise Git commit message in a complete sentence in present tense for the following diff without prefacing it with anything, the response must be in the language ${locale}:\n${diff}`; const getPrompt = (locale: string, diff: string) => `Write a git commit message in present tense for the following diff without prefacing it with anything. Do not be needlessly verbose and make sure the answer is concise and to the point. The response must be in the language ${locale}:\n${diff}`;
export const generateCommitMessage = async ( export const generateCommitMessage = async (
apiKey: string, apiKey: string,