Skip to content

feat: Patchy mood and waiting indicators, plus named-facts memory - #201

Merged
SummonShenron merged 1 commit into
mainfrom
sonic/patchy-mood-named-facts
Nov 30, 2026
Merged

SummonShenron merged 1 commit into
mainfrom
sonic/patchy-mood-named-facts

Conversation

@SummonShenron

Copy link
Copy Markdown
Owner

feat: Patchy mood and waiting indicators, plus named-facts memory

Opened with Sonic Assistant.

Co-authored-by: Sonic Assistant <sonic-assistant@users.noreply.github.com>
@vercel

vercel Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
saapp Ready Ready Preview Nov 30, 2026 12:28pm UTC

@SummonShenron

Copy link
Copy Markdown
Owner Author

Sonic Assistant PR Overview

Summary

This PR introduces "named-facts" memory to improve fact retrieval when messages reference specific entities, and adds "waiting indicators" to the Mini Patchy UI. These changes ensure the assistant better recalls relevant information when specific names are mentioned and provides visual feedback when the assistant is waiting for user input.

What changed

  • Memory Retrieval:
    • Added backend/utils/named_facts.py to identify names in messages and retrieve associated facts regardless of their semantic rank.
    • Updated backend/utils/memory_utils.py to integrate named_facts into the fact-fetching pipeline and include a note in the context block when specific names are matched.
  • UI and Animations:
    • Created local/src/components/patchyWatch.ts and local/src/hooks/useWatchCheck.ts to define and manage the timing of Patchy’s watch-checking animations.
    • Added local/src/components/turnWaiting.ts to track card-based wait states.
    • Updated local/src/components/PatchyParts.tsx to include watch and ear-listening poses, and local/src/components/MiniPatchy.tsx to trigger these animations when the assistant is in a waiting mood.
    • Modified local/src/components/__styles__/MiniPatchy.css to define the watch-check animations and the "approved" hop.
    • Updated local/src/pages/Chat.tsx to hook into card interactions and update the wait state.

Where to look

  • backend/utils/named_facts.py: The core logic for matching message entities to saved facts.
  • local/src/components/patchyWatch.ts: The timing constants and state machine for the watch-checking behavior.
  • local/src/components/turnWaiting.ts: The state management for tracking whether the assistant is waiting on a specific card.

Risks and gaps

  • The named_facts logic relies on _mid_sentence_capitals and _words parsing; unexpected capitalization or formatting in user facts could lead to missed matches.
  • The watch-checking animation logic is decoupled from React in patchyWatch.ts, which requires careful synchronization with the useWatchCheck hook to avoid memory leaks or stale timers.

Not fully covered by this overview (diff cut short: local/src/pages/Chat.tsx; not read: backend/components/sonic_changelog.py, local/src/components/patchyLook.ts, local/src/hooks/usePatchyMood.ts, local/src/components/RunnerCheckCard.tsx, local/src/hooks/useTurnWaiting.ts, local/src/components/ChoiceCard.tsx, app.py, backend/utils/self_counters.py, ...).

Updated for commit 8dfab28

@SummonShenron
SummonShenron merged commit 18f1159 into main Nov 30, 2026
2 of 4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 8dfab281 Deployed Nov 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants