Skip to content

feat: add moment capture, shared moments and memory page updates - #194

Merged
SummonShenron merged 1 commit into
mainfrom
sonic/working-changes-2026-11-25-moments
Nov 26, 2026
Merged

SummonShenron merged 1 commit into
mainfrom
sonic/working-changes-2026-11-25-moments

Conversation

@SummonShenron

Copy link
Copy Markdown
Owner

Adds moment_capture and shared_moments utilities with their tests, wires them into app.py and constraints, and updates the Memory page, its topics helper and the API client to show them. Also touches memory erase, memory maintenance and self counters.

Opened with Sonic Assistant.

Adds moment_capture and shared_moments utilities with their tests, wires them into app.py and constraints, and updates the Memory page, its topics helper and the API client to show them. Also touches memory erase, memory maintenance and self counters.

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

vercel Bot commented Nov 26, 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 26, 2026 1:33am UTC

@SummonShenron

Copy link
Copy Markdown
Owner Author

Sonic Assistant PR Overview

Summary

This PR introduces "Shared Moments," a feature allowing Sonic to recall and reference specific, approved interactions from the user's history. It adds automated capture of memorable exchanges and a new "Our history" section on the Memory page where users can review, approve, or remove these moments.

What changed

  • Moment Capture & Storage: Added backend/utils/moment_capture.py to identify memorable exchanges based on signals (shared past, milestones, verdicts) and backend/utils/shared_moments.py to manage the lifecycle (proposed, approved, dismissed) of these moments.
  • App Integration: Updated app.py to integrate moment_capture into the response path and shared_moments into the prompt generation, ensuring Sonic only references approved moments.
  • UI Updates: Modified local/src/pages/Memory.tsx and local/src/pages/memoryTopics.ts to add an "Our history" tab for managing moments. Updated local/src/api.ts to provide the necessary API endpoints for listing, updating, and deleting moments.
  • Maintenance & Changelog: Added propose-moments to backend/utils/memory_maintenance.py for manual seeding and updated backend/components/sonic_changelog.py to reflect the new feature.

Where to look

  • backend/utils/moment_capture.py: Review the worth_a_look and capture logic to understand how the system filters and extracts moments from conversation history.
  • backend/utils/shared_moments.py: Examine pick and build_block to see how moments are selected for inclusion in the prompt and how they are spaced using GAP_MESSAGES.
  • app.py: Check the steerable_turn logic where shared_moments.pick is called and how ai_message.additional_kwargs is used to track usage.

Risks and gaps

  • Model Reliance: The system relies on a small-model call to extract moments; while it includes grounding checks, there is a risk of capturing sensitive or incorrect information if the prompt constraints are bypassed.
  • State Management: The _last_call dictionary in moment_capture.py is in-memory; it will reset on server restarts, potentially causing a burst of moment captures upon deployment.

Not fully covered by this overview (diff cut short: backend/utils/moment_capture.py, backend/utils/shared_moments.py, local/src/pages/Memory.tsx, app.py, backend/components/sonic_changelog.py; not read: backend/utils/memory_erase.py, backend/utils/self_counters.py, local/src/components/helpTips.ts, backend/tests/test_moment_capture.py, backend/tests/test_shared_moments.py, local/src/pages/memoryTopics.test.mjs, backend/tests/test_memory_erase.py).

Updated for commit 754e6af

@SummonShenron
SummonShenron merged commit 2309f67 into main Nov 26, 2026
2 of 4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 754e6afa Deployed Nov 26, 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