MCPcopy
hub / github.com/stackblitz/bolt.new / runAction

Method runAction

app/lib/runtime/action-runner.ts:75–96  ·  view source on GitHub ↗
(data: ActionCallbackData)

Source from the content-addressed store, hash-verified

73 }
74
75 async runAction(data: ActionCallbackData) {
76 const { actionId } = data;
77 const action = this.actions.get()[actionId];
78
79 if (!action) {
80 unreachable(`Action ${actionId} not found`);
81 }
82
83 if (action.executed) {
84 return;
85 }
86
87 this.#updateAction(actionId, { ...action, ...data.action, executed: true });
88
89 this.#currentExecutionPromise = this.#currentExecutionPromise
90 .then(() => {
91 return this.#executeAction(actionId);
92 })
93 .catch((error) => {
94 console.error('Action failed:', error);
95 });
96 }
97
98 async #executeAction(actionId: string) {
99 const action = this.actions.get()[actionId];

Callers

nothing calls this directly

Calls 3

#updateActionMethod · 0.95
#executeActionMethod · 0.95
unreachableFunction · 0.90

Tested by

no test coverage detected