Feat/v0.5 loop reenable - #11
Merged
Merged
Conversation
1. Cookie-based persona resolution (demo-fs.ts): Module-level currentPersona does not survive across serverless requests. SSR sets it in instance A, but server actions may hit instance B where it defaults to 'personal_14'. Fix: persist persona selection via cookie set during page SSR, read back in getCurrentPersona() for server actions and API routes. 2. Turn parser regex inconsistency (turn-parser.ts): TURN_HEADER_RE used '--' (two ASCII hyphens) and \d+ (numeric turn IDs only). Manager.ts serializeSlice uses em-dash '—' (U+2014) and base64url turn IDs. When the agent calls readSlice with a range parameter, parseTurns matched zero turns and returned '_(No turns matched the requested range.)_'. Fix: use em-dash and \S+ consistently across both parsers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Server actions cannot access searchParams on the server side. The client component now reads persona from window.location.search and passes it as a parameter to getEpisodicState/getMoreSlices/ getSliceContent. Each server action calls setDemoPersona() on entry so all downstream reads use the correct persona. Reverted the cookie-based resolvePersona() approach in demo-fs.ts — back to simple module-level currentPersona with optional persona override on readFileDemo/listFilesDemo. Also fixed turn-parser.ts regex: em-dash separator + \S+ turn IDs to match manager.ts serializeSlice format. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Gray-matter parses unquoted YAML list values containing ': ' (colon +
space) as key-value objects instead of strings. e.g.:
- Draft guide on the model: retention chain
becomes { 'Draft guide on the model': 'retention chain' }
React Error #31 when HistoricalChatView renders these as children.
Added normalizeString / normalizeStringArray helpers in parseSlice
to coerce objects back to strings.
Affects 4 slices in personal_14 with unquoted open_loops.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Extend normalizeStringArray to related_slices and loops as well. emotional_tone is a union literal type, kept as-is. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.