Tags: qiniu/codeagent
Tags
实现 Issue #287: docs:make current code comment & design doc to english (… …#295) * Initial plan for Issue #287: docs:make current code comment & design doc to english * docs: translate code comments and design docs to English Translate Chinese comments and documentation to English across the codebase to improve international collaboration and accessibility. Key changes: - Translate function/method comments in internal/agent/agent.go - Translate Chinese AI prompts and user-facing messages to English - Translate comments in internal/webhook/handler.go and internal/context/template_generator.go - Create English versions of core documentation: - docs/codeagent-v0.5-en.md (architecture and features) - docs/deploy_guide_en.md (comprehensive deployment guide) - Maintain technical accuracy while following English documentation standards - Ensure consistent terminology throughout all translated content This makes the codebase accessible to English-speaking developers and enables better international open source collaboration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> Closes #287 * docs: continue translating Chinese comments to English Continue comprehensive translation of Chinese content to English throughout the codebase to improve international accessibility and collaboration. Additional changes in this iteration: - Translate remaining Chinese comments in core Go files: - internal/modes/tag_handler.go (event handling logic) - internal/workspace/manager.go (workspace management) - internal/github/client.go (Git operations) - internal/code/claude_docker.go (Docker implementation) - pkg/models/events.go (event type definitions) - Create complete English system design documentation: - docs/codeagent-v0.1-en.md (comprehensive v0.1 architecture guide) - Translate function documentation, inline comments, and technical explanations - Maintain technical accuracy while following English documentation standards This builds upon previous translation work and systematically addresses the extensive Chinese content identified in the codebase (estimated 2000+ instances across 50+ files). 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> Closes #287 * docs: complete English translations for remaining docs Complete the translation of all remaining Chinese documentation files in the docs directory to improve international accessibility. Added comprehensive English translations for: - docs/codeagent-v0.2-en.md: Background, process flow, and technical specifications - docs/codeagent-v0.3-en.md: Local CLI mode, architecture optimization, and dual-mode support - docs/codeagent-v0.4-en.md: Git worktree-based workspace management design Key improvements: - Complete documentation coverage for all versions (v0.1-v0.5) - Professional English technical writing standards - Consistent terminology across all version documents - Preserved code examples and architectural details - Enhanced international developer accessibility The docs directory now provides comprehensive English documentation for the entire codebase evolution, supporting global open source collaboration. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> Closes #287 --------- Co-authored-by: qiniu-ci <[email protected]>
实现 Issue #184: 支持通过交互式来使用Claude docker姿势 (#185) * Initial plan for Issue #184: 支持通过交互式来使用Claude docker姿势 * feat: add interactive Docker mode support for Claude Implement interactive Docker mode to enable full context management capabilities when using Claude Docker, similar to native CLI usage. Key changes: - Add ClaudeInteractive implementation with persistent container connections - Support streaming communication and session management - Add Interactive config option with environment variable support - Enhance factory pattern with interactive mode selection logic - Extract shared Docker utilities to avoid code duplication - Update start script with -i/--interactive flag support Technical features: - Persistent container connections to avoid restart overhead - Session management with context preservation - Stream response processing with automatic container reuse - Complete error handling and timeout controls Usage: ./scripts/start.sh -p claude -d -i 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> Closes #184 * feat: implement interactive PTY mode for Claude Docker Replace pipe-based Docker communication with PTY (pseudo-terminal) to enable full Claude Code interactive features. This allows proper context management and terminal-based tool usage within Docker containers. Key changes: - Added PTY master/slave device creation with proper system calls - Updated Docker command to use -it flag for TTY allocation - Enhanced response handling with timeout and completion detection - Improved session lifecycle management with context cancellation - Added terminal environment setup (TERM=xterm-256color) This enables the same interactive experience as native Claude Code CLI while running in Docker containers, supporting all terminal-based features and context management capabilities. Closes #184 * fix(codeagent): support relative dir as work dir (#190) * fix(codeagent): support relative dir as work dir * fix(codeagent): support interactive mode * fix(codeagent): claude support bash url and api key env * fix(codeagent): adjust interactive way * fix(codeagent): adjust interactive way --------- Co-authored-by: qiniu-ci <[email protected]> Co-authored-by: Changjun Ji <[email protected]>
实现 Issue #141: 支持Code Review场景下,一次性提交多个review comments的场景 (#145) * Initial plan for Issue #141: 支持Code Review场景下,一次性提交多个review comments的场景 * feat: support batch processing of multiple review comments Support scenario where reviewers submit multiple pending review comments and then use "/continue" or "/fix" commands in the final review submission. The system now handles pull_request_review events with "/continue" or "/fix" commands by: - Collecting all review comments associated with the review ID - Preserving code position information (file paths, line numbers) - Building complete context for AI to process all issues at once - Responding via PR comment instead of individual review comments Key improvements: - Added GitHub client methods to fetch PR reviews and review comments - Enhanced webhook handler to process pull_request_review events - Implemented batch processing in agent with position-aware context - Supports both multi-comment reviews and review-body-only scenarios Closes #141 * Looking at the issue information and changes, I'll generate a conventional commit message for this code review batch processing feature: feat: support batch processing of multiple review comments Add support for processing multiple review comments at once when reviewer submits "/continue" or "/fix" commands. The system now: - Creates a processing status comment with @user mention when command is received - Collects all review comments from the same review ID with position information - Processes all comments together in a single AI request with complete context - Updates the initial comment with results instead of creating multiple comments - Maintains code line position information for accurate context This enables reviewers to submit multiple pending comments and have the AI agent fix all issues in one batch operation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * fix: add missing fmt import in webhook handler Support batch processing of code review comments in pull request reviews. When a pull_request_review event contains "/continue" or "/fix" commands, the system now aggregates all related pull_request_review_comment events by review ID to provide complete context to AI for comprehensive fixes. Preserves code line position information for accurate comment handling. Closes #141 * feat: add batch processing support for multiple review comments Support batch processing of multiple review comments in code review scenarios. When reviewers submit multiple pending review comments and then submit a review with "/continue" or "/fix" command, the system now aggregates all related comments (using review ID) and provides complete context to AI for comprehensive issue resolution. Key changes: - Handle pull_request_review events with "/continue" or "/fix" commands - Aggregate related pull_request_review_comment events by review ID - Preserve code position information (line numbers) for each comment - Provide complete context to AI for batch processing of all issues Fixed gofmt formatting issues in agent.go and handler.go. Closes #141 * feat: support batch processing of multiple review comments Implement batch processing for Code Review scenarios where reviewers submit multiple pending review comments and then use "/continue" or "/fix" commands to trigger AI fixes for all comments at once. Key improvements: - Remove unnecessary status comment creation to save GitHub API quota - Process all review comments associated with a review ID as a single batch - Preserve code position information for each review comment - Include @user mentions in AI feedback responses - Clean up unused comment update functions and streamline interaction flow The system now handles pull_request_review events with "/continue" or "/fix" commands by collecting all associated pull_request_review_comment events (linked by review ID) and providing complete context to AI for comprehensive issue resolution. Closes #141 * refactor: consolidate review comment processing logic Remove duplicate processReviewOnlyWithTriggerUser method and unify the handling of review events with or without comments. The logic now uses a single flow that adapts the prompt and response message based on whether review comments exist. Key changes: - Removed processReviewOnlyWithTriggerUser method to eliminate duplication - Unified processing logic in ProcessPRFromReviewWithTriggerUser - Adjusted prompt format based on comment count (Review vs batch comments) - Streamlined response messages for different scenarios - Cleaned up unused methods in github client Closes #141 * refactor: remove unused ProcessPRFromReview method Remove the unused ProcessPRFromReview method from agent.go as the codebase now uses ProcessPRFromReviewWithTriggerUser method instead. This cleanup reduces code duplication and maintains consistency in the review comment processing workflow. Closes #141 * refactor: remove redundant position info text in prompts Remove "确保保留代码的位置信息" from four prompt statements in batch code review processing. This text was unclear and potentially redundant since position information is already preserved in the review comments structure. Closes #141 * feat: support batch processing of multiple review comments in Code Review scenarios Add support for processing multiple review comments submitted together during code review. When a reviewer submits multiple pending review comments followed by a "/continue" or "/fix" command in the final review submission, the system now: - Detects pull_request_review events with "/continue" or "/fix" prefix - Aggregates related pull_request_review_comment events using review ID - Preserves code line position information for each comment - Provides complete context to AI for comprehensive issue resolution This enhancement allows AI to address all review feedback in a single iteration rather than processing comments individually. Closes #141 --------- Co-authored-by: qiniu-ci <[email protected]> Co-authored-by: Claude <[email protected]>
实现 Issue #132: 遵循最佳实践,确保主仓库和工作树目录保持代码最新 (#133) * Initial plan for Issue #132: 遵循最佳实践,确保主仓库和工作树目录保持代码最新 * feat: implement main repository sync with git worktree best practices Ensure main repository and worktree directories stay up-to-date following git best practices. This prevents code conflicts and outdated bases when creating new worktrees for concurrent PR processing. Key improvements: - Auto-update main repository before creating worktrees - Configure rebase as default pull strategy to maintain clean commit history - Add periodic background sync routine for all main repositories - Improve worktree code sync with rebase-first approach and conflict handling - Support concurrent multi-PR processing with safe code synchronization The workspace management mechanism now follows git and git worktree engineering best practices, ensuring reliable concurrent task execution. Closes #132 * refactor: remove periodic main repo sync routine Remove automatic 30-minute sync mechanism for main repositories to reduce unnecessary network traffic. The cleanup routine and other core functionality remain intact. - Remove StartMainRepoUpdateRoutine call from agent initialization - Delete StartMainRepoUpdateRoutine function definition - Remove EnsureAllMainRepositoriesUpToDate method This change eliminates bandwidth waste while preserving manual sync capabilities and existing workspace management features. Closes #132 --------- Co-authored-by: qiniu-ci <[email protected]>
refactor(codeagent): reorganize the directory structure of workspace (#… …93) * refactor(codeagent): reorganize the directory structure of workspace * Initial plan for Issue #11: 测试任务1 * Initial plan for Issue #11: 测试任务1 * Initial plan for Issue #11: 测试任务1 * refactor(codeagent): reorganize the directory structure of workspace