Skip to content

Commit a22ffaa

Browse files
authored
Merge pull request #11 from BeyteFlow/copilot/sub-pr-8
fix: install @google/generative-ai and use writeFile for atomic writes in ConflictResolver
2 parents bc03c6e + 0a9918a commit a22ffaa

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

git-ai/package-lock.json

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

git-ai/src/services/ConflictResolver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export class ConflictResolver {
175175
const buffer = Buffer.from(resolvedContent, 'utf-8');
176176
const tempHandle = await fs.open(tempPath, fs.constants.O_CREAT | fs.constants.O_EXCL | fs.constants.O_WRONLY | fs.constants.O_NOFOLLOW, 0o644);
177177
try {
178-
await tempHandle.write(buffer, 0, buffer.length);
178+
await tempHandle.writeFile(buffer);
179179
await tempHandle.sync();
180180
await tempHandle.close();
181181
} catch (error) {

0 commit comments

Comments
 (0)