From 2860f88218e24ab0c08fedcfde75515b759af1c5 Mon Sep 17 00:00:00 2001 From: mehfuz Date: Fri, 6 Nov 2026 13:47:26 -0800 Subject: [PATCH] Refresh skills after each chat turn so a skill saved in chat shows in the / picker and skills panel --- src/app/components/chat.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/components/chat.tsx b/src/app/components/chat.tsx index e860fd5..a91470b 100644 --- a/src/app/components/chat.tsx +++ b/src/app/components/chat.tsx @@ -369,6 +369,15 @@ export default function Chat(props: { const messages = session.messages; const chatStream = useChatStream(); const isLoading = starting || session.busy; + // A turn can add, change or delete a skill ("save this as a skill"); when it + // ends, have the "/" picker and the skills panel read the list again. + const wasBusyRef = useRef(false); + useEffect(() => { + if (wasBusyRef.current && !session.busy) { + window.dispatchEvent(new CustomEvent('skillsSaved')); + } + wasBusyRef.current = session.busy; + }, [session.busy]); // Image attachments require a vision-capable model — the SLP backend // OCRs/describes images through it at attachment-upload time. const visionEnabled = enabledCapabilities.has('vision');