Module: Clacky::UIInterface
- Included in:
- Channel::ChannelUIController, JsonUIController, PlainUIController, Server::WebUIController, Clacky::UI2::UIController
- Defined in:
- lib/clacky/ui_interface.rb
Overview
UIInterface defines the standard interface between Agent/CLI and UI implementations. All UI controllers (UIController, JsonUIController) must implement these methods.
Instance Method Summary collapse
- #append_output(content) ⇒ Object
-
#clear_input ⇒ Object
Input control (CLI layer) ===.
- #clear_progress ⇒ Object
- #log(message, level: :info) ⇒ Object
-
#request_confirmation(message, default: true) ⇒ Object
Blocking interaction ===.
- #set_idle_status ⇒ Object
- #set_input_tips(message, type: :info) ⇒ Object
- #set_working_status ⇒ Object
-
#show_assistant_message(content, files:) ⇒ Object
Output display ===.
- #show_complete(iterations:, cost:, duration: nil, cache_stats: nil, awaiting_user_feedback: false) ⇒ Object
- #show_diff(old_content, new_content, max_lines: 50) ⇒ Object
- #show_error(message) ⇒ Object
- #show_file_edit_preview(path) ⇒ Object
- #show_file_error(error_message) ⇒ Object
- #show_file_write_preview(path, is_new_file:) ⇒ Object
-
#show_idle_status(phase:, message:) ⇒ Object
Idle compression status === Emits a two-phase idle compression status update.
-
#show_info(message, prefix_newline: true) ⇒ Object
Status messages ===.
-
#show_progress(message = nil, prefix_newline: true, output_buffer: nil) ⇒ Object
Progress ===.
- #show_shell_preview(command) ⇒ Object
- #show_success(message) ⇒ Object
- #show_token_usage(token_data) ⇒ Object
- #show_tool_args(formatted_args) ⇒ Object
- #show_tool_call(name, args) ⇒ Object
- #show_tool_error(error) ⇒ Object
- #show_tool_result(result) ⇒ Object
- #show_tool_stdout(lines) ⇒ Object
- #show_warning(message) ⇒ Object
-
#stop ⇒ Object
Path redaction (for encrypted brand skill tmpdirs) === === Lifecycle ===.
-
#update_sessionbar(tasks: nil, cost: nil, status: nil) ⇒ Object
State updates ===.
- #update_todos(todos) ⇒ Object
Instance Method Details
#append_output(content) ⇒ Object
23 |
# File 'lib/clacky/ui_interface.rb', line 23 def append_output(content); end |
#clear_input ⇒ Object
Input control (CLI layer) ===
52 |
# File 'lib/clacky/ui_interface.rb', line 52 def clear_input; end |
#clear_progress ⇒ Object
34 |
# File 'lib/clacky/ui_interface.rb', line 34 def clear_progress; end |
#log(message, level: :info) ⇒ Object
30 |
# File 'lib/clacky/ui_interface.rb', line 30 def log(, level: :info); end |
#request_confirmation(message, default: true) ⇒ Object
Blocking interaction ===
49 |
# File 'lib/clacky/ui_interface.rb', line 49 def request_confirmation(, default: true); end |
#set_idle_status ⇒ Object
40 |
# File 'lib/clacky/ui_interface.rb', line 40 def set_idle_status; end |
#set_input_tips(message, type: :info) ⇒ Object
53 |
# File 'lib/clacky/ui_interface.rb', line 53 def set_input_tips(, type: :info); end |
#set_working_status ⇒ Object
39 |
# File 'lib/clacky/ui_interface.rb', line 39 def set_working_status; end |
#show_assistant_message(content, files:) ⇒ Object
Output display ===
10 |
# File 'lib/clacky/ui_interface.rb', line 10 def (content, files:); end |
#show_complete(iterations:, cost:, duration: nil, cache_stats: nil, awaiting_user_feedback: false) ⇒ Object
22 |
# File 'lib/clacky/ui_interface.rb', line 22 def show_complete(iterations:, cost:, duration: nil, cache_stats: nil, awaiting_user_feedback: false); end |
#show_diff(old_content, new_content, max_lines: 50) ⇒ Object
20 |
# File 'lib/clacky/ui_interface.rb', line 20 def show_diff(old_content, new_content, max_lines: 50); end |
#show_error(message) ⇒ Object
28 |
# File 'lib/clacky/ui_interface.rb', line 28 def show_error(); end |
#show_file_edit_preview(path) ⇒ Object
17 |
# File 'lib/clacky/ui_interface.rb', line 17 def show_file_edit_preview(path); end |
#show_file_error(error_message) ⇒ Object
18 |
# File 'lib/clacky/ui_interface.rb', line 18 def show_file_error(); end |
#show_file_write_preview(path, is_new_file:) ⇒ Object
16 |
# File 'lib/clacky/ui_interface.rb', line 16 def show_file_write_preview(path, is_new_file:); end |
#show_idle_status(phase:, message:) ⇒ Object
Idle compression status ===
Emits a two-phase idle compression status update. phase: :start → show “Idle detected. Compressing…” (with spinner) phase: :end → update same element with final result (skipped / compressed)
46 |
# File 'lib/clacky/ui_interface.rb', line 46 def show_idle_status(phase:, message:); end |
#show_info(message, prefix_newline: true) ⇒ Object
Status messages ===
26 |
# File 'lib/clacky/ui_interface.rb', line 26 def show_info(, prefix_newline: true); end |
#show_progress(message = nil, prefix_newline: true, output_buffer: nil) ⇒ Object
Progress ===
33 |
# File 'lib/clacky/ui_interface.rb', line 33 def show_progress( = nil, prefix_newline: true, output_buffer: nil); end |
#show_shell_preview(command) ⇒ Object
19 |
# File 'lib/clacky/ui_interface.rb', line 19 def show_shell_preview(command); end |
#show_success(message) ⇒ Object
29 |
# File 'lib/clacky/ui_interface.rb', line 29 def show_success(); end |
#show_token_usage(token_data) ⇒ Object
21 |
# File 'lib/clacky/ui_interface.rb', line 21 def show_token_usage(token_data); end |
#show_tool_args(formatted_args) ⇒ Object
15 |
# File 'lib/clacky/ui_interface.rb', line 15 def show_tool_args(formatted_args); end |
#show_tool_call(name, args) ⇒ Object
11 |
# File 'lib/clacky/ui_interface.rb', line 11 def show_tool_call(name, args); end |
#show_tool_error(error) ⇒ Object
14 |
# File 'lib/clacky/ui_interface.rb', line 14 def show_tool_error(error); end |
#show_tool_result(result) ⇒ Object
12 |
# File 'lib/clacky/ui_interface.rb', line 12 def show_tool_result(result); end |
#show_tool_stdout(lines) ⇒ Object
13 |
# File 'lib/clacky/ui_interface.rb', line 13 def show_tool_stdout(lines); end |
#show_warning(message) ⇒ Object
27 |
# File 'lib/clacky/ui_interface.rb', line 27 def show_warning(); end |
#stop ⇒ Object
Path redaction (for encrypted brand skill tmpdirs) ===
Lifecycle ===
57 |
# File 'lib/clacky/ui_interface.rb', line 57 def stop; end |
#update_sessionbar(tasks: nil, cost: nil, status: nil) ⇒ Object
State updates ===
37 |
# File 'lib/clacky/ui_interface.rb', line 37 def (tasks: nil, cost: nil, status: nil); end |
#update_todos(todos) ⇒ Object
38 |
# File 'lib/clacky/ui_interface.rb', line 38 def update_todos(todos); end |