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

Function indexWorkflowEntries

apps/sim/stores/terminal/console/store.ts:154–170  ·  view source on GitHub ↗
(
  workflowId: string,
  entries: ConsoleEntry[],
  entryIdsByBlockExecution: Record<string, string[]>,
  entryLocationById: Record<string, ConsoleEntryLocation>
)

Source from the content-addressed store, hash-verified

152}
153
154function indexWorkflowEntries(
155 workflowId: string,
156 entries: ConsoleEntry[],
157 entryIdsByBlockExecution: Record<string, string[]>,
158 entryLocationById: Record<string, ConsoleEntryLocation>
159): void {
160 entries.forEach((entry, index) => {
161 entryLocationById[entry.id] = { workflowId, index }
162 const blockExecutionKey = getBlockExecutionKey(entry.blockId, entry.executionId)
163 const existingIds = entryIdsByBlockExecution[blockExecutionKey]
164 if (existingIds) {
165 entryIdsByBlockExecution[blockExecutionKey] = [...existingIds, entry.id]
166 } else {
167 entryIdsByBlockExecution[blockExecutionKey] = [entry.id]
168 }
169 })
170}
171
172function rebuildWorkflowStateMaps(workflowEntries: Record<string, ConsoleEntry[]>) {
173 const entryIdsByBlockExecution: Record<string, string[]> = {}

Callers 2

rebuildWorkflowStateMapsFunction · 0.85
replaceWorkflowEntriesFunction · 0.85

Calls 1

getBlockExecutionKeyFunction · 0.85

Tested by

no test coverage detected