File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,7 +181,9 @@ def from_provider_settings(
181181 "max_context_length" : int (ps .get ("max_context_length" , - 1 )),
182182 "dequeue_context_length" : int (ps .get ("dequeue_context_length" , 1 )),
183183 "llm_safety_mode" : bool (ps .get ("llm_safety_mode" , True )),
184- "safety_mode_strategy" : str (ps .get ("safety_mode_strategy" , "system_prompt" )),
184+ "safety_mode_strategy" : str (
185+ ps .get ("safety_mode_strategy" , "system_prompt" )
186+ ),
185187 "computer_use_runtime" : str (ps .get ("computer_use_runtime" , "local" )),
186188 "sandbox_cfg" : ps .get ("sandbox" , {}) or {},
187189 "add_cron_tools" : bool (proactive_cfg .get ("add_cron_tools" , True )),
Original file line number Diff line number Diff line change @@ -91,7 +91,9 @@ def build_skills_prompt(skills: list[SkillInfo]) -> str:
9191 name = "unknown-skill"
9292 description = str (getattr (skill , "description" , "" ) or "" ).strip ()
9393 # 清理换行符,防止 Indirect Prompt Injection
94- description = (description or "No description" ).replace ("\n " , " " ).replace ("\r " , " " )
94+ description = (
95+ (description or "No description" ).replace ("\n " , " " ).replace ("\r " , " " )
96+ )
9597 path = str (getattr (skill , "path" , "" ) or "" ).strip ()
9698 path = path or "<skills_root>/<skill_name>/SKILL.md"
9799 # 清理路径中的危险字符
You can’t perform that action at this time.
0 commit comments