Skip to main content

Module code_actions

Module code_actions 

Source
Expand description

lsp_code_actions engine: quickfixes and refactoring suggestions.

The flow that makes this valuable for agents:

  1. Model writes code โ†’ passive injection reports an error
  2. Model calls lsp_code_actions(file, line) โ†’ gets back available fixes
  3. Model re-calls with apply_index to apply the chosen fix to disk

Without this, the model would need to manually figure out the fix from the diagnostic message โ€” slower and more error-prone.

Functionsยง

run_code_actions
List or apply code actions at a position.