huskies: merge 877
This commit is contained in:
@@ -15,11 +15,22 @@ pub(crate) async fn tool_start_agent(args: &Value, ctx: &AppContext) -> Result<S
|
||||
let agent_name = args.get("agent_name").and_then(|v| v.as_str());
|
||||
|
||||
let project_root = ctx.services.agents.get_project_root(&ctx.state)?;
|
||||
let info = ctx
|
||||
.services
|
||||
.agents
|
||||
.start_agent(&project_root, story_id, agent_name, None, None)
|
||||
.await?;
|
||||
// When an explicit agent_name is provided, persist the agent pin in the
|
||||
// CRDT register before starting — same path as the Matrix `assign` command.
|
||||
let info = if let Some(name) = agent_name {
|
||||
crate::service::work_item::assign_and_start(
|
||||
story_id,
|
||||
name,
|
||||
&project_root,
|
||||
&ctx.services.agents,
|
||||
)
|
||||
.await?
|
||||
} else {
|
||||
ctx.services
|
||||
.agents
|
||||
.start_agent(&project_root, story_id, None, None, None)
|
||||
.await?
|
||||
};
|
||||
|
||||
// Snapshot coverage baseline from the most recent coverage report (best-effort).
|
||||
if let Some(pct) = read_coverage_percent_from_json(&project_root)
|
||||
|
||||
Reference in New Issue
Block a user