Module: Clacky::UIInterface

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

Instance Method Details

#append_output(content) ⇒ Object



23
# File 'lib/clacky/ui_interface.rb', line 23

def append_output(content); end

#clear_inputObject

Input control (CLI layer) ===



50
# File 'lib/clacky/ui_interface.rb', line 50

def clear_input; end

#clear_progressObject



38
# File 'lib/clacky/ui_interface.rb', line 38

def clear_progress; end

#log(message, level: :info) ⇒ Object



30
# File 'lib/clacky/ui_interface.rb', line 30

def log(message, level: :info); end

#request_confirmation(message, default: true) ⇒ Object

Blocking interaction ===



47
# File 'lib/clacky/ui_interface.rb', line 47

def request_confirmation(message, default: true); end

#set_idle_statusObject



44
# File 'lib/clacky/ui_interface.rb', line 44

def set_idle_status; end

#set_input_tips(message, type: :info) ⇒ Object



51
# File 'lib/clacky/ui_interface.rb', line 51

def set_input_tips(message, type: :info); end

#set_working_statusObject



43
# File 'lib/clacky/ui_interface.rb', line 43

def set_working_status; end

#show_assistant_message(content, files:) ⇒ Object

Output display ===

Parameters:

  • content (String)

    text portion of the assistant reply (file:// links stripped)

  • files (Array<Hash>)

    extracted file refs: [{ name:, path:, inline: }]



10
# File 'lib/clacky/ui_interface.rb', line 10

def show_assistant_message(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(message); 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(error_message); 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_info(message, prefix_newline: true) ⇒ Object

Status messages ===



26
# File 'lib/clacky/ui_interface.rb', line 26

def show_info(message, prefix_newline: true); end

#show_progress(message = nil, prefix_newline: true, progress_type: "thinking", phase: "active", metadata: {}) ⇒ Object

Progress ===

Unified progress indicator with type-based display customization. progress_type: “thinking” | “retrying” | “idle_compress” | custom phase: “active” | “done” metadata: extensible hash (e.g., 3, total: 10 for retries)



37
# File 'lib/clacky/ui_interface.rb', line 37

def show_progress(message = nil, prefix_newline: true, progress_type: "thinking", phase: "active", metadata: {}); 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(message); 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(message); end

#stopObject

Path redaction (for encrypted brand skill tmpdirs) ===

Lifecycle ===



55
# File 'lib/clacky/ui_interface.rb', line 55

def stop; end

#update_sessionbar(tasks: nil, cost: nil, status: nil) ⇒ Object

State updates ===



41
# File 'lib/clacky/ui_interface.rb', line 41

def update_sessionbar(tasks: nil, cost: nil, status: nil); end

#update_todos(todos) ⇒ Object



42
# File 'lib/clacky/ui_interface.rb', line 42

def update_todos(todos); end