Prepare datamodel for multi-environment (#1765)
Co-authored-by: justsomelegs <[email protected]> Co-authored-by: codex <[email protected]> Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: cursor[bot] <206951365+cursor[bot]@users.noreply.github.com>
This commit is contained in:
121 files changed
+10195
-4958
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import type { OrchestrationEvent, ThreadId } from "@t3tools/contracts";
|
||||
|
||||
export interface OrchestrationBatchEffects {
|
||||
clearPromotedDraftThreadIds: ThreadId[];
|
||||
promoteDraftThreadIds: ThreadId[];
|
||||
clearDeletedThreadIds: ThreadId[];
|
||||
removeTerminalStateThreadIds: ThreadId[];
|
||||
needsProviderInvalidation: boolean;
|
||||
@@ -70,12 +70,12 @@ export function deriveOrchestrationBatchEffects(
|
||||
}
|
||||
}
|
||||
|
||||
const clearPromotedDraftThreadIds: ThreadId[] = [];
|
||||
const promoteDraftThreadIds: ThreadId[] = [];
|
||||
const clearDeletedThreadIds: ThreadId[] = [];
|
||||
const removeTerminalStateThreadIds: ThreadId[] = [];
|
||||
for (const [threadId, effect] of threadLifecycleEffects) {
|
||||
if (effect.clearPromotedDraft) {
|
||||
clearPromotedDraftThreadIds.push(threadId);
|
||||
promoteDraftThreadIds.push(threadId);
|
||||
}
|
||||
if (effect.clearDeletedThread) {
|
||||
clearDeletedThreadIds.push(threadId);
|
||||
@@ -86,7 +86,7 @@ export function deriveOrchestrationBatchEffects(
|
||||
}
|
||||
|
||||
return {
|
||||
clearPromotedDraftThreadIds,
|
||||
promoteDraftThreadIds,
|
||||
clearDeletedThreadIds,
|
||||
removeTerminalStateThreadIds,
|
||||
needsProviderInvalidation,
|
||||
|
||||
Reference in new issue
Block a user