MCPcopy Index your code
hub / github.com/simstudioai/sim / getRunSegment

Function getRunSegment

apps/sim/lib/copilot/async-runs/repository.ts:182–197  ·  view source on GitHub ↗
(runId: string)

Source from the content-addressed store, hash-verified

180}
181
182export 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
199async function createRunCheckpoint(input: {
200 runId: string

Callers 1

route.tsFile · 0.90

Calls 2

withDbSpanFunction · 0.85
eqFunction · 0.50

Tested by

no test coverage detected