diff --git a/grid-agent-gui/frontend/src/components/ChatInterface.svelte b/grid-agent-gui/frontend/src/components/ChatInterface.svelte index 5f279fe..f178454 100644 --- a/grid-agent-gui/frontend/src/components/ChatInterface.svelte +++ b/grid-agent-gui/frontend/src/components/ChatInterface.svelte @@ -35,6 +35,7 @@ let errorMessage = ""; let isExporting = false; let isAborting = false; + let showClearModal = false; // Update notification state let showUpdateBanner = false; @@ -235,6 +236,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; } @@ -612,6 +628,25 @@ > {/if} + + + + + + +{/if} + (showSettings = false)} /> (showDocs = false)} /> @@ -970,6 +1020,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 46ec2bd..165ab94 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.