MCPcopy Index your code
hub / github.com/ByBrawe/opencode-loop / executeTuiCommand

Function executeTuiCommand

src/index.js:389–396  ·  view source on GitHub ↗
(client, command)

Source from the content-addressed store, hash-verified

387 const temp = `${target}.${process.pid}.${Date.now()}.tmp`
388 try {
389 await fs.writeFile(temp, JSON.stringify({ version: 4, jobs: state.jobs || [] }, null, 2))
390 await fs.rename(temp, target)
391 } finally {
392 try { await fs.rm(temp, { force: true }) } catch {}
393 }
394 })
395}
396
397async function removeState(directory, sessionID) {
398 await withStateWriteLock(directory, sessionID, async () => {
399 try { await fs.unlink(statePath(directory, sessionID)) } catch {}

Callers 1

compactSessionFunction · 0.85

Calls 1

sdkCallFunction · 0.85

Tested by

no test coverage detected