Files
manual_slop/scripts/tasks/tool_preset_modal.toml

17 lines
1.0 KiB
TOML

prompt = """
In src/gui_2.py:
1. In 'App.__init__', initialize tool preset editing state:
self._editing_tool_preset_name = ''
self._editing_tool_preset_categories = {}
self._editing_tool_preset_scope = 'project'
self._selected_tool_preset_idx = -1
2. Implement 'App._render_tool_preset_manager_modal(self)'. Use 'imgui.begin_popup_modal("Tool Preset Manager", self.show_tool_preset_manager_modal)'.
3. The modal should have a split layout using child regions:
- Left (fixed width): Listbox of all tool presets from 'self.controller.tool_presets'.
- Right (flexible): Fields to edit name, scope (radio), and a tree-view to manage categories and tools.
4. For each category in editing state, show tools. Since we can't easily add NEW tools to categories in this UI yet, focus on editing the approval of EXISTING tools in the category.
5. Add 'Save' and 'Delete' buttons that call 'self.controller._cb_save_tool_preset' and 'self.controller._cb_delete_tool_preset'.
6. Call '_render_tool_preset_manager_modal' in '_gui_func'.
Use 1-space indentation.
"""