Skip to content

Commit 0b472f7

Browse files
committed
fix: add delay before closing Auggie to ensure file writes complete
The Auggie SDK uses SIGKILL to terminate the process immediately, which may not give enough time for file writes to be flushed to disk. Changes: - Log the workspace root directory for debugging - Add 2-second delay after prompt completes before closing - This ensures all file operations have time to complete - Prevents 'no changes to commit' issue The delay allows the Auggie process to finish writing all file changes to disk before being terminated.
1 parent 7ad8bda commit 0b472f7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

assistant/src/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,13 @@ After making the changes, provide a brief summary of what you implemented.`;
305305
// Use Auggie SDK to implement changes
306306
try {
307307
// Initialize Auggie client
308+
const workspaceRoot = process.cwd();
308309
core.info('🔧 Initializing Auggie client...');
310+
core.info(`📁 Workspace root: ${workspaceRoot}`);
309311
const auggie = await Auggie.create({
310312
apiKey: augmentApiToken,
311313
apiUrl: augmentApiUrl,
312-
workspaceRoot: process.cwd(),
314+
workspaceRoot,
313315
model: 'sonnet4.5',
314316
allowIndexing: true,
315317
});
@@ -359,6 +361,10 @@ After making the changes, provide a brief summary of what you implemented.`;
359361
core.info('📝 Auggie response:');
360362
core.info(response);
361363

364+
// Wait a moment to ensure all file writes are flushed to disk
365+
core.info('⏳ Waiting for file writes to complete...');
366+
await new Promise(resolve => setTimeout(resolve, 2000));
367+
362368
// Close the Auggie connection
363369
await auggie.close();
364370

0 commit comments

Comments
 (0)