fix(aidocs_classes): Refactor and enhance changelog formatting
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tsdoc',
|
||||
version: '1.3.4',
|
||||
version: '1.3.5',
|
||||
description: 'An advanced TypeScript documentation tool using AI to generate and enhance documentation for TypeScript projects.'
|
||||
}
|
||||
|
@ -59,6 +59,8 @@ interface {
|
||||
recommendedNextVersion: string; // the recommended next version of the project, x.x.x
|
||||
}
|
||||
|
||||
For the recommendedNextVersionDetails, please only add a detail entries to the array if it has an obvious value to the reader.
|
||||
|
||||
You are being given the files of the project. You should use them to create the commit message.
|
||||
Also you are given a diff
|
||||
|
||||
@ -81,16 +83,18 @@ Also you are given a diff
|
||||
if (!previousChangelog) {
|
||||
// lets build the changelog based on that
|
||||
const commitMessages = await gitRepo.getAllCommitMessages();
|
||||
console.log(JSON.stringify(commitMessages, null, 2));
|
||||
let result2 = await this.aiDocsRef.openaiInstance.chat({
|
||||
messageHistory: [],
|
||||
systemMessage: `
|
||||
You are building a changelog.md file for the project.
|
||||
Omit commits and versions that lack relevant changes.
|
||||
Omit commits and versions that lack relevant changes, but make sure to mention them as a range with a summarizing message instead.
|
||||
|
||||
A changelog entry should look like this:
|
||||
|
||||
## yyyy-mm-dd - x.x.x - scope here
|
||||
main descriptiom here
|
||||
|
||||
- detailed bullet points follow
|
||||
|
||||
You are given:
|
||||
@ -117,7 +121,7 @@ ${JSON.stringify(commitMessages, null, 2)}
|
||||
{{nextVersionMessage}}
|
||||
|
||||
{{nextVersionDetails}}
|
||||
`}\n\n${oldChangelog}\n`;
|
||||
`}\n\n${oldChangelog}`;
|
||||
resultObject.changelog = newChangelog;
|
||||
|
||||
return resultObject;
|
||||
|
@ -47,7 +47,6 @@ export class ProjectContext {
|
||||
}
|
||||
|
||||
public async convertFilesToContext(filesArg: plugins.smartfile.SmartFile[]) {
|
||||
console.log(`Using the following files for the documentation:`);
|
||||
filesArg.map((fileArg) => {
|
||||
// console.log(` -> ${fileArg.relative}`);
|
||||
});
|
||||
|
Reference in New Issue
Block a user