From 082444dd7ecfc04edad657925e4cba8334d75795 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Sat, 4 Apr 2026 21:48:04 +0200 Subject: [PATCH] add /clear command; note: /compact requires LLM summarizer (not yet implemented) --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.go b/main.go index 744c6a0..338def4 100644 --- a/main.go +++ b/main.go @@ -854,11 +854,18 @@ func (m *model) handleCommand(input string) bool { m.display = append(m.display, fmt.Sprintf("agent: %s", name)) return true + case "/clear": + m.session = nil + m.display = nil + m.buf = "" + return true + case "/help": m.display = append(m.display, "Available commands:") m.display = append(m.display, " /agent [name] - Show or switch active agent") m.display = append(m.display, " /backend - Switch backend (ollama, openai)") m.display = append(m.display, " /model - Switch model") + m.display = append(m.display, " /clear - Clear session and display") m.display = append(m.display, " /help - Show this help") return true }