fix: move <pre> outside #prompt-display to prevent innerHTML from destroying it

The renderPromptEntry() function sets innerHTML on #prompt-display, which
was wiping out the child <pre id="last-prompt"> element. This caused
copyPromptToClipboard() to fail silently and the display to appear empty.

Fix: keep <pre> as a hidden sibling outside #prompt-display, used only as
a text buffer for the copy function.
This commit is contained in:
2026-05-02 15:45:54 +03:00
parent a980b90c0a
commit 2dd32d0ef1

View File

@@ -586,9 +586,9 @@
</div> </div>
<!-- Prompt display subsections --> <!-- Prompt display subsections -->
<div id="prompt-display" style="max-height: 60vh; overflow-y: auto;"> <div id="prompt-display" style="max-height: 60vh; overflow-y: auto;"></div>
<pre id="last-prompt" style="white-space: pre-wrap; word-break: break-word; background: #1a1a1a; padding: 0.75rem; border-radius: 4px; font-size: 0.8rem; line-height: 1.4; margin: 0;"></pre> <!-- Hidden buffer for copy-to-clipboard raw text -->
</div> <pre id="last-prompt" style="display: none;"></pre>
</div> </div>
</div> </div>
</div> </div>