Skip to content

Conversation

lewistransts
Copy link
Collaborator

No description provided.

…pproval of tool calls

- Add new /toggle_yolo command in CommandProcessor to toggle YOLO mode
- Update global configuration when toggling YOLO mode setting
- Add command to console completers and help documentation
- Provide user feedback with appropriate emojis (🚀 for enabled, 🛡️ for disabled)
- Update current tool manager's yolo_mode setting immediately after config change

YOLO mode enables automatic approval of tool calls, bypassing user confirmation prompts.
…by removing unnecessary comments and improving readability
@lewistransts lewistransts requested a review from daltonnyx October 4, 2025 03:04
… unintended changes during active sessions

feat(tool_manager.py): implement methods for managing session-based yolo_mode overrides and retrieving effective mode
feat(console_ui.py): add command to toggle yolo_mode for the current session, enhancing user control over tool execution
config_manager = ConfigManagement()
return set(config_manager.get_auto_approval_tools())

def set_yolo_mode_session_override(self, enabled: bool):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useless function, use property directly

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

self.yolo_mode_session_override = enabled
self.yolo_mode = enabled

def get_effective_yolo_mode(self) -> bool:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useless function, use property directly

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

self._pending_confirmations = {} # Store futures for confirmation requests
self._next_confirmation_id = 0 # ID counter for confirmation requests
self.yolo_mode = False # Enable/disable auto-approval mode
self.yolo_mode_session_override = None # Track session-based overrides
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use True/False

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed this property, use yolo_mode only, pls check again



except Exception as e:
self.message_handler._notify(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this catch for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like it's unnecessary, removed


# Handle toggle_yolo command directly (console only, session-based)
if user_input.strip() == "/toggle_yolo":
try:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this logic to a separated private function

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@daltonnyx daltonnyx force-pushed the main branch 2 times, most recently from ce04b1c to b23d50d Compare October 8, 2025 15:12
…olean logic for clarity

refactor(tool_manager.py): remove unnecessary methods related to yolo_mode_session_override for cleaner code
feat(command_handlers.py): add handle_toggle_yolo_command method to manage YOLO mode toggling
refactor(console_ui.py): delegate /toggle_yolo command handling to CommandHandlers for better organization
…e to enhance readability and maintainability
… initialize yolo_mode from config to simplify code and improve clarity

fix(console): update toggle_yolo command description for better understanding of its functionality
feat(console): display YOLO mode indicator in input handler when enabled to enhance user feedback
…nt exception handling to clean up the code and improve readability
…er and ConsoleUI to allow on-the-fly updates

refactor(tool_manager): remove redundant initialization of yolo_mode from ConfigManagement in ToolManager to streamline code
…O mode per session

fix(tool_manager.py): update condition to check both session_overrided_yolo_mode and yolo_mode for tool confirmation
refactor(command_handlers.py): toggle session_overrided_yolo_mode instead of yolo_mode for better control
chore(console_ui.py): remove redundant initialization of yolo_mode from global config in ConsoleUI
@lewistransts lewistransts marked this pull request as draft October 17, 2025 14:47
…m global config

fix(input_handler.py): update YOLO mode indicator condition to include session_overrided_yolo_mode for accurate display
…ndler class

style(tool_manager.py): add comment to clarify purpose of session_overrided_yolo_mode variable
…yolo_mode_session for clarity and consistency

fix(command_handlers): update reference to session_overrided_yolo_mode to enable_yolo_mode_session for correct functionality
fix(console_ui): update reference to session_overrided_yolo_mode to enable_yolo_mode_session for correct configuration loading
fix(input_handler): update reference to session_overrided_yolo_mode to enable_yolo_mode_session for accurate YOLO mode indication
…session_overrided_yolo_mode for clarity

fix(command_handlers.py): update references to enable_yolo_mode_session to use the new name
fix(console_ui.py): update references to enable_yolo_mode_session to use the new name
fix(input_handler.py): update references to enable_yolo_mode_session to use the new name
… enabled in config to avoid redundant state changes
…to session_overrided_yolo_mode for clarity and consistency

refactor(command_handlers.py): update reference to session_overrided_yolo_mode to match new naming convention
refactor(console_ui.py): update reference to session_overrided_yolo_mode to match new naming convention
refactor(input_handler.py): update reference to session_overrided_yolo_mode to match new naming convention
…BOLD to clean up code

docs(command_handlers.py): update docstring for handle_enable_yolo_command method to clarify functionality
@lewistransts lewistransts marked this pull request as ready for review October 18, 2025 05:03
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.

2 participants