Skip to content

Commit 6970a59

Browse files
lzwjavaclaude
andcommitted
feat: add /clear command to empty conversation history
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d31a17b commit 6970a59

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

iclaw/main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
("/ca_bundle", "Set CA bundle for HTTPS (usage: /ca_bundle [path|off])"),
3838
("/log", "Set log verbosity (usage: /log [verbose|info])"),
3939
("/copy", "Copy last Copilot response to clipboard"),
40+
("/clear", "Clear conversation history"),
4041
("/status", "Show current settings"),
4142
("/help", "Show available commands"),
4243
(".exit", "Quit"),
@@ -216,6 +217,11 @@ def main():
216217
print(f" cwd: {os.getcwd()}")
217218
print()
218219
continue
220+
if user_input == "/clear":
221+
messages.clear()
222+
last_reply = None
223+
print("Conversation history cleared.")
224+
continue
219225

220226
if not copilot_token:
221227
print("Not authenticated. Type /provider_model first.", file=sys.stderr)

0 commit comments

Comments
 (0)