Refactor CLI command usage from ccw cli exec to ccw cli -p for improved prompt handling

- Updated command patterns across documentation and templates to reflect the new CLI syntax.
- Enhanced CLI tool implementation to support reading prompts from files and multi-line inputs.
- Modified core components and views to ensure compatibility with the new command structure.
- Adjusted help messages and internationalization strings to align with the updated command format.
- Improved error handling and user notifications in the CLI execution flow.
This commit is contained in:
catlog22
2025-12-18 14:12:45 +08:00
parent e096fc98e2
commit 8dd4a513c8
52 changed files with 386 additions and 243 deletions

View File

@@ -256,7 +256,7 @@ Based on userConfig.executionMethod:
CLI Resume Support (MANDATORY for all CLI commands):
- Use --resume parameter to continue from previous task execution
- Read previous task's cliExecutionId from session state
- Format: ccw cli exec "[prompt]" --resume ${previousCliId} --tool ${tool} --mode write
- Format: ccw cli -p "[prompt]" --resume ${previousCliId} --tool ${tool} --mode write
## EXPLORATION CONTEXT (from context-package.exploration_results)
- Load exploration_results from context-package.json
@@ -308,10 +308,10 @@ Each task JSON MUST include:
4. **merge_fork**: Task has multiple parents - merges all parent contexts into new conversation
**Execution Command Patterns**:
- new: `ccw cli exec "[prompt]" --tool [tool] --mode write --id [cli_execution_id]`
- resume: `ccw cli exec "[prompt]" --resume [resume_from] --tool [tool] --mode write`
- fork: `ccw cli exec "[prompt]" --resume [resume_from] --id [cli_execution_id] --tool [tool] --mode write`
- merge_fork: `ccw cli exec "[prompt]" --resume [merge_from.join(',')] --id [cli_execution_id] --tool [tool] --mode write`
- new: `ccw cli -p "[prompt]" --tool [tool] --mode write --id [cli_execution_id]`
- resume: `ccw cli -p "[prompt]" --resume [resume_from] --tool [tool] --mode write`
- fork: `ccw cli -p "[prompt]" --resume [resume_from] --id [cli_execution_id] --tool [tool] --mode write`
- merge_fork: `ccw cli -p "[prompt]" --resume [merge_from.join(',')] --id [cli_execution_id] --tool [tool] --mode write`
## QUALITY STANDARDS
Hard Constraints: