(directory, client, sessionID)
| 469 | const temp = path.join(os.tmpdir(), `opencode-loop-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}.tmp`); |
| 470 | await fs.writeFile(temp, contents, encoding); |
| 471 | try { |
| 472 | let lastError; |
| 473 | for (let attempt = 0;attempt < attempts; attempt++) { |
| 474 | try { |
| 475 | await fs.rename(temp, target); |
| 476 | return; |
| 477 | } catch (error) { |
| 478 | lastError = error; |
no test coverage detected