Commit graph

514 commits

Author SHA1 Message Date
Cursor Agent
034d185770 Fix type check errors and CI
- Add re-exports: _is_gfm_table_header_line, _normalize_gfm_tables (discord_markdown)
- Add re-exports: _parse_allowed_channels, _get_discord (discord)
- Add re-exports: NetworkError, RetryAfter, TelegramError (telegram)
- Fix Python 3 except syntax (discord, discord_markdown, telegram_markdown, request_utils)
- Update test patches to messaging.platforms.* for moved modules

Co-authored-by: Ali Khokhar <alishahryar2@gmail.com>
2026-02-17 02:31:40 +00:00
Ali Khokhar
951eefec85
Merge pull request #34 from Alishahryar1/claude/code-review-architecture-tRi3B
Phase 7: Directory restructuring (messaging/ and tests/)
2026-02-16 18:27:19 -08:00
Cursor Agent
4b4f87515d Phase 7: Directory restructuring (messaging/ and tests/)
- Create messaging/platforms/ (base, discord, telegram, factory)
- Create messaging/rendering/ (discord_markdown, telegram_markdown)
- Create messaging/trees/ (data, repository, processor, queue_manager)
- Organize tests/ into api/, providers/, messaging/, cli/, config/
- Add backward-compatible re-exports at old locations
- Update handler.py and test_messaging_factory.py imports
- Fix Telegram type hints for TELEGRAM_AVAILABLE=False case
- Fix Python 3 except syntax in discord_markdown

Co-authored-by: Ali Khokhar <alishahryar2@gmail.com>
2026-02-17 02:25:42 +00:00
Alishahryar1
bf9f15b98b docs: Remove redundant PowerShell version guideline from coding environment documentation. 2026-02-16 18:18:23 -08:00
Alishahryar1
eaa81f5922 Updated Readme 2026-02-16 18:16:41 -08:00
Ali Khokhar
386ef0c0d9
Merge pull request #33 from Alishahryar1/claude/code-review-architecture-tRi3B
Update README: project structure, command order, provider extension docs
2026-02-16 18:11:57 -08:00
Cursor Agent
38a7980546 Update README: project structure, command order, provider extension docs
Co-authored-by: Ali Khokhar <alishahryar2@gmail.com>
2026-02-17 02:11:37 +00:00
Ali Khokhar
f39d1bf6bf
Merge pull request #32 from Alishahryar1/claude/code-review-architecture-tRi3B
Add architecture improvement plan from code review
2026-02-16 18:07:04 -08:00
Cursor Agent
adc04ebfc7 Improve AGENTS.md and CLAUDE.md per best practices
- Remove Windows machine claim
- Replace informal tone with professional CI language
- Add explicit CI check order (ruff format, ruff check, ty check, pytest)
- Tighten bullets, add backticks for commands
- Clarify vague instructions (execute incrementally, prefer built-in tools)
- Add sync note for duplication; bold workflow steps

Co-authored-by: Ali Khokhar <alishahryar2@gmail.com>
2026-02-17 02:06:00 +00:00
Cursor Agent
db1ae0fea9 Align AGENTS.md and CLAUDE.md with architecture plan principles
Add ARCHITECTURE PRINCIPLES section reflecting PLAN.md:
- Shared utilities, DRY, encapsulation, provider-specific config
- Dead code removal, performance, platform-agnostic naming
- No type ignores, backward compatibility
Fix typo: proapagate -> propagate

Co-authored-by: Ali Khokhar <alishahryar2@gmail.com>
2026-02-17 02:04:03 +00: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
Cursor Agent
72b7e34999 Phase 3: Fix encapsulation violations
- Add MessageTree.set_current_task() method
- Update tree_processor to use set_current_task instead of _current_task
- Move nim_settings out of ProviderConfig, pass only to NvidiaNimProvider
- Update api/dependencies and all tests

Co-authored-by: Ali Khokhar <alishahryar2@gmail.com>
2026-02-17 01:58:51 +00:00
Cursor Agent
bab86a2687 Phase 2: Extract OpenAICompatibleProvider base class
- Create providers/openai_compat.py with shared streaming logic
- Refactor NvidiaNimProvider, OpenRouterProvider, LMStudioProvider to extend it
- OpenRouter overrides _handle_extra_reasoning for reasoning_details
- Update test patches to providers.openai_compat

Co-authored-by: Ali Khokhar <alishahryar2@gmail.com>
2026-02-17 01:57:34 +00:00
Cursor Agent
d3f5f8877f Phase 1: Extract shared provider utils into providers/common/
- Create providers/common/ with sse_builder, message_converter, think_parser,
  heuristic_tool_parser, error_mapping
- Update nvidia_nim/utils and errors to re-export from common for backward compat
- Update all provider clients and tests to import from providers.common
- Remove duplicated files from nvidia_nim/utils/

Co-authored-by: Ali Khokhar <alishahryar2@gmail.com>
2026-02-17 01:55:38 +00:00
Claude
33e17092ce
Add architecture improvement plan from code review
Comprehensive 7-phase plan covering: shared provider utils extraction,
streaming base class, encapsulation fixes, dead code removal,
performance improvements, minor fixes, and directory restructuring.

https://claude.ai/code/session_01R3BN4qzAoJ21fQzSBnWCAY
2026-02-17 01:27:01 +00:00
Ali Khokhar
96553df53d
Update README.md 2026-02-16 16:29:18 -08: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
e4ae59511e Updated models list 2026-02-16 16:06:32 -08:00
Alishahryar1
8a16efc1b1 Included agents files for cloud agents 2026-02-16 16:04:15 -08:00
Alishahryar1
416664ed41 Renamed a check in workflow 2026-02-16 15:59:25 -08:00
Alishahryar1
b8d1bfecbb Improved test coverage 2026-02-16 15:58:16 -08:00
Alishahryar1
b4b902619d Merge branch 'main' of https://github.com/Alishahryar1/cc-nim 2026-02-16 15:34:34 -08:00
Alishahryar1
71cc814efb Add plans directory support to CLI session management
- Introduced `plans_directory` parameter in `CLISessionManager`, `CLISession`, and updated related methods to handle plan files.
- Updated `api/app.py` to pass the plans directory to the CLI session manager.
- Added a new test in `test_cli.py` to verify that the `--settings plansDirectory` argument is included when starting a task with a specified plans directory.
2026-02-16 15:34:26 -08:00
Ali Khokhar
c9b436b588
Remove GitHub stars and forks badges
Removed GitHub stars and forks badges from README.
2026-02-16 15:16:54 -08:00
Alishahryar1
6939b52bca removed support for nested subagent 2026-02-16 14:58:51 -08:00
Alishahryar1
0eb999a0c1 lint 2026-02-16 02:23:57 -08:00
Ali Khokhar
fad4b2468f
Merge pull request #27 from Alishahryar1/client-timeouts-new
Add configurable HTTP timeouts for provider API requests
2026-02-16 02:21:33 -08:00
Alishahryar1
01852e1638 Add configurable HTTP timeouts for provider API requests
Updated the README to include new timeout settings. Implemented these timeouts in the provider classes and added corresponding tests to ensure they are correctly passed to the client. Also included environment variable support for the new settings.
2026-02-16 01:40:15 -08:00
Ali Khokhar
5d46e116ca
Change model from 'moonshotai/kimi-k2-thinking' to 'stepfun-ai/step-3.5-flash'
Updated model references in the README file.
2026-02-16 00:29:32 -08:00
Ali Khokhar
ec21de55fc
Add link to browse free models 2026-02-16 00:24:15 -08:00
Ali Khokhar
e742ee0525
Add link to browse free models
Added a link to browse free models.
2026-02-16 00:23:23 -08:00
Alishahryar1
1cde6d425f lint 2026-02-16 00:20:28 -08:00
Alishahryar1
63e266027c update dependencies 2026-02-16 00:08:24 -08:00
Alishahryar1
6511542bfe Implement Discord bot support and update README for messaging platform changes 2026-02-16 00:08:09 -08:00
Alishahryar1
b53a1b20c5 lint 2026-02-15 23:55:57 -08:00
Alishahryar1
b6f870ffab Added space in example env 2026-02-15 23:53:42 -08:00
Alishahryar1
1d52e5d3bb Updated thinking keys 2026-02-15 23:49:54 -08:00
Alishahryar1
1b58160bc9 Removed unused library 2026-02-15 22:12:06 -08:00
Alishahryar1
1ea32e9d13 Updated README 2026-02-15 22:10:49 -08:00
Alishahryar1
47e5d4f969 Updated workflow 2026-02-15 22:05:47 -08:00
Alishahryar1
83bb1108ae Updated Readme 2026-02-15 22:03:14 -08:00
Alishahryar1
ad44594197 Added ruff check to workflow and fixed ruff check errors 2026-02-15 22:02:15 -08:00
Alishahryar1
539854fe7b Refactor done using GLM-5 2026-02-15 21:58:03 -08:00
Ali Khokhar
a336b0f3ae
Fix formatting issues in README diagram 2026-02-15 20:40:10 -08:00
Alishahryar1
5aa0865871 Updated README 2026-02-15 20:37:20 -08:00
Alishahryar1
4fb585ed5b added more tests 2026-02-15 19:50:06 -08:00
Alishahryar1
c97b2aaa55 Merge branch 'main' of https://github.com/Alishahryar1/cc-nim 2026-02-15 19:41:12 -08:00
Alishahryar1
b83be84313 Add LM Studio provider support
- Introduced `LMStudioProvider` to the provider system.
- Added a new fixture `lmstudio_provider` in `conftest.py` for testing.
- Updated `get_provider` function to handle `lmstudio` as a valid provider type.
- Enhanced README and `.env.example` to include LM Studio configuration details.
- Updated settings to accommodate LM Studio's base URL and provider type.
- Added tests to verify the functionality of the LM Studio provider.
2026-02-15 19:41:03 -08:00
Ali Khokhar
0eff83b4e7
Merge pull request #20 from Ahmet-Kaplan/patch-1
Change requires-python to >=3.14.2
2026-02-15 19:28:40 -08:00