fix(git diff): improve git diff
This commit is contained in:
@@ -30,6 +30,14 @@ export class Commit {
|
||||
const diffStringArray = await gitRepo.getUncommittedDiff([
|
||||
'pnpm-lock.yaml',
|
||||
'package-lock.json',
|
||||
'npm-shrinkwrap.json',
|
||||
'yarn.lock',
|
||||
'deno.lock',
|
||||
'bun.lockb',
|
||||
'.claude/*',
|
||||
'.cursor/*',
|
||||
'.vscode/*',
|
||||
'.idea/*',
|
||||
]);
|
||||
// Use the new TaskContextFactory for optimized context
|
||||
const taskContextFactory = new (await import('../context/index.js')).TaskContextFactory(
|
||||
|
||||
@@ -64,7 +64,7 @@ export class AiDoc {
|
||||
await this.npmextraKV.writeKey('OPENAI_TOKEN', this.openaiToken);
|
||||
}
|
||||
}
|
||||
if (!this.openaiToken) {
|
||||
if (!this.openaiToken && this.npmextraKV) {
|
||||
this.openaiToken = await this.npmextraKV.readKey('OPENAI_TOKEN');
|
||||
}
|
||||
|
||||
@@ -76,7 +76,11 @@ export class AiDoc {
|
||||
}
|
||||
|
||||
public async stop() {
|
||||
await this.openaiInstance.stop();
|
||||
if (this.openaiInstance) {
|
||||
await this.openaiInstance.stop();
|
||||
}
|
||||
// No explicit cleanup needed for npmextraKV or aidocInteract
|
||||
// They don't keep event loop alive
|
||||
}
|
||||
|
||||
public async buildReadme(projectDirArg: string) {
|
||||
|
||||
Reference in New Issue
Block a user