Commit Graph

174 Commits

Author SHA1 Message Date
catlog22
abce912ee5 feat(frontend): implement comprehensive API Settings Management Interface
Implement a complete API Management Interface for React frontend with split-
panel layout, migrating all features from legacy JS frontend.

New Features:
- API Settings page with 5 tabs: Providers, Endpoints, Cache, Model Pools, CLI Settings
- Provider Management: CRUD operations, multi-key rotation, health checks, test connection
- Endpoint Management: CRUD operations, cache strategy configuration, enable/disable toggle
- Cache Settings: Global configuration, statistics display, clear cache functionality
- Model Pool Management: CRUD operations, auto-discovery feature, provider exclusion
- CLI Settings Management: Provider-based and Direct modes, full CRUD support
- Multi-Key Settings Modal: Manage API keys with rotation strategies and weights
- Manage Models Modal: View and manage models per provider (LLM and Embedding)
- Sync to CodexLens: Integration handler for provider configuration sync

Technical Implementation:
- Created 12 new React components in components/api-settings/
- Extended lib/api.ts with 460+ lines of API client functions
- Created hooks/useApiSettings.ts with 772 lines of TanStack Query hooks
- Added RadioGroup UI component for form selections
- Implemented unified error handling with useNotifications across all operations
- Complete i18n support (500+ keys in English and Chinese)
- Route integration (/api-settings) and sidebar navigation

Code Quality:
- All acceptance criteria from plan.json verified
- Code review passed with Gemini (all 7 IMPL tasks complete)
- Follows existing patterns: Shadcn UI, TanStack Query, react-intl, Lucide icons
2026-02-01 23:58:04 +08:00
catlog22
690597bae8 fix(cli): fix codex review command argument handling
- Fix prompt incorrectly passed to codex review with target flags (--uncommitted/--base/--commit)
- Remove unsupported --skip-git-repo-check flag from codex review command
- Fix TypeScript type error in codex-lens.ts (missing 'installed' property)

Codex CLI constraint: --uncommitted/--base/--commit and [PROMPT] are mutually exclusive.
2026-02-01 23:51:58 +08:00
catlog22
e5252f8a77 feat: add useApiSettings hook for managing API settings, including providers, endpoints, cache, and model pools
- Implemented hooks for CRUD operations on providers and endpoints.
- Added cache management hooks for cache stats and settings.
- Introduced model pool management hooks for high availability and load balancing.
- Created localization files for English and Chinese translations of API settings.
2026-02-01 23:14:55 +08:00
catlog22
345437415f Add end-to-end tests for workspace switching and backend tests for ask_question tool
- Implemented E2E tests for workspace switching functionality, covering scenarios such as switching workspaces, data isolation, language preference maintenance, and UI updates.
- Added tests to ensure workspace data is cleared on logout and handles unsaved changes during workspace switches.
- Created comprehensive backend tests for the ask_question tool, validating question creation, execution, answer handling, cancellation, and timeout scenarios.
- Included edge case tests to ensure robustness against duplicate questions and invalid answers.
2026-01-31 16:02:20 +08:00
catlog22
715ef12c92 feat(a2ui): Implement A2UI backend with question handling and WebSocket support
- Added A2UITypes for defining question structures and answers.
- Created A2UIWebSocketHandler for managing WebSocket connections and message handling.
- Developed ask-question tool for interactive user questions via A2UI.
- Introduced platformUtils for platform detection and shell command handling.
- Centralized TypeScript types in index.ts for better organization.
- Implemented compatibility checks for hook templates based on platform requirements.
2026-01-31 15:27:12 +08:00
catlog22
3f46a02df3 feat(cli): add settings file support for builtin Claude
- Enhance CLI status rendering to display settings file information for builtin Claude.
- Introduce settings file input in CLI manager for configuring the path to settings.json.
- Update Claude CLI tool interface to include settingsFile property.
- Implement settings file resolution and validation in CLI executor.
- Create a new collaborative planning workflow command with detailed documentation.
- Add test scripts for debugging tool configuration and command building.
2026-01-30 10:07:02 +08:00
catlog22
f3c773a81e Refactor Codex Issue Plan-Execute Skill Documentation and CLI Options
- Deleted obsolete INDEX.md and OPTIMIZATION_SUMMARY.md files, consolidating documentation for improved clarity and organization.
- Removed skipGitRepoCheck option from CLI execution parameters to streamline command usage.
- Updated CLI executor utilities to automatically skip git repository checks, allowing execution in non-git directories.
- Enhanced documentation with new ARCHITECTURE.md and INDEX.md files for better navigation and understanding of the system architecture.
- Created CONTENT_MIGRATION_REPORT.md to verify zero content loss during the consolidation process.
2026-01-29 20:39:12 +08:00
catlog22
875b1f19bd feat: 完成 Codex Issue Plan-Execute Skill v2.0 优化
- 新增 OPTIMIZATION_SUMMARY.md,详细记录优化过程和成果
- 新增 README_OPTIMIZATION.md,概述优化后的文件结构和关键指标
- 创建 specs/agent-roles.md,整合 Planning Agent 和 Execution Agent 的角色定义
- 合并多个提示词文件,减少内容重复,优化 Token 使用
- 新建 ARCHITECTURE.md 和 INDEX.md,提供系统架构和文档导航
- 添加 CONTENT_MIGRATION_REPORT.md,确保内容迁移的完整性和零丢失
- 更新文件引用,确保向后兼容性,添加弃用通知
2026-01-29 20:37:30 +08:00
catlog22
113dce55c5 fix: Auto-detect JSON Lines output format for Codex CLI
Problem: Codex CLI uses --json flag to output JSONL events, but executor was using plain text parser. This prevented proper parsing of structured events, breaking session creation.

Root cause: buildCommand() added --json flag for Codex but never communicated this to the output parser. Result: JSONL events treated as raw text → session markers lost.

Solution:
- Extend buildCommand() to return outputFormat
- Auto-detect 'json-lines' when tool is 'codex'
- Use auto-detected format in executeCliTool()
- Properly parse structured events and extract session data

Files modified:
- ccw/src/tools/cli-executor-utils.ts: Add output format auto-detection
- ccw/src/tools/cli-executor-core.ts: Use auto-detected format for parser
- ccw/src/commands/cli.ts: Add debug instrumentation

Verified:
- Codex outputs valid JSONL (confirmed via direct test)
- CLI_EXECUTION_STARTED events broadcast correctly
- Issue was downstream in output parsing, not event transmission
2026-01-29 16:38:30 +08:00
catlog22
3998d24e32 Enhance skill generator documentation and templates
- Updated Phase 1 and Phase 2 documentation to include next phase links and data flow details.
- Expanded Phase 5 documentation to include comprehensive validation and README generation steps, along with validation report structure.
- Added purpose and usage context sections to various action and script templates (e.g., autonomous-action, llm-action, script-bash).
- Improved commands management by simplifying the command scanning logic and enabling/disabling commands through renaming files.
- Enhanced dashboard command manager to format group names and display nested groups with appropriate icons and colors.
- Updated LiteLLM executor to allow model overrides during execution.
- Added action reference guide and template reference sections to the skill-tuning SKILL.md for better navigation and understanding.
2026-01-28 20:34:03 +08:00
catlog22
4c78f53bcc feat: add commands management feature with API endpoints and UI integration
- Implemented commands routes for listing, enabling, and disabling commands.
- Created commands manager view with accordion groups for better organization.
- Added loading states and confirmation dialogs for enabling/disabling commands.
- Enhanced error handling and user feedback for command operations.
- Introduced CSS styles for commands manager UI components.
- Updated navigation to include commands manager link.
- Refactored existing code for better maintainability and clarity.
2026-01-28 08:26:37 +08:00
catlog22
7a40f16235 feat(skills): implement enable/disable functionality for skills
- Added new API endpoints to enable and disable skills.
- Introduced logic to manage disabled skills, including loading and saving configurations.
- Enhanced skills routes to return lists of disabled skills.
- Updated frontend to display disabled skills and allow toggling their status.
- Added internationalization support for new skill status messages.
- Created JSON schemas for plan verification agent and findings.
- Defined new types for skill management in TypeScript.
2026-01-28 00:49:39 +08:00
catlog22
b3c47294e7 Enhance workflow commands and context management
- Updated `plan.md` to include new fields in context-package.json: prioritized_context, user_intent, priority_tiers, dependency_order, and sorting_rationale.
- Added validation for the existence of the prioritized_context field in context-package.json.
- Modified user decision flow in task generation to present action choices after planning completion.
- Improved context-gathering process in `context-gather.md` to integrate user intent and prioritize context based on user goals.
- Revised conflict-resolution documentation to require planning notes records after conflict analysis.
- Streamlined task generation in `task-generate-agent.md` to utilize pre-sorted context without redundant sorting.
- Removed unused settings persistence functions and corresponding tests from `claude-cli-tools.ts` and `settings-persistence.test.ts`.
2026-01-28 00:02:45 +08:00
catlog22
9989cfcf21 feat: 更新任务生成和执行限制,优化多模块任务管理 2026-01-27 23:34:31 +08:00
catlog22
1b6ace0447 feat: 添加规划笔记功能以支持任务生成和约束管理 2026-01-27 23:16:01 +08:00
catlog22
985085c624 Refactor CLI Config Manager and Add Provider Model Routes
- Removed deprecated constants and functions from cli-config-manager.ts.
- Introduced new provider model presets in litellm-provider-models.ts for better organization and management of model information.
- Created provider-routes.ts to handle API endpoints for retrieving provider information and models.
- Added integration tests for provider routes to ensure correct functionality and response structure.
- Implemented unit tests for settings persistence functions, covering various scenarios and edge cases.
- Enhanced error handling and validation in the new routes and settings functions.
2026-01-25 17:27:58 +08:00
catlog22
b8c807b2f9 feat: add parent/child directory lookup for ccw cli output
- Implement findProjectWithExecution() to search upward through parent directories
- Add automatic project path discovery in outputAction
- Support explicit --project parameter for manual path specification
- Improve error messages with search scope indication
- Display project path in formatted output
- Enable cross-directory execution without working directory dependency
2026-01-24 21:17:21 +08:00
catlog22
24efef7f17 feat: Add main workflow orchestrator (ccw) with intent analysis and command execution
- Implemented the ccw command as a main workflow orchestrator.
- Added a 5-phase workflow including intent analysis, requirement clarification, workflow selection, user confirmation, and command execution.
- Developed functions for analyzing user input, selecting workflows, and executing command chains.
- Integrated TODO tracking for command execution progress.
- Created comprehensive tests for the CommandRegistry, covering YAML parsing, command retrieval, and error handling.
2026-01-24 13:43:47 +08:00
catlog22
44b8269a74 feat: add CommandRegistry for command management and direct imports 2026-01-24 13:29:50 +08:00
catlog22
a2c1b9b47c fix: replace hardcoded Windows paths with dynamic cross-platform paths in CodexLens error messages
- Remove hardcoded Windows paths (D:\Claude_dms3\codex-lens) that were displayed to macOS/Linux users
- Generate dynamic possible paths list based on runtime environment
- Support multiple installation locations (cwd, project root, home directory)
- Improve error messages with platform-appropriate paths
- Maintain consistency across both bootstrapWithUv() and installSemanticWithUv() functions

Fixes remaining issue from #104 regarding cross-platform error message compatibility
2026-01-24 11:08:02 +08:00
jerry
ab259b1970 fix: resolve CodexLens installation failure with NPM global install
- Implement two-pass search strategy for codex-lens path detection
- First pass: prefer non-node_modules paths (development environment)
- Second pass: allow node_modules paths (NPM global install)
- Fixes CodexLens installation for all NPM global install users
- No breaking changes, maintains backward compatibility

Resolves issue where NPM global install users could not install CodexLens
because the code rejected paths containing /node_modules/, which is the
only valid location for codex-lens in NPM installations.

Tested on macOS with Node.js v22.18.0 via NPM global install.
2026-01-24 08:58:44 +08:00
catlog22
8179472e56 fix: auto-sync CLI tools availability on first config creation (Issue #95)
**问题描述**:
新安装 CCW 后,默认配置中所有 CLI 工具 enabled: true,但实际上用户可能没有安装这些工具,导致执行任务时尝试调用未安装的工具而失败。

**根本原因**:
- DEFAULT_TOOLS_CONFIG 中所有工具默认 enabled: true
- 首次创建配置时不检测工具实际可用性
- 现有的 syncBuiltinToolsAvailability() 只在用户手动触发时才执行

**修复内容**:
1. 新增 ensureClaudeCliToolsAsync() 异步版本
   - 在创建默认配置后自动调用 syncBuiltinToolsAvailability()
   - 通过 which/where 命令检测工具实际可用性
   - 根据检测结果自动调整 enabled 状态

2. 更新两个关键 API 端点使用新函数
   - /api/cli/endpoints - 获取 API 端点列表
   - /api/cli/tools-config - 获取 CLI 工具配置

**效果**:
- 首次安装时自动检测并禁用未安装的工具
- 避免调用不可用工具导致的错误
- 用户可在 Dashboard 中看到准确的工具状态

Fixes #95
2026-01-23 23:20:58 +08:00
catlog22
2fb1d1243c feat: prioritize user config, do not merge default tools
Changed loadClaudeCliTools() to only load tools explicitly defined
in user config. Previously, DEFAULT_TOOLS_CONFIG.tools was spread
before user tools, causing all default tools to be loaded even if
not present in user config.

User config now has complete control over which tools are loaded.
2026-01-22 23:37:42 +08:00
catlog22
ac62bf70db fix: preserve envFile in ensureToolTags merge function
The ensureToolTags() function was only returning enabled, primaryModel,
secondaryModel, and tags - missing envFile. This caused envFile to be
lost during config merge in loadClaudeCliTools().

Related to #96 - gemini envFile setting lost after page refresh
2026-01-22 23:35:33 +08:00
catlog22
edb55c4895 fix: include envFile in getFullConfigResponse API response
Fixes #96 - gemini/qwen envFile setting was lost after page refresh
because getFullConfigResponse() was not including the envFile field
when converting config to the legacy API format.

Changes:
- Add envFile?: string | null to CliToolConfig interface
- Include envFile in getFullConfigResponse() conversion
2026-01-22 23:30:01 +08:00
catlog22
ea04663035 fix(multi-cli): populate multiCliPlan sessions in liteTaskDataStore
Fix task click handlers not working in multi-CLI planning detail page.

Root cause: liteTaskDataStore was not being populated with multiCliPlan
sessions during initialization, so task click handlers couldn't access
session data using currentSessionDetailKey.

Changes:
- navigation.js: Add code to populate multiCliPlan sessions in liteTaskDataStore
- notifications.js: Add code to populate multiCliPlan sessions when data refreshes

Now when task detail page loads, liteTaskDataStore contains the correct key
'multi-cli-${sessionId}' matching currentSessionDetailKey, allowing task
click handlers to find session data and open detail drawer.

Verified: Task clicks now properly open detail panel for all 7 tasks.
2026-01-22 15:41:01 +08:00
catlog22
02531c4d15 feat: i18n for CLI history view; fix Claude session discovery path encoding
## Changes

### i18n 中文化 (i18n.js, cli-history.js)
- 添加 60+ 个翻译键用于 CLI 执行历史和对话详情
- 将 cli-history.js 中的硬编码英文字符串替换为 t() 函数调用
- 覆盖范围: 执行历史、对话详情、状态、工具标签、按钮、提示等

### 修复 Claude 会话追踪 (native-session-discovery.ts)
- 问题: Claude 使用路径编码存储会话 (D:\path -> D--path),但代码使用 SHA256 哈希导致无法发现
- 解决方案:
  - 添加 encodeClaudeProjectPath() 函数用于路径编码
  - 更新 ClaudeSessionDiscoverer.getSessions() 使用路径编码
  - 增强 extractFirstUserMessage() 支持多种消息格式 (string/array)
- 结果: Claude 会话现可正确关联,UI 按钮 "查看完整过程对话" 应可正常显示

## 验证
- npm run build 通过 
- Claude 会话发现 1267 个会话 
- 消息提取成功率 80% 
- 路径编码验证正确 
2026-01-22 14:53:38 +08:00
catlog22
5fa7524ad7 feat(loop): support external CLI tools (cli-wrapper) in task management
- Fix missing i18n translations: loop.add, loop.save, loop.cancel
- Replace hardcoded validTools with dynamic tool loading from cli-tools.json
- Support external CLI wrappers (like doubao) in task creation and updates
- Add getEnabledToolsList() helper to fetch enabled tools dynamically
- Update mapIssueToolToLoopTool() to accept any string tool name
- Update validateTool() to use dynamic tool list
- Change LoopTask.tool type from specific strings to string (accepts any tool)

This allows tasks to use any enabled CLI tool from configuration,
including builtin tools, cli-wrappers, and api-endpoints, not just
the hardcoded ['bash', 'gemini', 'codex', 'qwen', 'claude'].
2026-01-22 12:43:37 +08:00
catlog22
60eab98782 feat: Add comprehensive tests for CCW Loop System flow state
- Implemented loop control tasks in JSON format for testing.
- Created comprehensive test scripts for loop flow and standalone tests.
- Developed a shell script to automate the testing of the entire loop system flow, including mock endpoints and state transitions.
- Added error handling and execution history tests to ensure robustness.
- Established variable substitution and success condition evaluations in tests.
- Set up cleanup and workspace management for test environments.
2026-01-22 10:13:00 +08:00
catlog22
d9f1d14d5e feat: add CCW Loop System for automated iterative workflow execution
Implements a complete loop execution system with multi-loop parallel support,
dashboard monitoring, and comprehensive security validation.

Core features:
- Loop orchestration engine (loop-manager, loop-state-manager)
- Multi-loop parallel execution with independent state management
- REST API endpoints for loop control (pause, resume, stop, retry)
- WebSocket real-time status updates
- Dashboard Loop Monitor view with live updates
- Security: path traversal protection and sandboxed JavaScript evaluation

Test coverage:
- 42 comprehensive tests covering multi-loop, API, WebSocket, security
- Security validation for success_condition injection attacks
- Edge case handling and end-to-end workflow tests
2026-01-21 22:55:24 +08:00
catlog22
1dfabf6bda fix: resolve CodexLens installation issues by correcting package name and improving local path detection
- Updated package name from `codexlens` to `codex-lens` in all relevant files to ensure consistency with `pyproject.toml`.
- Enhanced `findLocalPackagePath()` to always search for local paths, even when running from `node_modules`.
- Removed fallback logic for PyPI installation in several functions, providing clearer error messages for local installation failures.
- Added detailed documentation on installation steps and error handling for local development packages.
- Introduced a new summary document outlining the issues and fixes related to CodexLens installation.
2026-01-21 15:32:41 +08:00
catlog22
9c9b1ad01c Add TypeScript LSP setup guide and enhance debugging tests
- Created a comprehensive guide for setting up TypeScript LSP in Claude Code, detailing installation methods, configuration, and troubleshooting.
- Added multiple debugging test scripts to validate LSP communication with pyright, including direct communication tests, configuration checks, and document symbol retrieval.
- Implemented error handling and logging for better visibility during LSP interactions.
2026-01-20 14:53:18 +08:00
catlog22
eea859dd6f fix(cli): 修复 Windows 路径反斜杠被吞掉的问题并添加跨平台路径支持
- 重写 escapeWindowsArg 函数,正确处理反斜杠和引号转义
- 添加 escapeUnixArg 函数支持 Linux/macOS shell 转义
- 添加 normalizePathSeparators 函数自动转换路径分隔符
- 修复 vscode-lsp.ts 中的 TypeScript 类型错误
2026-01-20 09:44:49 +08:00
catlog22
3fe630f221 Add tests and documentation for CodexLens LSP tool
- Introduced a new test script for the CodexLens LSP tool to validate core functionalities including symbol search, find definition, find references, and get hover.
- Created comprehensive documentation for the MCP endpoint design, detailing the architecture, features, and integration with the CCW MCP Manager.
- Developed a detailed implementation plan for transitioning to a real LSP server, outlining phases, architecture, and acceptance criteria.
2026-01-19 23:26:35 +08:00
catlog22
6716772e0a fix(codexlens): 添加 Yarn PnP 支持以改进环境检测
问题分析:
- Yarn PnP 不使用 node_modules 目录
- 原有逻辑仅检测 node_modules 会错误识别为开发环境
- 导致在 Yarn PnP 项目中尝试使用本地路径安装失败

修复内容:
- 在 isDevEnvironment() 中添加 Yarn PnP 检测
- 检查 process.versions.pnp 属性判断是否为 Yarn PnP 环境
- Yarn PnP 环境被视为生产环境,使用 PyPI 安装

改进影响:
- npm/pnpm: 使用 node_modules 检测(原有逻辑)
- Yarn PnP: 使用 pnp 版本检测(新增逻辑)
- 开发环境: 两项检测均不满足时识别为开发环境

Based on Gemini code review suggestion (ID: 1768794060352-gemini)
2026-01-19 11:43:12 +08:00
catlog22
a8367bd4d7 fix(codexlens): 修复 npm install 后 CodexLens 配置被重置的问题
问题分析:
- npm install 时,`__dirname` 指向 node_modules 内的路径
- 使用 `pip install -e`(editable mode)会保存源码路径引用
- npm 升级后旧路径失效,导致需要删除虚拟环境才能重新安装

修复内容:
- 添加 isInsideNodeModules() 检测函数
- 添加 isDevEnvironment() 判断是否在开发环境
- 添加 findLocalPackagePath() 统一的本地包路径查找函数
- 当运行在 node_modules 中时,跳过本地路径,直接使用 PyPI 安装

影响的函数:
- bootstrapWithUv()
- installSemanticWithUv()
- bootstrapVenv()
- ensureLiteLLMEmbedderReady()

行为变化:
- 开发环境(不在 node_modules 中):使用本地路径安装(editable mode)
- 生产环境(npm install 安装):使用 PyPI 安装(稳定的包引用)
2026-01-19 11:32:50 +08:00
catlog22
ea13f9a575 fix(config): 修复测试污染用户配置的问题,支持 CCW_DATA_DIR 环境变量
修改内容:
- getGlobalConfigPath() 和 getGlobalSettingsPath() 现在尊重 CCW_DATA_DIR 环境变量
- ensureClaudeCliTools()、saveClaudeCliTools()、saveClaudeCliSettings() 同步更新
- 测试现在使用独立的临时目录,不会修改用户的生产配置文件 ~/.claude/cli-tools.json

修复问题:
- 集成测试会修改用户的 gemini primaryModel 为 test-model
- 导致后续 Codex CLI 执行时读取到错误的配置

验证:
- 所有集成测试通过 (4/4)
- 用户配置保持不变
- 生产环境默认行为不受影响
2026-01-19 11:28:06 +08:00
catlog22
16c96229f9 feat(cli): add agent_message type for precise --final output filtering
Introduce dedicated agent_message IR type to distinguish final AI responses
from generic stdout. This enables --final flag to show only agent messages,
filtering out all intermediate content (JSONL events, reasoning, tool calls).

Changes:
- Add agent_message type to CliOutputUnitType
- Update JsonLinesParser to map final responses from all tools (codex,
  gemini, claude, opencode) to agent_message type
- Add final_output field to database schema with migration
- Update getCachedOutput and getConversation to return finalOutput
- Prefer finalOutput in outputAction for --final flag

Fixes issue where --final showed raw JSONL instead of filtered content.
2026-01-18 19:49:33 +08:00
catlog22
40b003be68 fix(cli): 增强 CLI 输出处理,添加解析输出和过滤功能 2026-01-18 18:35:23 +08:00
catlog22
680c2a0597 fix(cli): allow codex review with target flags without prompt
- Skip template concatenation when using --uncommitted/--base/--commit
- Allow empty prompt for review mode with target flags
- Add hasReviewTarget check in command routing
- Update documentation with validation constraints

codex review constraint: target flags and prompt are mutually exclusive
2026-01-17 22:07:26 +08:00
catlog22
5b5dc85677 refactor(cli): change from env var injection to direct prompt concatenation
- Replace $PROTO/$TMPL environment variable injection with systemRules/roles direct concatenation
- Append rules to END of prompt instead of prepending
- Change prompt field name from RULES to CONSTRAINTS in all prompts
- Default to universal-rigorous-style template when --rule not specified
- Update all .claude documentation, agents, commands, and skills
- Add streaming_content type support for Gemini delta messages

Breaking: Prompts now use CONSTRAINTS field instead of RULES
2026-01-17 21:30:05 +08:00
catlog22
1e691fa751 feat(cli): default to universal-rigorous-style template when --rule not specified
- Add default template fallback in cli.ts (effectiveRule)
- Update cli-tools-usage.md with English descriptions
- Add ACE semantic search to Pattern Discovery Workflow
- Simplify Template System documentation (list template names only)
- Filter CLI progress messages (auth, loading) in output converter

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 19:51:21 +08:00
catlog22
1f87ca0be3 refactor(routes): 更新 rules-routes 和 claude-routes 使用 $PROTO $TMPL
- rules-routes.ts: 替换 4 处 $(cat ...) 模板引用为 $PROTO $TMPL
- claude-routes.ts: 替换 2 处 $(cat ...) 模板引用为 $PROTO $TMPL
- 添加 loadProtocol/loadTemplate 导入
- 在 executeCliTool 调用中添加 rulesEnv 参数

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 19:40:28 +08:00
catlog22
f14418603a feat(cli): 添加 --rule 选项支持模板自动发现
重构 ccw cli 模板系统:

- 新增 template-discovery.ts 模块,支持扁平化模板自动发现
- 添加 --rule <template> 选项,自动加载 protocol 和 template
- 模板目录从嵌套结构 (prompts/category/file.txt) 迁移到扁平结构 (prompts/category-function.txt)
- 更新所有 agent/command 文件,使用 $PROTO $TMPL 环境变量替代 $(cat ...) 模式
- 支持模糊匹配:--rule 02-review-architecture 可匹配 analysis-review-architecture.txt

其他更新:
- Dashboard: 添加 Claude Manager 和 Issue Manager 页面
- Codex-lens: 增强 chain_search 和 clustering 模块

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 19:20:24 +08:00
catlog22
d515090097 feat: add --mode review support for codex CLI
- Add 'review' to mode enum in ParamsSchema and schema
- Implement codex review subcommand in buildCommand (uses --uncommitted by default)
- Other tools (gemini/qwen/claude) accept review mode but no operation change
- Update cli-tools-usage.md with review mode documentation
2026-01-16 13:01:02 +08:00
catlog22
085652560a refactor: 移除 ccw cli 内部超时参数,改由外部 bash 控制
- 移除 --timeout 命令行选项和内部超时处理逻辑
- 进程生命周期跟随父进程(bash)状态
- 简化代码,超时控制交由外部调用者管理
2026-01-15 22:30:22 +08:00
catlog22
0eda520fd7 feat: Enhance multi-CLI session handling and UI updates
- Added loading of plan.json in scanMultiCliDir to improve task extraction.
- Implemented normalization of tasks from plan.json format to support new UI.
- Updated CSS for multi-CLI plan summary and task item badges for better visibility.
- Refactored hook-manager to use Node.js for cross-platform compatibility in command execution.
- Improved i18n support for new CLI tool configuration in the hook wizard.
- Enhanced lite-tasks view to utilize normalized tasks and provide better fallback mechanisms.
- Updated memory-update-queue to return string messages for better integration with hooks.
2026-01-15 15:20:20 +08:00
catlog22
275d2cb0af feat: Add environment file support for CLI tools
- Introduced a new input group for environment file configuration in the dashboard CSS.
- Updated hook manager to queue CLAUDE.md updates with configurable threshold and timeout.
- Enhanced CLI manager view to include environment file input for built-in tools (gemini, qwen).
- Implemented environment file loading mechanism in cli-executor-core, allowing custom environment variables.
- Added unit tests for environment file parsing and loading functionalities.
- Updated memory update queue to support dynamic configuration of threshold and timeout settings.
2026-01-13 21:31:46 +08:00
catlog22
d5f57d29ed feat: add issue discovery by prompt command with Gemini planning
- Introduced `/issue:discover-by-prompt` command for user-driven issue discovery.
- Implemented multi-agent exploration with iterative feedback loops.
- Added ACE semantic search for context gathering and cross-module comparison capabilities.
- Enhanced user experience with natural language input and adaptive exploration strategies.

feat: implement memory update queue tool for batching updates

- Created `memory-update-queue.js` for managing CLAUDE.md updates.
- Added functionality for queuing paths, deduplication, and auto-flushing based on thresholds and timeouts.
- Implemented methods for queue status retrieval, flushing, and timeout checks.
- Configured to store queue data persistently in `~/.claude/.memory-queue.json`.
2026-01-13 21:04:45 +08:00
catlog22
340137d347 fix: resolve GitHub issues #63, #66, #67, #68, #69, #70
- #70: Fix API Key Tester URL handling - normalize trailing slashes before
  version suffix detection to prevent double-slash URLs like //models
- #69: Fix memory embedder ignoring CodexLens config - add error handling
  for CodexLensConfig.load() with fallback to defaults
- #68: Fix ccw cli using wrong Python environment - add getCodexLensVenvPython()
  to resolve correct venv path on Windows/Unix
- #67: Fix LiteLLM API Provider test endpoint - actually test API key connection
  instead of just checking ccw-litellm installation
- #66: Fix help-routes.ts path configuration - use correct 'ccw-help' directory
  name and refactor getIndexDir to pure function
- #63: Fix CodexLens install state refresh - add cache invalidation after
  config save in codexlens-manager.js

Also includes targeted unit tests for the URL normalization logic.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:20:54 +08:00