19 Commits

Author SHA1 Message Date
Alishahryar1 f3a7528d49 Major refactor: API, providers, messaging, and Anthropic protocol
Consolidates the incremental refactor work into a single change set: modular web tools (api/web_tools), native Anthropic request building and SSE block policy, OpenAI conversion and error handling, provider transports and rate limiting, messaging handler and tree queue, safe logging, smoke tests, and broad test coverage.
2026-04-26 03:01:14 -07:00
Alishahryar1 302ee28585 Removed dead code 2026-03-01 04:21:06 -08:00
Ali Khokhar c4d8681000 Backup/before cleanup 20260222 230402 (#58) 2026-02-27 19:50:21 -08:00
Alishahryar1 b05d0d2703 new linter rules and fixes 2026-02-18 04:13:41 -08:00
Cursor Agent 794e64bba9 Fix ruff format for handler.py and session.py
Co-authored-by: Ali Khokhar <alishahryar2@gmail.com>
2026-02-17 02:03:04 +00:00
Cursor Agent bfc781e0ed Phase 4-6: Dead code removal, performance, minor fixes
Phase 4:
- Remove legacy SessionRecord, _sessions, _msg_to_session from SessionStore
- Fix hardcoded provider in root endpoint (use settings.provider_type)
- Update session store tests

Phase 5:
- Use list-based string accumulation in ThinkingSegment, TextSegment, ToolCallSegment
- Cache MAX_MESSAGE_LOG_ENTRIES_PER_CHAT at SessionStore init
- Use iterative DFS in MessageTree.get_descendants

Phase 6:
- Add comment for abstract async generator workaround in BaseProvider
- Rename TELEGRAM_EDIT log tags to PLATFORM_EDIT in handler

Co-authored-by: Ali Khokhar <alishahryar2@gmail.com>
2026-02-17 02:01:01 +00:00
Alishahryar1 6abcdb4017 Add clear command functionality to message handler
- Implemented handling of the `/clear` command to clear specific branches or entire trees based on message replies.
- Added tests for various scenarios of the clear command, including clearing branches, handling unknown replies, and clearing entire trees.
- Enhanced `TreeQueueManager` with methods to cancel branches and remove subtrees, ensuring proper state management in the session store.
- Updated `SessionStore` and `TreeRepository` to support removal of node mappings and trees, improving data integrity during clear operations.
2026-02-16 16:23:26 -08:00
Alishahryar1 539854fe7b Refactor done using GLM-5 2026-02-15 21:58:03 -08:00
Alishahryar1 7259b1def8 Optimized code in hot paths with z-ai/glm5 2026-02-14 19:59:46 -08:00
Alishahryar1 64e5b10612 Refactor done by z-ai/glm5 2026-02-14 18:47:26 -08:00
Alishahryar1 fabca59f5c lint 2026-02-13 17:24:18 -08:00
Alishahryar1 4ee0114891 Implemented /clear command 2026-02-13 16:24:52 -08:00
Alishahryar1 fcbe204f44 Major refactor done with kimi-k2.5 in claude code 2026-02-05 10:51:33 -08:00
Alishahryar1 8ce86f4267 fixed type errors 2026-01-31 14:13:09 -08:00
Alishahryar1 5fd7268d3f added tree based session handler 2026-01-29 18:17:42 -08:00
Alishahryar1 2c6b40012a fixed replies to pending incorrectly starting a new cli when they should be queued 2026-01-29 17:12:23 -08:00
Alishahryar1 e7b165b619 Revert "fixed telegram replies not being able to access context"
This reverts commit 368671dfe5.
2026-01-29 16:29:25 -08:00
Alishahryar1 368671dfe5 fixed telegram replies not being able to access context 2026-01-29 16:04:48 -08:00
Alishahryar1 8678a62915 Major refactor done by itself 2026-01-29 14:40:08 -08:00