ccproxy.api.ui¶
ccproxy.api.ui
¶
UI components for CCProxy API.
TerminalPermissionHandler
¶
Handles confirmation requests in the terminal using Textual with request stacking.
Implements ConfirmationHandlerProtocol for type safety and interoperability.
Source code in ccproxy/api/ui/terminal_permission_handler.py
handle_permission
async
¶
Handle a permission request.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request
|
PermissionRequest
|
The permission request to handle |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if the user confirmed, False otherwise |
Source code in ccproxy/api/ui/terminal_permission_handler.py
cancel_confirmation
¶
Cancel an ongoing confirmation request.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request_id
|
str
|
The ID of the request to cancel |
required |
reason
|
str
|
The reason for cancellation |
'cancelled'
|
Source code in ccproxy/api/ui/terminal_permission_handler.py
shutdown
async
¶
Shutdown the handler and cleanup resources.