The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import * as Effect from "effect/Effect"; |
| 2 | import * as SqlClient from "effect/sql/SqlClient"; |
| 3 | |
| 4 | export default Effect.gen(function* () { |
| 5 | const sql = yield* SqlClient.SqlClient; |
| 6 | |
| 7 | // Keep this predicate aligned with ProjectionStore's waiting link card query. |
| 8 | yield* sql` |
| 9 | CREATE INDEX IF NOT EXISTS orchestration_v2_projection_turn_items_waiting_link_idx |
| 10 | ON orchestration_v2_projection_turn_items(thread_id, updated_at DESC, turn_item_id DESC) |
| 11 | WHERE type = 'link_request' AND status = 'waiting' |
| 12 | `; |
| 13 | }); |