diff --git a/grid-agent-gui/frontend/src/components/ChatInterface.svelte b/grid-agent-gui/frontend/src/components/ChatInterface.svelte index 7ab12d9..6bd5ae8 100644 --- a/grid-agent-gui/frontend/src/components/ChatInterface.svelte +++ b/grid-agent-gui/frontend/src/components/ChatInterface.svelte @@ -34,6 +34,7 @@ let showErrorModal = false; let showSettings = false; let showDocs = false; + let showClearModal = false; let errorMessage = ""; let isExporting = false; let isAborting = false; @@ -275,6 +276,21 @@ errorMessage = ""; } + function handleClear() { + showClearModal = true; + } + + function clearConversation() { + showClearModal = false; + messagesStore.set([]); + } + + async function saveAndClear() { + showClearModal = false; + await handleExport(); + messagesStore.set([]); + } + function toggleSettings() { showSettings = !showSettings; } @@ -677,6 +693,25 @@ > {/if} + + + + + + +{/if} + (showSettings = false)} /> (showDocs = false)} /> @@ -1058,6 +1108,15 @@ background: rgba(239, 68, 68, 0.1); } + .clear-btn { + color: var(--text-secondary); + } + + .clear-btn:hover { + color: var(--error); + background: rgba(239, 68, 68, 0.1); + } + /* Floating Input Area */ .input-area { padding: 1.5rem; diff --git a/grid-agent-gui/frontend/src/components/Docs.svelte b/grid-agent-gui/frontend/src/components/Docs.svelte index 813bf60..ece772d 100644 --- a/grid-agent-gui/frontend/src/components/Docs.svelte +++ b/grid-agent-gui/frontend/src/components/Docs.svelte @@ -191,6 +191,15 @@
  • Version information and active persona
  • Optional AI-generated summary (if enabled)
  • + +
    Clearing Conversations
    +

    The clear button (🗑️) allows you to reset the current conversation. Before clearing, you'll be prompted with options:

    + +

    Note: Cleared conversations cannot be recovered, so consider saving important discussions first.