Files
meeting-room/.tasks/v2-p1-api-client.md
vitya 52e77bb50c feat: v2 plan — remove autogen/crewai, add tasks and wiki
- Remove autogen and crewai backends (focus on custom only)
- Simplify CLI: remove --backend flag
- Remove optional deps from pyproject.toml
- Add .tasks/ with 7 tasks for Phase 1 refactor
- Add .wiki/concepts/meeting-room-v2.md with architecture plan
- Update .wiki/index.md and .tasks/STATUS.md

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 23:42:39 +03:00

25 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# v2-p1-api-client
## Goal
Рефактор api_client.py: класс APIClient вместо модульных глобалов, chat_stream() возвращает текст вместо печати, обратная совместимость через обёртки.
## Key files
- `meeting_room/api_client.py` — изменить
- `tests/test_api_client.py` — создать
## Decisions log
- 2026-05-03: Обратная совместимость через module-level функции-делегаты
## Open questions
- [ ]
## Completed steps
- [ ] Создать класс APIClient с __init__(providers: dict[str, ProviderConfig])
- [ ] Перенести chat() и chat_stream() как instance methods
- [ ] chat_stream() возвращает str, не печатает
- [ ] Добавить module-level init_providers(), chat(), chat_stream() как обёртки над default instance
- [ ] Написать тесты с mocked httpx
- [ ] Запустить тесты
## Notes
Критическое изменение: chat_stream() должен возвращать текст, а не печатать в stdout. Печать — ответственность вызывающего (CLI или WebSocket).