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 | // The thread window finds its newest conversation rows here instead of walking the tool calls |
| 8 | // between them. The read in ProjectionStore must spell this type list the same way. |
| 9 | yield* sql` |
| 10 | CREATE INDEX IF NOT EXISTS orchestration_v2_projection_turn_items_conversation_idx |
| 11 | ON orchestration_v2_projection_turn_items(thread_id, ordinal, type, run_id) |
| 12 | WHERE type NOT IN ( |
| 13 | 'command_execution', 'reasoning', 'file_change', 'file_search', 'web_search', 'dynamic_tool' |
| 14 | ) |
| 15 | `; |
| 16 | }); |