MCPcopy Create free account
hub / github.com/ShipSecAI/studio / upsertIntoRuns

Function upsertIntoRuns

frontend/src/store/runStore.ts:141–153  ·  view source on GitHub ↗
(runs: ExecutionRun[], run: ExecutionRun)

Source from the content-addressed store, hash-verified

139};
140
141const upsertIntoRuns = (runs: ExecutionRun[], run: ExecutionRun) => {
142 const existingIndex = runs.findIndex((item) => item.id === run.id);
143 if (existingIndex === -1) {
144 return sortRuns([...runs, run]);
145 }
146 const updated = [...runs];
147 updated[existingIndex] = {
148 ...updated[existingIndex],
149 ...run,
150 status: run.status,
151 };
152 return sortRuns(updated);
153};
154
155export const useRunStore = create<RunStore>()(
156 subscribeWithSelector((set, get) => ({

Callers 1

runStore.tsFile · 0.85

Calls 1

sortRunsFunction · 0.85

Tested by

no test coverage detected