attachRunToMessage
constattachRunToMessage: (sessionId,messageId,runId,alongside) =>Promise<boolean> =sqliteRepo.attachRunToMessage
Defined in: src/lib/repositories/chat-history.ts:46
File a durable job against an assistant row a chat turn already owns, in one commit: the row gains the job’s id and the job’s own statement runs beside it.
The counterpart of appendRunTurn for work a model delegated from
inside a turn. That turn wrote the request and the row, and is still
streaming into it, so nothing here inserts a message or moves the leaf.
Only an unclaimed assistant row of the named chat qualifies: a row already
carrying a job keeps the one it has, and undefined leaves the decision to
the caller, the same as a missing chat does above.
Parameters
Section titled “Parameters”sessionId
Section titled “sessionId”string
messageId
Section titled “messageId”number
string
alongside
Section titled “alongside”RunTurnStatement
Returns
Section titled “Returns”Promise<boolean>