@@ -161,15 +161,11 @@ def _normalize_hint(value: str | None) -> str | None:
161161 return normalized or None
162162
163163
164- def _normalize_workflow_value (value : str | None ) -> str | None :
165- return _normalize_hint (value )
166-
167-
168164def _matches_workflow_hint (playbook_like , workflow_hint : str | None ) -> bool :
169165 if not workflow_hint :
170166 return True
171- title = _normalize_workflow_value (getattr (playbook_like , "title" , "" )) or ""
172- session_type = _normalize_workflow_value (getattr (playbook_like , "session_type" , None ))
167+ title = _normalize_hint (getattr (playbook_like , "title" , "" )) or ""
168+ session_type = _normalize_hint (getattr (playbook_like , "session_type" , None ))
173169 return workflow_hint in title or workflow_hint == session_type
174170
175171
@@ -248,7 +244,7 @@ def _build_session_start_recommendations_section(
248244 for recommendation in model_recommendations
249245 if not workflow_hint
250246 or not recommendation .workflow_archetype
251- or _normalize_workflow_value (recommendation .workflow_archetype ) == workflow_hint
247+ or _normalize_hint (recommendation .workflow_archetype ) == workflow_hint
252248 ]
253249 if matching_models :
254250 recommendation = matching_models [0 ]
@@ -382,7 +378,7 @@ def get_session_start_brief(
382378 brief_type = "session_start" ,
383379 context_summary = _context_summary (
384380 project_name = project_name ,
385- workflow_hint = normalized_workflow_hint ,
381+ workflow_hint = workflow_hint ,
386382 task_hint = task_hint ,
387383 ),
388384 )
0 commit comments