MCPcopy
hub / github.com/stackblitz/bolt.new / #executeAction

Method #executeAction

app/lib/runtime/action-runner.ts:98–122  ·  view source on GitHub ↗
(actionId: string)

Source from the content-addressed store, hash-verified

96 }
97
98 async #executeAction(actionId: string) {
99 const action = this.actions.get()[actionId];
100
101 this.#updateAction(actionId, { status: 'running' });
102
103 try {
104 switch (action.type) {
105 case 'shell': {
106 await this.#runShellAction(action);
107 break;
108 }
109 case 'file': {
110 await this.#runFileAction(action);
111 break;
112 }
113 }
114
115 this.#updateAction(actionId, { status: action.abortSignal.aborted ? 'aborted' : 'complete' });
116 } catch (error) {
117 this.#updateAction(actionId, { status: 'failed', error: 'Action failed' });
118
119 // re-throw the error to be caught in the promise chain
120 throw error;
121 }
122 }
123
124 async #runShellAction(action: ActionState) {
125 if (action.type !== 'shell') {

Callers 1

runActionMethod · 0.95

Calls 3

#updateActionMethod · 0.95
#runShellActionMethod · 0.95
#runFileActionMethod · 0.95

Tested by

no test coverage detected