Files
wehub-resource-sync e4dcfc49aa
Tests / Import Check (Python 3.13) (push) Has been cancelled
Tests / Import Check (Python 3.14) (push) Has been cancelled
Tests / Python Tests (Python 3.11) (push) Has been cancelled
Tests / Python Tests (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.14) (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled
Tests / Lint and Format (push) Has been cancelled
Tests / Web Node Tests (push) Has been cancelled
Tests / Import Check (Python 3.11) (push) Has been cancelled
Tests / Import Check (Python 3.12) (push) Has been cancelled
Tests / Python Tests (Python 3.13) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:00:43 +08:00

28 lines
1.0 KiB
Python

"""Agentic chat capability."""
from __future__ import annotations
from deeptutor.agents.chat.agentic_pipeline import CHAT_OPTIONAL_TOOLS, AgenticChatPipeline
from deeptutor.core.capability_protocol import BaseCapability, CapabilityManifest
from deeptutor.core.context import UnifiedContext
from deeptutor.core.stream_bus import StreamBus
from deeptutor.runtime.request_contracts import get_capability_request_schema
class ChatCapability(BaseCapability):
manifest = CapabilityManifest(
name="chat",
description=(
"Agentic chat: an exploring agent loop with tools, followed by "
"a respond stage that streams the answer."
),
stages=["exploring", "responding"],
tools_used=CHAT_OPTIONAL_TOOLS,
cli_aliases=["chat"],
request_schema=get_capability_request_schema("chat"),
)
async def run(self, context: UnifiedContext, stream: StreamBus) -> None:
pipeline = AgenticChatPipeline(language=context.language)
await pipeline.run(context, stream)