mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 01:50:39 +09:00
Tighten live run transcript streaming and stdout
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
98ede67b9b
commit
5e9c223077
5 changed files with 68 additions and 12 deletions
|
|
@ -1368,12 +1368,13 @@ export function heartbeatService(db: Db) {
|
|||
const onLog = async (stream: "stdout" | "stderr", chunk: string) => {
|
||||
if (stream === "stdout") stdoutExcerpt = appendExcerpt(stdoutExcerpt, chunk);
|
||||
if (stream === "stderr") stderrExcerpt = appendExcerpt(stderrExcerpt, chunk);
|
||||
const ts = new Date().toISOString();
|
||||
|
||||
if (handle) {
|
||||
await runLogStore.append(handle, {
|
||||
stream,
|
||||
chunk,
|
||||
ts: new Date().toISOString(),
|
||||
ts,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1388,6 +1389,7 @@ export function heartbeatService(db: Db) {
|
|||
payload: {
|
||||
runId: run.id,
|
||||
agentId: run.agentId,
|
||||
ts,
|
||||
stream,
|
||||
chunk: payloadChunk,
|
||||
truncated: payloadChunk.length !== chunk.length,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue