diff --git a/conductor/tracks/cull_hidden_prompts_20260502/plan.md b/conductor/tracks/cull_hidden_prompts_20260502/plan.md index 44a747d..881d192 100644 --- a/conductor/tracks/cull_hidden_prompts_20260502/plan.md +++ b/conductor/tracks/cull_hidden_prompts_20260502/plan.md @@ -7,12 +7,12 @@ - [x] Task: Conductor - User Manual Verification 'Phase 1: Audit and Identification' (Protocol in workflow.md) ## Phase 2: Expose Necessary Prompts in GUI -- [ ] Task: Modify `src/gui_2.py` to add new editable text areas in the "AI Settings" or "Project Settings" panel. - - [ ] Create fields for global system tool instructions. - - [ ] Create fields for project-specific context markers. -- [ ] Task: Update `src/app_controller.py` state initialization to load these new fields from `config.toml` and `manual_slop.toml`. -- [ ] Task: Ensure changes are correctly saved and flushed to the project files via `_flush_to_project()` and `_flush_to_config()`. -- [ ] Task: Conductor - User Manual Verification 'Phase 2: Expose Necessary Prompts in GUI' (Protocol in workflow.md) +- [x] Task: Modify `src/gui_2.py` to add new editable text areas in the "AI Settings" or "Project Settings" panel. + - [x] Create fields for global system tool instructions. + - [x] Create fields for project-specific context markers. +- [x] Task: Update `src/app_controller.py` state initialization to load these new fields from `config.toml` and `manual_slop.toml`. +- [x] Task: Ensure changes are correctly saved and flushed to the project files via `_flush_to_project()` and `_flush_to_config()`. +- [x] Task: Conductor - User Manual Verification 'Phase 2: Expose Necessary Prompts in GUI' (Protocol in workflow.md) ## Phase 3: Cull and Integrate Configured Prompts - [ ] Task: Update `src/ai_client.py`'s `_get_combined_system_prompt()` to utilize the user-configured tool instructions from the AppController state instead of hardcoded strings. diff --git a/src/app_controller.py b/src/app_controller.py index 3846247..18ace73 100644 --- a/src/app_controller.py +++ b/src/app_controller.py @@ -2489,6 +2489,7 @@ class AppController: "active_preset": self.ui_global_preset_name, } self.config["ai"]["system_prompt"] = self.ui_global_system_prompt + self.config["ai"]["tool_instructions"] = self.ui_global_tool_instructions self.config["projects"] = {"paths": self.project_paths, "active": self.active_project_path} from src import bg_shader # Update gui section while preserving other keys like bg_shader_enabled diff --git a/src/gui_2.py b/src/gui_2.py index e6d273d..4b2587a 100644 --- a/src/gui_2.py +++ b/src/gui_2.py @@ -4275,8 +4275,12 @@ def hello(): imgui.set_item_tooltip("Open preset management modal") ch, self.ui_global_system_prompt = imgui.input_text_multiline("##gsp", self.ui_global_system_prompt, imgui.ImVec2(-1, 100)) imgui.separator() - imgui.text("Project System Prompt") - current_project = self.controller.ui_project_preset_name or "Select Preset..." + imgui.text("Global Tool Instructions") + ch, self.ui_global_tool_instructions = imgui.input_text_multiline("##gti", getattr(self, "ui_global_tool_instructions", ""), imgui.ImVec2(-1, 100)) + if imgui.is_item_hovered(): + imgui.set_tooltip("Instructions given to the agent about how to use its tools.") + imgui.separator() + imgui.text("Project System Prompt") current_project = self.controller.ui_project_preset_name or "Select Preset..." imgui.set_next_item_width(200) if imgui.begin_combo("##project_preset", current_project): for name in preset_names: