-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Currently some aspect of the code need some love as the maintability is starting to sufffer.
I have identified a couple of acpect where we should iomprove the code
- Split state.lua in multiple smaller slices (ui, jobs, model, session, etc) with functions to update the state, this way we can manage transitions in the state rather than doing it everywhere.
- Split api.lua into commands.lua (:Opencode routing), slash_commands.lua, and api.lua (public action functions).
- Split renderer.lua -- extract event subscription setup, permission/question coordination, and message formatting into separate concerns.
- Deduplicate shared code -- extract set_win_option/set_buf_option and update_winbar_highlights into shared utility modules.
- Make file_picker.lua use base_picker.lua instead of its own parallel implementation.
- Core isn't feature-agnostic: core.lua / api.lua have feature-specific logic baked in — diff functions, markdown renderer detection (RenderMarkdown/Markview), footer mode hardcoded to only recognize build/plan.
Here is a list of the Associated PR for this
State refactor
#321
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels