refactor(agent): unify request context routing
This commit is contained in:
1 parent
bb3b449e09
commit
42d7ad34a4
20 files changed
+363
-423
No files matched your search
@@ -32,7 +32,6 @@ class AgentTurnHookSpec:
|
||||
session_key: str | None = None
|
||||
workspace: Path | None = None
|
||||
tool_hint_max_length: int = 40
|
||||
set_tool_context: Callable[..., None] | None = None
|
||||
on_iteration: Callable[[int], None] | None = None
|
||||
registered_hook_factories: list[AgentTurnHookFactory] = field(default_factory=list)
|
||||
turn_hook_factories: list[AgentTurnHookFactory] = field(default_factory=list)
|
||||
@@ -48,13 +47,8 @@ def build_agent_turn_hook(spec: AgentTurnHookSpec) -> AgentHook:
|
||||
on_progress=spec.on_progress,
|
||||
on_stream=spec.on_stream,
|
||||
on_stream_end=spec.on_stream_end,
|
||||
channel=spec.channel,
|
||||
chat_id=spec.chat_id,
|
||||
message_id=spec.message_id,
|
||||
metadata=spec.metadata,
|
||||
session_key=spec.session_key,
|
||||
tool_hint_max_length=spec.tool_hint_max_length,
|
||||
set_tool_context=spec.set_tool_context,
|
||||
on_iteration=spec.on_iteration,
|
||||
)
|
||||
if spec.ephemeral and not spec.run_extra_hooks_for_ephemeral:
|
||||
|
||||
Reference in new issue
Block a user