Commit 1f6e2fb
authored
feat(core): StreamingChatAdapter for token-by-token Anthropic relay (#503)
## Summary
- `StreamingChatAdapter` in `codeframe/core/adapters/streaming_chat.py` wraps `anthropic.AsyncAnthropic().messages.stream()` and yields typed `ChatEvent` objects
- Replaces the echo stub in `session_chat_ws.py` (`_run_streaming_adapter`) with the real adapter
- Safe read-only tool set for interactive sessions: `read_file`, `list_files`, `search_codebase`
- History load/persist via `InteractiveSessionRepository`; tiktoken-based context truncation
- 18 unit tests; all 8 acceptance criteria from #503 verified
Closes #5031 parent 8eefe6f commit 1f6e2fb
5 files changed
Lines changed: 1109 additions & 21 deletions
File tree
- codeframe
- core/adapters
- ui/routers
- tests
- api
- core
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
1 | 7 | | |
2 | 8 | | |
3 | 9 | | |
| |||
17 | 23 | | |
18 | 24 | | |
19 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
20 | 30 | | |
21 | 31 | | |
22 | 32 | | |
| |||
0 commit comments