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

Function performQuickFix

src/cm/lsp/codeActions.ts:411–426  ·  view source on GitHub ↗
(view: EditorView)

Source from the content-addressed store, hash-verified

409}
410
411export async function performQuickFix(view: EditorView): Promise<boolean> {
412 const items = await fetchCodeActions(view);
413 if (!items.length) return false;
414
415 // Find preferred action or first quickfix
416 const quickFix =
417 items.find((i) => i.isPreferred) ??
418 items.find((i) => i.kind?.startsWith("quickfix"));
419
420 if (quickFix) {
421 return executeCodeAction(view, quickFix);
422 }
423
424 // Fall back to showing menu
425 return showCodeActionsMenu(view);
426}
427
428export { CODE_ACTION_KINDS, formatCodeActionKind, getCodeActionIcon };

Callers

nothing calls this directly

Calls 3

fetchCodeActionsFunction · 0.85
executeCodeActionFunction · 0.85
showCodeActionsMenuFunction · 0.85

Tested by

no test coverage detected