mod events; mod usage; mod workspace; use std::path::PathBuf; use anyhow::Result; use crate::model::{SessionSource, SessionStream, TaskConfig}; use super::App; impl App { pub(super) fn open_workspace_from_task_file(&mut self, task_path: PathBuf) -> Result<()> { workspace::open_workspace_from_task_file(self, task_path) } pub(super) fn create_workspace_from_goal( &mut self, goal: String, model: String, fast_mode: bool, allow_branching: bool, ) -> Result<()> { workspace::create_workspace_from_goal_with_options( self, goal, model, fast_mode, allow_branching, ) } pub(super) fn open_workspace( &mut self, config: TaskConfig, persist_task_path: Option, ) -> Result<()> { workspace::open_workspace(self, config, persist_task_path) } pub(super) fn refresh_picker(&mut self) -> Result<()> { workspace::refresh_picker(self) } pub(super) fn drain_workspace_events(&mut self) -> Result<()> { events::drain_workspace_events(self) } pub(super) fn maybe_refresh_usage(&mut self) -> Result<()> { usage::maybe_refresh_usage(self) } pub(super) fn refresh_usage_now(&mut self) -> Result<()> { usage::refresh_usage_now(self) } pub(super) fn push_local_entry( &mut self, source: SessionSource, stream: SessionStream, title: &str, tag: Option, body: &str, ) { events::push_local_entry(self, source, stream, title, tag, body); } pub(super) fn shutdown_runtime(&mut self) { workspace::shutdown_runtime(self); } }