Implement CYA-WP-0008 llm-connect adapter integration.
Wire LLMConnectAdapter behind the existing LLMAdapter seam with config-driven selection, graceful degradation, --offline mode, and bounded session context. Add unit tests, integration docs, and update README/SCOPE/AGENTS.
This commit is contained in:
parent
cd5db14fbf
commit
019f6e7dc7
17 changed files with 800 additions and 19 deletions
22
tests/test_llm_prompt.py
Normal file
22
tests/test_llm_prompt.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
"""Prompt builder tests."""
|
||||
|
||||
from cya.llm.adapter import AssistanceRequest
|
||||
from cya.llm.prompt import build_assistance_prompt
|
||||
|
||||
|
||||
def test_build_assistance_prompt_includes_context_and_request():
|
||||
system, user = build_assistance_prompt(
|
||||
AssistanceRequest(
|
||||
user_request="list files",
|
||||
context={
|
||||
"cwd": "/home/user/proj",
|
||||
"session_turns": [{"user": "hi", "assistant": "hello"}],
|
||||
"memory": {"items": [{"kind": "preference", "key": "style", "value": "concise"}]},
|
||||
},
|
||||
)
|
||||
)
|
||||
assert "cya" in system.lower()
|
||||
assert "list files" in user
|
||||
assert "/home/user/proj" in user
|
||||
assert "hi" in user
|
||||
assert "concise" in user
|
||||
Loading…
Add table
Add a link
Reference in a new issue