MCPcopy Create free account
hub / github.com/cursorless-dev/cursorless / run

Method run

src/actions/ExtractVariable.ts:18–29  ·  view source on GitHub ↗
([targets]: [TypedSelection[]])

Source from the content-addressed store, hash-verified

16 }
17
18 async run([targets]: [TypedSelection[]]): Promise<ActionReturnValue> {
19 ensureSingleTarget(targets);
20
21 await this.graph.actions.setSelection.run([targets]);
22
23 await commands.executeCommand("editor.action.codeAction", {
24 kind: "refactor.extract.constant",
25 preferred: true,
26 });
27
28 return {};
29 }
30}

Callers

nothing calls this directly

Calls 2

ensureSingleTargetFunction · 0.90
runMethod · 0.65

Tested by

no test coverage detected