fix(server): wake native chat progress from committed work

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-25 12:19:41 -05:00
1 parent b212886949
commit bcf2f38ff5
17 files changed
+711 -281

No files matched your search

@@ -1,3 +1,5 @@
import { isSafeNativeChatProgressEventType } from "../safe-native-chat-progress.js";
import { notifyChatNativeProgress } from "../chat-native-progress-notifications.js";
import { createHash } from "node:crypto";
import { and, desc, eq, inArray, lt } from "drizzle-orm";
@@ -290,6 +292,9 @@ export class NativeRunCoordinatorStore {
throw new Error("native_event_source_gap");
}
if (isSafeNativeChatProgressEventType(event.eventType)) {
await notifyChatNativeProgress(tx, { companyId: this.#binding.companyId, issueId: this.#binding.issueId });
}
const cursor = run.nextEventSeq;
const [inserted] = await tx
.insert(heartbeatRunEvents)