(runId: string)
| 180 | } |
| 181 | |
| 182 | export async function getRunSegment(runId: string) { |
| 183 | return withDbSpan( |
| 184 | TraceSpan.CopilotAsyncRunsGetRunSegment, |
| 185 | 'SELECT', |
| 186 | 'copilot_runs', |
| 187 | { [TraceAttr.RunId]: runId }, |
| 188 | async () => { |
| 189 | const [run] = await db |
| 190 | .select({ id: copilotRuns.id, userId: copilotRuns.userId }) |
| 191 | .from(copilotRuns) |
| 192 | .where(eq(copilotRuns.id, runId)) |
| 193 | .limit(1) |
| 194 | return run ?? null |
| 195 | } |
| 196 | ) |
| 197 | } |
| 198 | |
| 199 | async function createRunCheckpoint(input: { |
| 200 | runId: string |
no test coverage detected