源码: conversation.rs:408-424
(
messages: list[str],
output: str,
denied: bool,
)
| 215 | # ============================================================ |
| 216 | |
| 217 | def merge_hook_feedback( |
| 218 | messages: list[str], |
| 219 | output: str, |
| 220 | denied: bool, |
| 221 | ) -> str: |
| 222 | """源码: conversation.rs:408-424""" |
| 223 | if not messages: |
| 224 | return output |
| 225 | |
| 226 | sections: list[str] = [] |
| 227 | if output.strip(): |
| 228 | sections.append(output) |
| 229 | |
| 230 | label = "Hook feedback (denied)" if denied else "Hook feedback" |
| 231 | sections.append(f"{label}:\n{chr(10).join(messages)}") |
| 232 | return "\n\n".join(sections) |
| 233 | |
| 234 | |
| 235 | # ============================================================ |
no test coverage detected