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

Function jobLabel

src/index.js:514–528  ·  view source on GitHub ↗
(job)

Source from the content-addressed store, hash-verified

512 if (typeof until !== "number") return false
513 if (until < now()) {
514 loopOwnedUserMessageGuards.delete(sessionID)
515 return false
516 }
517 return true
518}
519
520async function say(client, sessionID, text) {
521 guardLoopOwnedUserMessage(sessionID)
522 try {
523 await sdkCall(
524 client.session.prompt.bind(client.session),
525 { path: { id: sessionID }, body: { noReply: true, parts: [{ type: "text", text }] } },
526 { path: { sessionID }, body: { noReply: true, parts: [{ type: "text", text }] } },
527 { sessionID, noReply: true, parts: [{ type: "text", text }] },
528 )
529 } catch {}
530}
531

Callers 2

addLoopFunction · 0.85
statusLoopFunction · 0.85

Calls 1

durationToTextFunction · 0.85

Tested by

no test coverage detected