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

Function sessionIsIdle

src/index.js:862–864  ·  view source on GitHub ↗
(client, sessionID, directory, options = {})

Source from the content-addressed store, hash-verified

860async function fileContains(filePath, needle) {
861 try {
862 const stat = await fs.stat(filePath)
863 if (!stat.isFile() || stat.size > MAX_SCAN_BYTES) return false
864 return (await fs.readFile(filePath, "utf8")).includes(needle)
865 } catch { return false }
866}
867

Callers 3

scheduleIdleWorkFunction · 0.85
scheduleDueWorkFunction · 0.85
maybeRunDueJobsFunction · 0.85

Calls 1

sessionStatusTypeFunction · 0.85

Tested by

no test coverage detected