From f5ffa1cb6125d9e36f2259b2a51eac0a2edc2abc Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Mon, 7 Jul 2025 17:07:13 +0530 Subject: [PATCH] fix: rendering of lists in assistant --- src/lib/commandCenter/panels/ai.svelte | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/lib/commandCenter/panels/ai.svelte b/src/lib/commandCenter/panels/ai.svelte index e44d0e28e..58407c678 100644 --- a/src/lib/commandCenter/panels/ai.svelte +++ b/src/lib/commandCenter/panels/ai.svelte @@ -148,7 +148,12 @@ })} clearOnCallback={false} on:keydown={(e) => { - if (e.detail.key !== 'Escape') { + const showingExamples = !$isLoading && !answer; + if (e.detail.key === 'Enter' && $input.trim()) { + e.detail.cancel(); + return; + } + if (e.detail.key !== 'Escape' && !showingExamples) { e.detail.cancel(); } }} @@ -302,15 +307,27 @@ } } - :global(.answer ul), - :global(.answer ol) { - gap: 1rem; + :global(.answer ul) { + padding-inline-start: 1rem; + list-style-type: disc; display: grid; + gap: 1rem; + } + + :global(.answer ol) { + padding-inline-start: 1.1rem; + list-style-type: decimal; + display: grid; + gap: 1rem; } :global(.answer a) { text-decoration: underline; } + + :global(.answer a:hover) { + opacity: 0.8; + } } .experimental {