(view: EditorView)
| 409 | } |
| 410 | |
| 411 | export 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 | |
| 428 | export { CODE_ACTION_KINDS, formatCodeActionKind, getCodeActionIcon }; |
nothing calls this directly
no test coverage detected