Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

teoarjun
Copy link

@teoarjun teoarjun commented Sep 12, 2025

πŸ“ Description

πŸ”— Related Issues

πŸ”§ Type of Change

  • πŸ› Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • πŸ“š Documentation update
  • πŸ”§ Code refactoring (no functional changes)
  • πŸ§ͺ Test improvements
  • πŸ”¨ Build/CI changes

βœ… Checklist

  • Self-review performed
  • Tests added/updated
  • Documentation updated (if needed)

- Added mode flag with default value
- Preparing for agent execution modes
- Added options validation for 'default' and 'planner'
- Enhanced flag description with example
- Pass mode flag to command handlers
Show users how to use the new --mode planner option
- Import TAgentMode from SDK
- Map mode flag to TAgentMode enum
- Pass mode to Agent.import()
Different welcome messages for planner vs default mode.
TODO: Need to implement task panel and enhanced streaming.
Will use TokenLoom to parse special tags and improve UX
- Clear terminal and show enhanced welcome
- Add task tracking with agent events
- Ready for task panel UI implementation
- Add sticky task panel with real-time updates
- Implement task status visualization with icons
- Add terminal resize support
- Connect task events to UI updates
- Add text wrapping for task descriptions

Features complete: βœ… Task panel βœ… Real-time updates βœ… Status icons
- Test help output shows mode flag correctly
- Test valid mode values (default, planner)
- Test invalid mode value rejection
- Test default behavior when mode not specified

Ensures flag validation and help display work correctly
- Add detailed section explaining execution modes
- Document default vs planner mode differences
- Include examples and visual feature descriptions
- Add planner mode feature highlights with emojis

Documentation now covers all CLI functionality including new planner mode
- Update imports to use vitest instead of Jest
- Use exec to test CLI directly instead of @oclif/test
- Fix test expectations to match actual help output
- Remove --help from validation test to trigger proper error

βœ… All 3 tests now passing:
- Help shows --mode flag correctly
- Invalid modes rejected with proper error
- Valid modes accepted without errors
@alaa-eddine-k
Copy link
Contributor

hey @teoarjun
Thank you very much for addressing this :)
We will review it and will be merged to the next release if everything works well.

@alaa-eddine-k
Copy link
Contributor

Hi @teoarjun I tested this code but it's not working properly.

the planner mode should show the following element like in https://github.com/SmythOS/sre/blob/main/examples/01-agent-code-skill/04.1-chat-planner-coder.ts example

image
  • The plan tasks should be visible on the right side,
  • The amount of time taking by every block tool calls, should be shown
  • ideally, each block planning, thinking, tool call ...etc should have a different color

The proposed implementation does not show that, and the generated text tends to randomly disappear and re-appear ... (probably interfering with the Tasks block ?)

πŸ”§ Complete rewrite of TokenLoom-based streaming:
- Replace incomplete handlePlannerStreaming with full implementation from example
- Add proper colored output for tags (thinking=gray, planning=green, code=cyan)
- Add timing display for tool calls and tag blocks (ms duration)
- Fix text wrapping to avoid task panel interference
- Separate normal and planner streaming into dedicated functions
- Add proper tag parsing for <thinking>, <planning>, <code> blocks
- Add buffer-released event handling for smooth tool call display

βœ… Addresses PR feedback:
- Task panel now visible on right side
- Timing shown for every block and tool call
- Different colors for each block type
- Fixed text disappearing/reappearing issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Add planner mode with the planner reporting sidebar to @smythos/cli
3 participants