From c1fcb1e287b6a442c08e5b435836361b5cecf891 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 31 Mar 2026 12:57:25 -0400 Subject: [PATCH] =?UTF-8?q?feat:=20discuss=20article=20in=20briefing=20cha?= =?UTF-8?q?t=20via=20=F0=9F=92=AC=20button=20on=20news=20cards?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clicking 💬 on a news card in the briefing panel pre-fills the briefing chat input with the article title, snippet, and source so the user can ask the briefing LLM to summarize or discuss it directly. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/views/BriefingView.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/frontend/src/views/BriefingView.vue b/frontend/src/views/BriefingView.vue index f911cd8..4d558fe 100644 --- a/frontend/src/views/BriefingView.vue +++ b/frontend/src/views/BriefingView.vue @@ -174,6 +174,15 @@ async function send() { } } +function discussArticle(item: NewsItem) { + const snippet = item.snippet ? `\n\n"${item.snippet.slice(0, 400)}${item.snippet.length > 400 ? '…' : ''}"` : '' + input.value = `Can you summarize and discuss this article for me?\n\n**${item.title}**${snippet}\n\nSource: ${item.source}` + // Scroll the chat panel into view on narrow layouts + nextTick(() => { + document.querySelector('.briefing-chat')?.scrollIntoView({ behavior: 'smooth', block: 'nearest' }) + }) +} + function onKeydown(e: KeyboardEvent) { if (e.key === 'Enter' && !e.shiftKey) { e.preventDefault() @@ -525,6 +534,12 @@ onMounted(async () => { @click="handleReaction(item.id, 'down')" title="Not interested" >👎 +