fix(commit): Fixed issue with retrieving uncommitted diffs in git repository
This commit is contained in:
		| @@ -1,5 +1,12 @@ | ||||
| # Changelog | ||||
|  | ||||
| ## 2024-06-23 - 1.3.6 - fix(commit) | ||||
| Fixed issue with retrieving uncommitted diffs in git repository | ||||
|  | ||||
| - Revised logic to correctly handle uncommitted changes by using an array for `getUncommittedDiff` method | ||||
| - Ensured proper handling and representation of uncommitted changes in the output | ||||
|  | ||||
|  | ||||
| ## 2024-06-23 - 1.3.5 - fix(aidocs_classes) | ||||
| Refactor and enhance changelog formatting | ||||
|  | ||||
|   | ||||
| @@ -3,6 +3,6 @@ | ||||
|  */ | ||||
| export const commitinfo = { | ||||
|   name: '@git.zone/tsdoc', | ||||
|   version: '1.3.5', | ||||
|   version: '1.3.6', | ||||
|   description: 'An advanced TypeScript documentation tool using AI to generate and enhance documentation for TypeScript projects.' | ||||
| } | ||||
|   | ||||
| @@ -27,7 +27,7 @@ export class Commit { | ||||
|       smartgitInstance, | ||||
|       this.projectDir | ||||
|     ); | ||||
|     const diffString = await gitRepo.getUncommittedDiff(); | ||||
|     const diffStringArray = await gitRepo.getUncommittedDiff(['pnpm-lock.json']); | ||||
|     const projectContext = new ProjectContext(this.projectDir); | ||||
|     let contextString = await projectContext.update(); | ||||
|     contextString = ` | ||||
| @@ -35,7 +35,7 @@ ${contextString} | ||||
|  | ||||
| Below is the diff of the uncommitted changes. If nothing is changed, there are no changes: | ||||
|  | ||||
| ${diffString || 'No changes.'} | ||||
| ${diffStringArray[0] ? diffStringArray.join('\n\n') : 'No changes.'} | ||||
|     `; | ||||
|  | ||||
|     let result = await this.aiDocsRef.openaiInstance.chat({ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user