MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / requestCodeActions

Function requestCodeActions

src/cm/lsp/codeActions.ts:71–93  ·  view source on GitHub ↗
(
	plugin: LSPPlugin,
	range: LspRange,
	diagnostics: Diagnostic[] = [],
)

Source from the content-addressed store, hash-verified

69}
70
71async function requestCodeActions(
72 plugin: LSPPlugin,
73 range: LspRange,
74 diagnostics: Diagnostic[] = [],
75): Promise<CodeActionResponse> {
76 const context: CodeActionContext = {
77 diagnostics,
78 triggerKind: 1, // CodeActionTriggerKind.Invoked
79 };
80
81 return plugin.client.request<
82 {
83 textDocument: { uri: string };
84 range: LspRange;
85 context: CodeActionContext;
86 },
87 CodeActionResponse
88 >("textDocument/codeAction", {
89 textDocument: { uri: plugin.uri },
90 range,
91 context,
92 });
93}
94
95async function resolveCodeAction(
96 plugin: LSPPlugin,

Callers 1

fetchCodeActionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected