fix: slim down token usage
This commit is contained in:
56
src/app/runtime/mod.rs
Normal file
56
src/app/runtime/mod.rs
Normal file
@@ -0,0 +1,56 @@
|
||||
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) -> Result<()> {
|
||||
workspace::create_workspace_from_goal(self, goal)
|
||||
}
|
||||
|
||||
pub(super) fn open_workspace(
|
||||
&mut self,
|
||||
config: TaskConfig,
|
||||
persist_task_path: Option<PathBuf>,
|
||||
) -> 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 push_local_entry(
|
||||
&mut self,
|
||||
source: SessionSource,
|
||||
stream: SessionStream,
|
||||
title: &str,
|
||||
tag: Option<String>,
|
||||
body: &str,
|
||||
) {
|
||||
events::push_local_entry(self, source, stream, title, tag, body);
|
||||
}
|
||||
|
||||
pub(super) fn shutdown_runtime(&mut self) {
|
||||
workspace::shutdown_runtime(self);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user