|
14 | 14 | from iclaw.commands.log import handle_log_command |
15 | 15 | from iclaw.commands.model import handle_model_command, handle_model_provider_command |
16 | 16 | from iclaw.commands.proxy import handle_ca_bundle_command, handle_proxy_command |
| 17 | +from iclaw.commands.read import handle_read_command |
17 | 18 | from iclaw.commands.search_provider import handle_search_provider_command |
18 | 19 | from iclaw.commands.utils import handle_copy_command |
19 | 20 | from iclaw.completer import IclawCompleter |
|
39 | 40 | ("/ca_bundle", "Set CA bundle for HTTPS (usage: /ca_bundle [path|off])"), |
40 | 41 | ("/log", "Set log verbosity (usage: /log [verbose|info])"), |
41 | 42 | ("/copy", "Copy last Copilot response to clipboard"), |
| 43 | + ("/read", "Print file contents to terminal (usage: /read <path>)"), |
42 | 44 | ("/clear", "Clear conversation history"), |
43 | 45 | ("/compact", "Compact conversation history using LLM"), |
44 | 46 | ("/export", "Export full conversation history to JSON file"), |
@@ -115,6 +117,11 @@ def main(): |
115 | 117 | if user_input == "/copy": |
116 | 118 | handle_copy_command(last_reply) |
117 | 119 | continue |
| 120 | + if user_input == "/read" or user_input.startswith("/read "): |
| 121 | + parts = user_input.split(maxsplit=1) |
| 122 | + arg = parts[1] if len(parts) > 1 else None |
| 123 | + handle_read_command(arg) |
| 124 | + continue |
118 | 125 | if user_input == "/provider_model": |
119 | 126 | p, t = handle_model_provider_command(CONFIG_PATH, model_provider) |
120 | 127 | if t: |
|
0 commit comments