feat: first cut at dev brain

This commit is contained in:
Georg Bauer
2026-07-27 21:16:10 +02:00
parent 56be87d288
commit cfc4fce8d7
14 changed files with 2119 additions and 141 deletions

View File

@@ -152,6 +152,7 @@ impl App {
self.project_name_input.clear();
self.error = None;
self.reload_projects();
self.invalidate_dev_brain_context();
self.refresh_git_state();
}
Err(error) => self.error = Some(error),
@@ -349,6 +350,21 @@ impl App {
}
}
}
pub(super) fn invalidate_dev_brain_context(&mut self) {
if !self.config.dev_brain.enabled {
return;
}
#[cfg(target_os = "macos")]
{
self.agent_tools = None;
for chat in self.background_chats.values_mut() {
chat.agent_tools = None;
chat.system_prompt_seen_at = 0;
}
}
self.system_prompt_seen_at = 0;
}
}
fn read_git_state(path: &Path) -> Option<GitState> {