Skip to content

Commit 7ec35a9

Browse files
author
Eric Oliver
committed
the CL
I output is looking much better. tools and MCP working, output is near clean
1 parent 0b9941d commit 7ec35a9

36 files changed

+3087
-182
lines changed

docs/buf.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Summary of Issue #8: "Story 8: Add Command LineArgument Parsing"
2+
3+
**Status**:Closed (Completed on June 3, 2025)
4+
**Labels**: cli-utility, phase-2, arguments
5+
**Story Points**: 5
6+
7+
### OverviewThis issue focused on implementing comprehensive command line argument parsingand validation for the code-agent CLI utility as partof Phase 2 -CLI Infrastructure.
8+
9+
### UserStory
10+
11+
As a developer usingthe CLI utility, userswanted comprehensive command line argument supportto control the agent's behavior and specify optionswithout interactive prompts.### Key Features ImplementedThe issue called for implementing arobust CLI interface with [`commander.js`](https://www.npmjs.com/package/commander) that supports:- **Core Options**: -`--cwd` -Working directory specification
12+
13+
- `--config` - Configurationfile path
14+
- `--model<name>` - AI model selection- `--mode`- Agent mode (code, debug, etc.) -`--output<format>` - Outputformat (text, json)
15+
- `--verbose` - Verbose logging- `--no-color` -Disable colors
16+
- `--batch` - Non-interactive mode
17+
18+
### TechnicalRequirements
19+
20+
- Comprehensive argument parsing with commander.js
21+
- Support for all majorCLI options
22+
- Automatic helpdocumentation generation
23+
- Argument validation and error handling- Subcommand support forfuture extensibility
24+
25+
### DependenciesThis story depended on Story7 (CLI Configuration Management) and was part of the broader CLI infrastructuredevelopment phase.
26+
27+
The issue was successfully completed and closed by the repository owner, indicating that the command line argument parsing functionality has been fully implemented inthe code-agent project.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# CLI Completion Display Fix
2+
3+
## Problem Statement
4+
5+
The CLI shows `attempt_completion...` but never displays the actual completion result content, causing users to see incomplete output before system shutdown.
6+
7+
## Root Cause
8+
9+
CLILogger receives `completion_result` messages but doesn't properly handle/display them, unlike the VSCode extension which shows completion results correctly.
10+
11+
## Technical Analysis
12+
13+
### Current Flow
14+
15+
1. `attempt_completion` tool calls `cline.say("completion_result", result)`
16+
2. TaskMessaging emits "message" event with completion result
17+
3. CLILogger receives message but doesn't display `completion_result` content
18+
4. System shuts down immediately
19+
20+
### Expected Flow
21+
22+
1. `attempt_completion` tool calls `cline.say("completion_result", result)`
23+
2. TaskMessaging emits "message" event with completion result
24+
3. CLILogger properly displays the completion result content
25+
4. System completes gracefully
26+
27+
## Solution
28+
29+
Fix CLILogger to properly handle `completion_result` messages in the existing shared message handling flow.
30+
31+
### Files to Modify
32+
33+
1. **src/cli/services/streaming/CLILogger.ts**
34+
35+
- Add proper `completion_result` message handling
36+
- Ensure completion content is displayed to user
37+
- Use existing message processing pipeline
38+
39+
2. **src/cli/services/streaming/CLIDisplayFormatter.ts** (if needed)
40+
- Ensure completion results are properly formatted
41+
- Handle completion message display formatting
42+
43+
### Implementation Details
44+
45+
- Use existing CLILogger message handling infrastructure
46+
- Ensure `completion_result` messages are displayed prominently
47+
- Maintain consistency with VSCode extension completion display
48+
- Don't recreate logic - extend existing shared components
49+
50+
### Success Criteria
51+
52+
- CLI displays actual completion result content instead of just "attempt_completion..."
53+
- Completion results are clearly visible to users
54+
- Maintains shared code flow between VSCode ext, CLI, and API
55+
- No custom message handling logic in batch.ts
56+
57+
### Test Cases
58+
59+
1. Run CLI with MCP task that uses `attempt_completion`
60+
2. Verify completion result content is displayed
61+
3. Verify system completes gracefully after showing results
62+
4. Verify no regression in VSCode extension completion display
63+
64+
## Priority
65+
66+
High - Core functionality broken, affecting user experience

0 commit comments

Comments
 (0)