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

Method addBlock

packages/testing/src/builders/workflow.builder.ts:45–53  ·  view source on GitHub ↗

* Adds a generic block to the workflow.

(id: string, type: string, position?: Position, name?: string)

Source from the content-addressed store, hash-verified

43 * Adds a generic block to the workflow.
44 */
45 addBlock(id: string, type: string, position?: Position, name?: string): this {
46 this.blocks[id] = createBlock({
47 id,
48 type,
49 name: name ?? id,
50 position: position ?? { x: 0, y: 0 },
51 })
52 return this
53 }
54
55 /**
56 * Adds a starter block (workflow entry point).

Callers 2

chainMethod · 0.95

Calls 1

createBlockFunction · 0.90

Tested by

no test coverage detected