huskies: merge 962
This commit is contained in:
@@ -56,14 +56,15 @@ pub(super) fn validate_agent_stage(
|
||||
/// `start_agent` honour an explicit `agent: coder-opus` written by the
|
||||
/// `assign` command (bug 379). Returns `None` when an explicit agent_name
|
||||
/// was already supplied or when the story has no front-matter preference.
|
||||
pub(super) fn read_front_matter_agent(story_id: &str, agent_name: Option<&str>) -> Option<String> {
|
||||
pub(super) fn read_front_matter_agent(
|
||||
story_id: &str,
|
||||
agent_name: Option<&str>,
|
||||
) -> Option<crate::config::AgentName> {
|
||||
if agent_name.is_some() {
|
||||
return None;
|
||||
}
|
||||
// Story 929: the agent pin lives in the CRDT typed register; the
|
||||
// legacy YAML fallback is gone — post-891 every story has its CRDT
|
||||
// entry and any story without one has no pinned agent.
|
||||
crate::crdt_state::read_item(story_id)
|
||||
.and_then(|w| w.agent().map(str::to_string))
|
||||
.filter(|s| !s.is_empty())
|
||||
crate::crdt_state::read_item(story_id).and_then(|w| w.agent())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user