aboutsummaryrefslogtreecommitdiff
path: root/agent/orchestrator/models
diff options
context:
space:
mode:
authorGuillermo Serrahima <dev@vylion.com>2026-07-02 09:23:54 +0200
committerGuillermo Serrahima <dev@vylion.com>2026-07-02 09:23:54 +0200
commit3113110c36e0a0352d8b5ba6222ea04b8087ec17 (patch)
tree4f64efb5a011314ddf19b8b6b2da6796b5659977 /agent/orchestrator/models
parent782d2e71295a2f92f1d349c8323878e81f371359 (diff)
downloadsenia-3113110c36e0a0352d8b5ba6222ea04b8087ec17.tar.xz
senia-3113110c36e0a0352d8b5ba6222ea04b8087ec17.zip
Added matrix comm channelHEADmain
Diffstat (limited to 'agent/orchestrator/models')
-rw-r--r--agent/orchestrator/models/base.py1
-rw-r--r--agent/orchestrator/models/claude_code.py10
2 files changed, 3 insertions, 8 deletions
diff --git a/agent/orchestrator/models/base.py b/agent/orchestrator/models/base.py
index 4ca1988..cdcbb5c 100644
--- a/agent/orchestrator/models/base.py
+++ b/agent/orchestrator/models/base.py
@@ -21,6 +21,7 @@ Role = Literal["system", "user", "assistant", "tool"]
class Message:
role: Role
content: str
+ name: str | None = None
@dataclass
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)