From 8b5dce9effb4342c145409f04f8c9c0f54aa2b80 Mon Sep 17 00:00:00 2001 From: Helena Glowacki <113125436+helenaglow@users.noreply.github.com> Date: Wed, 5 Aug 2026 01:44:02 -0400 Subject: [PATCH 1/2] Test --- src/components/chatbot/Chatbot.tsx | 58 ++++++++++++------------------ 1 file changed, 23 insertions(+), 35 deletions(-) diff --git a/src/components/chatbot/Chatbot.tsx b/src/components/chatbot/Chatbot.tsx index dc36fd5..dcf74da 100644 --- a/src/components/chatbot/Chatbot.tsx +++ b/src/components/chatbot/Chatbot.tsx @@ -9,12 +9,7 @@ import { import { FiSend } from "react-icons/fi"; import { Button, Textarea } from "@chakra-ui/react"; import { nanoid } from "nanoid"; -import type { - ChatOpening, - LlmRequestLog, - Message, - Stage, -} from "../../types"; +import type { ChatOpening, LlmRequestLog, Message, Stage } from "../../types"; import { Role } from "../../types"; import ReactMarkdown from "react-markdown"; import remarkGfm from "remark-gfm"; @@ -36,7 +31,7 @@ interface ChatTabProps { } export const BLACKOUT_ASSISTANT_PROMPT_VERSION = - "blackout-assistant-2026-08-04-v1"; + "blackout-assistant-2026-08-05-v1"; /** * Keep the locator-excerpt convention identical across both stages so users @@ -50,16 +45,17 @@ Blackout poetry: the poet starts with an existing passage and creates a poem by Grounding: - Work only with the passage provided below. Never reference or substitute any other text. -- When you point to a specific passage word, show it in a short excerpt containing two or three nearby passage words in total when available. Bold only the word you are pointing to. The unbolded words are only a locator to help the user find it; they are not part of the suggestion. -- Quote passage words exactly as written, keep multiple suggested words in passage order, and point to at most five words in a single response. -- Use bold only for passage words you are pointing to, never for general emphasis. +- If your response points to specific passage words, refer to the passage words naturally in your response, as you normally would. +- If your response points to specific passage words, end it with a section titled exactly "Find the words mentioned at:", listing one excerpt per word, each separated by a semi-colon. Each excerpt has two or three nearby passage words, with only the target word bolded. This section should all be one line, without headers. Omit this section if you did not point to a specific word. +- Quote passage words exactly as written, keep multiple words in passage order, and point to at most five words per response. +- Use bold only inside the "Find words at:" section. - Never suggest a word that does not appear in the passage. Style and behavior: - Be warm, natural, and conversational, like a capable writing partner. Avoid ungrounded or sycophantic flattery. - Write in complete, everyday sentences. Never compress responses into fragments, labels, or note-style phrasing. If a response is running long, cut options rather than grammar. - Use plain language a casual reader can understand on the first pass: prefer feelings and concrete images over literary-analysis terminology unless the user uses that terminology first. -- The user is working under time pressure. Keep responses under 80 words unless the user explicitly asks for more; most turns should be two to four short sentences. +- The user is working under time pressure. Keep responses under 80 words, not counting the "Find words at:" section, unless the user explicitly asks for more; most turns should be two to four short sentences. - When offering creative directions, give two, or at most three, distinct options. Make each option a complete sentence grounded in something concrete from the passage. A short bulleted list is fine, but do not use headers or tables. - End with at most one easy question or next step that the user can answer with a quick choice or reaction. - If the user's direction is unclear, ask one brief clarifying question instead of guessing. @@ -237,13 +233,7 @@ CURRENT SELECTED WORDS (in passage order): ${selectedWords || "none yet"}`, timeoutRef.current = null; } }; - }, [ - chatReady, - hasShownIdleNudge, - hasUserMessageInStage, - setMessages, - stage, - ]); + }, [chatReady, hasShownIdleNudge, hasUserMessageInStage, setMessages, stage]); const sendMessage = async (messageContent?: string) => { const content = messageContent || input; @@ -387,24 +377,22 @@ CURRENT SELECTED WORDS (in passage order): ${selectedWords || "none yet"}`, ))} - {chatReady && - !hasUserMessageInStage && - !isLLMLoading && ( -
Try asking me:
-Try asking me:
+