diff options
Diffstat (limited to 'agent/orchestrator/models/claude_code.py')
| -rw-r--r-- | agent/orchestrator/models/claude_code.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/agent/orchestrator/models/claude_code.py b/agent/orchestrator/models/claude_code.py index c73df98..293de3e 100644 --- a/agent/orchestrator/models/claude_code.py +++ b/agent/orchestrator/models/claude_code.py @@ -52,17 +52,11 @@ class ClaudeCodeBackend(ModelBackend): return ModelResponse(content=result.stdout.strip()) def _format_prompt(self, request: ModelRequest) -> str: - """Flatten messages + dynamic context into a single prompt string. - - Claude Code's -p mode takes one big prompt, not a structured - conversation. We render the conversation as a readable transcript with - the per-turn context prepended. Persona is NOT here; Claude Code - finds it in the workspace itself. - """ parts = [] if request.turn_context: parts.append(f"## Context for this turn\n\n{request.turn_context}\n") for msg in request.messages: - parts.append(f"## {_ROLE_LABELS[msg.role]}\n\n{msg.content}\n") + label = msg.name or _ROLE_LABELS[msg.role] + parts.append(f"## {label}\n\n{msg.content}\n") parts.append("## Assistant\n\n") return "\n".join(parts) |
