feat: enhance workspace management and history tracking in application state

This commit is contained in:
asepharyana
2026-07-12 18:09:03 +07:00
parent a59feb23c4
commit 8a11a469f9
12 changed files with 112 additions and 20 deletions
+2
View File
@@ -110,6 +110,8 @@ impl Default for ToolCtxBuilder {
impl ToolCtxBuilder {
/// Set the session directory.
pub fn session_dir(mut self, v: PathBuf) -> Self { self.session_dir = v; self }
/// Set the workspaces.
pub fn workspaces(mut self, v: Vec<PathBuf>) -> Self { self.workspaces = v; self }
/// Set the origin (main process vs. daemon-attached).
pub fn origin(mut self, v: crate::app::state::types::Origin) -> Self { self.origin = v; self }
/// Set the lsp_manager.
+4
View File
@@ -110,6 +110,8 @@ impl Tool for SpawnAgents {
max_concurrency,
true,
live.as_ref(),
&_ctx.session_dir,
&_ctx.workspaces,
)?;
format_results(results, "parallel")
}
@@ -193,6 +195,8 @@ impl Tool for SpawnPipeline {
1,
false,
live.as_ref(),
&_ctx.session_dir,
&_ctx.workspaces,
)?;
format_results(results, "pipeline")
}
+3 -1
View File
@@ -76,7 +76,9 @@ impl Tool for WorkflowRun {
})
.unwrap_or_default();
crate::app::workflow::engine::run_workflow(&workflow_script, &workflow_args)
crate::app::workflow::engine::run_workflow(
&workflow_script, &workflow_args, &_ctx.session_dir, &_ctx.workspaces,
)
}
}