diff options
| author | Guillermo Serrahima <dev@vylion.com> | 2026-07-02 09:23:54 +0200 |
|---|---|---|
| committer | Guillermo Serrahima <dev@vylion.com> | 2026-07-02 09:23:54 +0200 |
| commit | 3113110c36e0a0352d8b5ba6222ea04b8087ec17 (patch) | |
| tree | 4f64efb5a011314ddf19b8b6b2da6796b5659977 /agent/orchestrator/models/claude_code.py | |
| parent | 782d2e71295a2f92f1d349c8323878e81f371359 (diff) | |
| download | senia-main.tar.xz senia-main.zip | |
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) |
