GeezerVison is showing github.com — chore(voice): integrate the language-aware model browser from main · pingdotgg/t3code@a052547
File treeExpand file treeCollapse file tree Open diff view settings mobile/src/features/pull-requests
provider-cursor/src/server source-control-azure-devops/src/server
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/preview/AnnotationStyles.generated.ts +1-1Lines changed: 1 addition & 1 deletion Large diffs are not rendered by default. Collapse file Copy file name to clipboardExpand all lines: apps/desktop/src/preview/PickPreload.ts +15-2Lines changed: 15 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -633,6 +633,8 @@ function startAnnotation( | 633 | 633 | " h-7 w-7 shrink-0 rounded-full border-primary bg-primary p-0 text-primary-foreground hover:bg-primary/90"; | 634 | 634 | const voiceSkip = createButton("Skip", "Skip transcript cleanup"); | 635 | 635 | voiceSkip.className += " h-7 shrink-0 rounded-full px-2.5"; | | 636 | + // createButton's rounded-md sorts after rounded-full in the generated CSS, so it would win. | | 637 | + for (const button of [voiceCancel, voiceFinish, voiceSkip]) button.classList.remove("rounded-md"); | 636 | 638 | const voiceStatus = document.createElement("div"); | 637 | 639 | voiceStatus.className = "flex h-7 min-w-0 flex-1 items-center gap-2"; | 638 | 640 | voiceStatus.setAttribute("role", "status"); | @@ -744,16 +746,27 @@ function startAnnotation( | 744 | 746 | } | 745 | 747 | const recording = state.phase === "recording"; | 746 | 748 | const active = state.phase !== "idle" && state.phase !== "error"; | | 749 | + const wasActive = voicePill.parentElement === composerRow; | 747 | 750 | voiceButton.hidden = !state.available || active; | 748 | 751 | voiceButton.disabled = voiceBusy; | 749 | 752 | const label = voiceSettings ? "Open voice settings" : "Start voice input"; | 750 | 753 | voiceButton.title = | 751 | 754 | !voiceSettings && state.shortcutLabel ? `${label} (${state.shortcutLabel})` : label; | 752 | 755 | voiceButton.setAttribute("aria-label", label); | 753 | | - voiceRow.hidden = state.phase === "idle"; | | 756 | + // An active dictation takes the textarea's place; it takes focus once (sr-only) so Enter still attaches. | | 757 | + voiceRow.hidden = state.phase === "idle" || active; | | 758 | + comment.classList.toggle("sr-only", active); | | 759 | + if (active && !wasActive) comment.focus({ preventScroll: true }); | | 760 | + submit.hidden = active; | | 761 | + // Re-inserting on every level update would blur a focused Finish or Cancel. | | 762 | + if (active && voicePill.parentElement !== composerRow) comment.after(voicePill); | | 763 | + else if (!active && voicePill.parentElement !== voiceRow) voiceRow.appendChild(voicePill); | 754 | 764 | voicePill.className = active | 755 | | - ? "flex h-9 w-64 min-w-0 items-center gap-2 rounded-full border border-border bg-background p-1" | | 765 | + ? "flex h-8 min-w-0 flex-1 items-center gap-2" | 756 | 766 | : "flex min-w-0 items-center gap-1"; | | 767 | + // A draft that arrived while the textarea was sr-only was measured at 1px wide. | | 768 | + if (wasActive && !active) resizeComment(); | | 769 | + else if (phaseChanged) queueEditorLayout(); | 757 | 770 | voiceCancel.title = | 758 | 771 | state.phase === "error" ? "Dismiss voice input error" : "Cancel voice input"; | 759 | 772 | voiceCancel.setAttribute("aria-label", voiceCancel.title); | |
Collapse file Copy file name to clipboardExpand all lines: apps/mobile/src/features/pull-requests/PullRequestMarkdown.tsx +90-45Lines changed: 90 additions & 45 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -import { splitPullRequestBody } from "@t3tools/client-runtime/pull-request-markdown"; | | 1 | +import { | | 2 | + splitPullRequestBody, | | 3 | + type PullRequestBodySegment, | | 4 | +} from "@t3tools/client-runtime/pull-request-markdown"; | 2 | 5 | import { markdownTaskMarkerOffset } from "@t3tools/shared/markdownTaskList"; | 3 | 6 | import type { ReactNode } from "react"; | 4 | 7 | import { View } from "react-native"; | @@ -116,49 +119,101 @@ export function PullRequestMarkdown(props: { | 116 | 119 | readonly checked: boolean; | 117 | 120 | }) => boolean; | 118 | 121 | }) { | 119 | | - const { onTaskListChange } = props; | | 122 | + const mediaContext = useContext(PullRequestMediaContext); | | 123 | + const changeRequestUrl = useContext(ChangeRequestUrlContext); | 120 | 124 | const segments = useMemo(() => splitPullRequestBody(props.markdown), [props.markdown]); | 121 | 125 | const [undoneTicks, setUndoneTicks] = useState(0); | | 126 | + const gallery: FilePreviewItem[] = markdownImageSources( | | 127 | + props.imageGroupMarkdown ?? props.markdown, | | 128 | + ) | | 129 | + .map((href) => (changeRequestUrl ? resolveChangeRequestMediaUrl(href, changeRequestUrl) : href)) | | 130 | + .filter( | | 131 | + (uri) => | | 132 | + /^https?:\/\//i.test(uri) && | | 133 | + videoMimeType({ name: uri.split(/[?#]/)[0] ?? uri, mimeType: "" }) === null, | | 134 | + ) | | 135 | + .map((uri) => pullRequestImageSource(uri, mediaContext)); | | 136 | + const segmentProps = { | | 137 | + gallery, | | 138 | + lineBreaks: props.lineBreaks, | | 139 | + undoneTicks, | | 140 | + onTaskListChange: props.onTaskListChange, | | 141 | + onTaskListUndone: () => setUndoneTicks((count) => count + 1), | | 142 | + }; | | 143 | + return ( | | 144 | + <View style={{ gap: 12 }}> | | 145 | + {segments.map((segment) => ( | | 146 | + <PullRequestBodySegmentView key={segment.id} segment={segment} {...segmentProps} /> | | 147 | + ))} | | 148 | + </View> | | 149 | + ); | | 150 | +} | | 151 | + | | 152 | +function PullRequestBodySegmentView(props: { | | 153 | + readonly segment: PullRequestBodySegment; | | 154 | + readonly gallery: FilePreviewItem[]; | | 155 | + readonly lineBreaks: boolean | undefined; | | 156 | + readonly undoneTicks: number; | | 157 | + readonly onTaskListChange: | | 158 | + | ((input: { readonly markerOffset: number; readonly checked: boolean }) => boolean) | | 159 | + | undefined; | | 160 | + readonly onTaskListUndone: () => void; | | 161 | +}) { | | 162 | + const { segment, onTaskListChange } = props; | | 163 | + if (segment.kind === "markdown") { | | 164 | + return ( | | 165 | + <PullRequestMarkdownContent | | 166 | + key={props.undoneTicks} | | 167 | + markdown={segment.text} | | 168 | + gallery={props.gallery} | | 169 | + lineBreaks={props.lineBreaks} | | 170 | + onTaskListItemPress={ | | 171 | + onTaskListChange | | 172 | + ? (event) => { | | 173 | + const offset = markdownTaskMarkerOffset( | | 174 | + segment.text, | | 175 | + event.index, | | 176 | + event.text, | | 177 | + event.checked, | | 178 | + ); | | 179 | + const kept = | | 180 | + offset !== null && | | 181 | + onTaskListChange({ | | 182 | + markerOffset: segment.sourceOffset + offset, | | 183 | + checked: event.checked, | | 184 | + }); | | 185 | + if (!kept) props.onTaskListUndone(); | | 186 | + } | | 187 | + : undefined | | 188 | + } | | 189 | + /> | | 190 | + ); | | 191 | + } | | 192 | + if (segment.kind === "attachment") { | | 193 | + return <PullRequestMedia url={segment.url} kind={segment.media} />; | | 194 | + } | 122 | 195 | return ( | 123 | 196 | <View style={{ gap: 12 }}> | 124 | | - {segments.map((segment) => | 125 | | - segment.kind === "markdown" ? ( | 126 | | - <PullRequestMarkdownContent | 127 | | - key={`${segment.id}:${undoneTicks}`} | 128 | | - markdown={segment.text} | 129 | | - imageGroupMarkdown={props.imageGroupMarkdown ?? props.markdown} | 130 | | - lineBreaks={props.lineBreaks} | 131 | | - onTaskListItemPress={ | 132 | | - onTaskListChange | 133 | | - ? (event) => { | 134 | | - const offset = markdownTaskMarkerOffset( | 135 | | - segment.text, | 136 | | - event.index, | 137 | | - event.text, | 138 | | - event.checked, | 139 | | - ); | 140 | | - const kept = | 141 | | - offset !== null && | 142 | | - onTaskListChange({ | 143 | | - markerOffset: segment.sourceOffset + offset, | 144 | | - checked: event.checked, | 145 | | - }); | 146 | | - if (!kept) setUndoneTicks((count) => count + 1); | 147 | | - } | 148 | | - : undefined | 149 | | - } | 150 | | - /> | 151 | | - ) : ( | 152 | | - <PullRequestMedia key={segment.id} url={segment.url} kind={segment.media} /> | 153 | | - ), | 154 | | - )} | | 197 | + {segment.rows.map((cells, rowIndex) => ( | | 198 | + // oxlint-disable-next-line react/no-array-index-key -- rows have no identity besides position | | 199 | + <View key={rowIndex} style={{ flexDirection: "row", gap: 12 }}> | | 200 | + {cells.map((cell, cellIndex) => ( | | 201 | + // oxlint-disable-next-line react/no-array-index-key -- cells have no identity besides position | | 202 | + <View key={cellIndex} style={{ flex: 1, minWidth: 0, gap: 12 }}> | | 203 | + {cell.segments.map((cellSegment) => ( | | 204 | + <PullRequestBodySegmentView key={cellSegment.id} {...props} segment={cellSegment} /> | | 205 | + ))} | | 206 | + </View> | | 207 | + ))} | | 208 | + </View> | | 209 | + ))} | 155 | 210 | </View> | 156 | 211 | ); | 157 | 212 | } | 158 | 213 |
| 159 | 214 | function PullRequestMarkdownContent(props: { | 160 | 215 | readonly markdown: string; | 161 | | - readonly imageGroupMarkdown?: string; | | 216 | + readonly gallery: FilePreviewItem[]; | 162 | 217 | readonly lineBreaks: boolean | undefined; | 163 | 218 | readonly onTaskListItemPress?: SelectableMarkdownTextProps["onTaskListItemPress"]; | 164 | 219 | }) { | @@ -173,23 +228,13 @@ function PullRequestMarkdownContent(props: { | 173 | 228 | const openLink = (href: string) => { | 174 | 229 | void openPullRequest(href); | 175 | 230 | }; | 176 | | - const gallery: FilePreviewItem[] = markdownImageSources( | 177 | | - props.imageGroupMarkdown ?? props.markdown, | 178 | | - ) | 179 | | - .map(resolveMediaUrl) | 180 | | - .filter( | 181 | | - (uri) => | 182 | | - /^https?:\/\//i.test(uri) && | 183 | | - videoMimeType({ name: uri.split(/[?#]/)[0] ?? uri, mimeType: "" }) === null, | 184 | | - ) | 185 | | - .map((uri) => pullRequestImageSource(uri, mediaContext)); | 186 | 231 | const [preview, setPreview] = useState<FilePreviewSource | null>(null); | 187 | 232 | const renderImage: MarkdownImageRenderer = (image) => ( | 188 | 233 | <MarkdownImage href={resolveMediaUrl(image.href)} alt={image.alt} onPreview={setPreview} /> | 189 | 234 | ); | 190 | 235 | const styles = useMarkdownPreviewStyles(); | 191 | 236 | return ( | 192 | | - <FilePreviewGallery value={gallery}> | | 237 | + <FilePreviewGallery value={props.gallery}> | 193 | 238 | <SelectableMarkdownText | 194 | 239 | markdown={markdown} | 195 | 240 | preserveSoftBreaks={props.lineBreaks ?? hostLineBreaks} | |
Collapse file Copy file name to clipboardExpand all lines: apps/mobile/src/features/pull-requests/pullRequestDescriptionContent.test.ts +12Lines changed: 12 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -26,4 +26,16 @@ describe("PR attachments", () => { | 26 | 26 | }, | 27 | 27 | ]); | 28 | 28 | }); | | 29 | + | | 30 | + it("collects videos from a before/after table", () => { | | 31 | + const media = splitPullRequestBody( | | 32 | + "<table>\n<tr><th>Before</th><th>After</th></tr>\n<tr><td>\n\nhttps://drop.example.com/before.mp4\n\n</td><td>\n\nhttps://drop.example.com/after.mp4\n\n</td></tr>\n</table>", | | 33 | + ); | | 34 | + expect( | | 35 | + pullRequestDescriptionContent({ type: "root" } as MarkdownNode, media).attachments, | | 36 | + ).toEqual([ | | 37 | + { uri: "https://drop.example.com/before.mp4", caption: "Video", kind: "video" }, | | 38 | + { uri: "https://drop.example.com/after.mp4", caption: "Video", kind: "video" }, | | 39 | + ]); | | 40 | + }); | 29 | 41 | }); |
Collapse file Copy file name to clipboardExpand all lines: apps/mobile/src/features/pull-requests/pullRequestDescriptionContent.ts +7-2Lines changed: 7 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -37,7 +37,11 @@ export function pullRequestDescriptionContent( | 37 | 37 | if (node.type === "break") text.push(" "); | 38 | 38 | }; | 39 | 39 | visit(document); | 40 | | - for (const segment of media) { | | 40 | + const collect = (segment: PullRequestBodySegment) => { | | 41 | + if (segment.kind === "table") { | | 42 | + segment.rows.flat().forEach((cell) => cell.segments.forEach(collect)); | | 43 | + return; | | 44 | + } | 41 | 45 | if (segment.kind === "attachment" && !attachments.has(segment.url)) { | 42 | 46 | const name = new URL(segment.url).pathname.split("/").pop(); | 43 | 47 | attachments.set(segment.url, { | @@ -46,6 +50,7 @@ export function pullRequestDescriptionContent( | 46 | 50 | kind: segment.media, | 47 | 51 | }); | 48 | 52 | } | 49 | | - } | | 53 | + }; | | 54 | + media.forEach(collect); | 50 | 55 | return { preview: text.join("").trim(), attachments: [...attachments.values()] }; | 51 | 56 | } |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts +2-3Lines changed: 2 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -11809,9 +11809,8 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* ( | 11809 | 11809 | } | 11810 | 11810 | return false; | 11811 | 11811 | }), | 11812 | | - hasPendingBackgroundWorkForThread: Effect.fn( | 11813 | | - "ClaudeAdapterV2.hasPendingBackgroundWorkForThread", | 11814 | | - )(function* (providerThread, options) { | | 11812 | + // Untraced: the run's event stream calls this once per provider event. | | 11813 | + hasPendingBackgroundWorkForThread: Effect.fnUntraced(function* (providerThread, options) { | 11815 | 11814 | const nativeThreadId = providerThread.nativeThreadRef?.nativeId; | 11816 | 11815 | if (nativeThreadId === undefined || nativeThreadId === null) { | 11817 | 11816 | return false; | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/Adapters/CodexAdapterV2.ts +2-3Lines changed: 2 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -7071,9 +7071,8 @@ export const makeCodexAdapterV2 = Effect.fn("makeCodexAdapterV2")(function* ( | 7071 | 7071 | } | 7072 | 7072 | return false; | 7073 | 7073 | }), | 7074 | | - hasPendingBackgroundWorkForThread: Effect.fn( | 7075 | | - "CodexAdapterV2.hasPendingBackgroundWorkForThread", | 7076 | | - )(function* (providerThread) { | | 7074 | + // Untraced: the run's event stream calls this once per provider event. | | 7075 | + hasPendingBackgroundWorkForThread: Effect.fnUntraced(function* (providerThread) { | 7077 | 7076 | const contexts = [ | 7078 | 7077 | ...(yield* Ref.get(activeTurns)).values(), | 7079 | 7078 | ...(yield* Ref.get(settledTurns)).values(), | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/ProjectionStore.test.ts +56Lines changed: 56 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -472,6 +472,62 @@ it.effect("record reads restrict provider histories to delivery identities", () | 472 | 472 | })).providerThreads, | 473 | 473 | [], | 474 | 474 | ); | | 475 | + const ownerNodeId = NodeId.make("node:delivery-identities:owner"); | | 476 | + yield* store.apply({ | | 477 | + id: EventId.make("event:delivery-identities:owner-node"), | | 478 | + type: "node.updated", | | 479 | + threadId, | | 480 | + runId: RunId.make("run:delivery-identities:rolled-back"), | | 481 | + nodeId: ownerNodeId, | | 482 | + driver, | | 483 | + occurredAt: now, | | 484 | + payload: { | | 485 | + id: ownerNodeId, | | 486 | + threadId, | | 487 | + runId: RunId.make("run:delivery-identities:rolled-back"), | | 488 | + rootNodeId: NodeId.make("node:delivery-identities:rolled-back"), | | 489 | + parentNodeId: NodeId.make("node:delivery-identities:rolled-back"), | | 490 | + kind: "subagent", | | 491 | + status: "completed", | | 492 | + countsForRun: false, | | 493 | + providerThreadId: null, | | 494 | + providerTurnId: null, | | 495 | + nativeItemRef: null, | | 496 | + runtimeRequestId: null, | | 497 | + checkpointScopeId: null, | | 498 | + startedAt: now, | | 499 | + completedAt: now, | | 500 | + }, | | 501 | + }); | | 502 | + yield* store.apply({ | | 503 | + id: EventId.make("event:delivery-identities:owned"), | | 504 | + type: "provider-thread.updated", | | 505 | + threadId, | | 506 | + occurredAt: now, | | 507 | + payload: { | | 508 | + id: ProviderThreadId.make("provider-thread:owned"), | | 509 | + appThreadId: ThreadId.make("thread:delivery-identities:child"), | | 510 | + driver, | | 511 | + providerInstanceId, | | 512 | + providerSessionId: null, | | 513 | + ownerNodeId, | | 514 | + nativeThreadRef: null, | | 515 | + nativeConversationHeadRef: null, | | 516 | + lastRunOrdinal: null, | | 517 | + handoffIds: [], | | 518 | + forkedFrom: null, | | 519 | + status: "idle", | | 520 | + firstRunOrdinal: 2, | | 521 | + createdAt: now, | | 522 | + updatedAt: now, | | 523 | + }, | | 524 | + }); | | 525 | + assert.deepEqual( | | 526 | + (yield* store.getThreadRecords(threadId, ["providerThreads"])).providerThreads.map( | | 527 | + (row) => row.id, | | 528 | + ), | | 529 | + ["provider-thread:history", "provider-thread:selected", "provider-thread:owned"], | | 530 | + ); | 475 | 531 | // Unselected history must not be decoded, even if its payload is unreadable. | 476 | 532 | yield* sql`UPDATE orchestration_v2_projection_provider_threads SET payload_json = '{}' | 477 | 533 | WHERE provider_thread_id = 'provider-thread:history'`; | |
Collapse file Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/ProjectionStore.ts +14-8Lines changed: 14 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1979,6 +1979,16 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> = | 1979 | 1979 | OR item.payload_json LIKE '%"viewedImagePath"%' | 1980 | 1980 | OR item.payload_json LIKE '%"toolName":"%delegate_task"%')`; | 1981 | 1981 |
| | 1982 | + // Start from the few owned provider threads; a thread can have a large settled node history. | | 1983 | + const nodesOwningProviderThreads = (threadId: ThreadId) => sql` | | 1984 | + SELECT owner.node_id | | 1985 | + FROM orchestration_v2_projection_provider_threads AS owned | | 1986 | + INDEXED BY orchestration_v2_projection_provider_threads_owner_idx | | 1987 | + CROSS JOIN orchestration_v2_projection_nodes AS owner | | 1988 | + ON owner.node_id = owned.owner_node_id | | 1989 | + WHERE owned.owner_node_id IS NOT NULL AND owner.thread_id = ${threadId} | | 1990 | + `; | | 1991 | + | 1982 | 1992 | const keepRecordedRunField = (payload: Statement.Fragment, path: string) => sql` | 1983 | 1993 | CASE | 1984 | 1994 | WHEN json_type(excluded.payload_json, ${path}) IS NULL | @@ -3500,11 +3510,7 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> = | 3500 | 3510 | SELECT payload_json | 3501 | 3511 | FROM orchestration_v2_projection_provider_threads | 3502 | 3512 | WHERE (thread_id = ${threadId} | 3503 | | - OR owner_node_id IN ( | 3504 | | - SELECT node_id | 3505 | | - FROM orchestration_v2_projection_nodes | 3506 | | - WHERE thread_id = ${threadId} | 3507 | | - ) | | 3513 | + OR owner_node_id IN (${nodesOwningProviderThreads(threadId)}) | 3508 | 3514 | OR provider_thread_id IN ( | 3509 | 3515 | SELECT provider_thread_id | 3510 | 3516 | FROM orchestration_v2_projection_subagents | @@ -5085,7 +5091,7 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> = | 5085 | 5091 | sql<PayloadRow>`SELECT payload_json FROM orchestration_v2_projection_provider_threads | 5086 | 5092 | WHERE provider_thread_id = ${target.providerThreadId} AND ( | 5087 | 5093 | thread_id = ${threadId} | 5088 | | - OR owner_node_id IN (SELECT node_id FROM orchestration_v2_projection_nodes WHERE thread_id = ${threadId}) | | 5094 | + OR owner_node_id IN (${nodesOwningProviderThreads(threadId)}) | 5089 | 5095 | OR provider_thread_id IN (SELECT provider_thread_id FROM orchestration_v2_projection_subagents WHERE thread_id = ${threadId}) | 5090 | 5096 | )`, | 5091 | 5097 | sql<PayloadRow>`SELECT payload_json FROM orchestration_v2_projection_provider_turns | @@ -5325,7 +5331,7 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> = | 5325 | 5331 | sql<PayloadRow>`SELECT payload_json FROM orchestration_v2_projection_provider_threads | 5326 | 5332 | WHERE provider_thread_id = ${run?.providerThreadId ?? null} | 5327 | 5333 | AND (thread_id = ${threadId} | 5328 | | - OR owner_node_id IN (SELECT node_id FROM orchestration_v2_projection_nodes WHERE thread_id = ${threadId}) | | 5334 | + OR owner_node_id IN (${nodesOwningProviderThreads(threadId)}) | 5329 | 5335 | OR provider_thread_id IN (SELECT provider_thread_id FROM orchestration_v2_projection_subagents WHERE thread_id = ${threadId}))`, | 5330 | 5336 | sql<{ readonly ordinal: number }>`SELECT ordinal_within_scope AS ordinal | 5331 | 5337 | FROM orchestration_v2_projection_checkpoints | @@ -5364,7 +5370,7 @@ export const layer: Layer.Layer<ProjectionStoreV2, never, SqlClient.SqlClient> = | 5364 | 5370 | sql<PayloadRow>`SELECT payload_json FROM orchestration_v2_projection_provider_threads | 5365 | 5371 | WHERE provider_thread_id = ${target.providerThreadId} | 5366 | 5372 | AND (thread_id = ${threadId} | 5367 | | - OR owner_node_id IN (SELECT node_id FROM orchestration_v2_projection_nodes WHERE thread_id = ${threadId}) | | 5373 | + OR owner_node_id IN (${nodesOwningProviderThreads(threadId)}) | 5368 | 5374 | OR provider_thread_id IN (SELECT provider_thread_id FROM orchestration_v2_projection_subagents WHERE thread_id = ${threadId}))`, | 5369 | 5375 | sql<PayloadRow>`SELECT payload_json FROM orchestration_v2_projection_checkpoints | 5370 | 5376 | WHERE thread_id = ${threadId} AND checkpoint_id = ${target.checkpointId}`, | |
|