From eee4addd86e4eef146cc726a943e26ff033fc258 Mon Sep 17 00:00:00 2001 From: Abdussamet Kocak Date: Tue, 28 Jul 2026 09:22:15 +0200 Subject: [PATCH] feat(chat): Add undo button to trim conversation to a prior message Lets you click Undo under a user message to drop it and everything after it, refilling the prompt with that message's text/images so it can be edited and resent. --- chat/index.html | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/chat/index.html b/chat/index.html index 55f005d..a881150 100644 --- a/chat/index.html +++ b/chat/index.html @@ -97,6 +97,23 @@ margin-left: auto; white-space: pre-wrap; } + .undo-btn { + display: block; + margin-left: auto; + margin-top: 0.4rem; + background: rgba(255, 255, 255, 0.15); + color: var(--text-user); + border: 1px solid rgba(255, 255, 255, 0.4); + border-radius: 0.3rem; + padding: 0.15rem 0.5rem; + font-size: 0.8em; + cursor: pointer; + opacity: 0.7; + transition: opacity 0.2s; + } + .undo-btn:hover { + opacity: 1; + } .system-message { background: var(--bg-secondary); margin-right: auto; @@ -283,6 +300,7 @@
+