Repository navigation
The chat's persona is kept on the server, and nobody is slipped into a chat - #339
Merged
Merged
Conversation
… into a chat (#334) A new chat that named no persona was silently answered by the account's default persona, so the desktop said "Assistant" in its header while Kurisu answered, and a sign-in again opened an empty chat under "Assistant" because the desktop kept its pick in local storage. The server no longer adopts anyone: a chat request that names no persona is the assistant's own. assistants.default_persona_id becomes selected_persona_id by migration (a rename, so each account opens on the persona it had): who the chat is on, which the clients read when they open and write when the user picks someone, and which the server never applies. Removed field, so the wire protocol goes to 8. Desktop: the persona store loads and saves the selection through /assistant instead of local storage; the Personas page's Default badge and Make/Clear default become "In the chat", "Talk to" and "Use the assistant". Android: the rename, and the chat's Assistant row works in a chat that has not started yet. The mock follows the backend. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014L9pxjp1MTSJe5DZG9A9sv
) The selection now comes back with GET /assistant after sign-in, where local storage had it at once. A message sent inside that round trip named nobody and the assistant answered instead of the persona the chat is on — Windows CI sent inside it. The first send of a new chat now waits for the selection to load, at most ten seconds; sign-out marks it unknown again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014L9pxjp1MTSJe5DZG9A9sv
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.
Closes #334
What was wrong
assistants.default_persona_id. The desktop header said "Assistant" while Kurisu answered.What changed (the owner's decisions)
chat_requestthat names no persona is the assistant's own.pick_personahas no default step.assistants.default_persona_idbecomesselected_persona_id: who the chat is on. Clients read it when they open and write it when the user picks someone, and the server never applies it.40309c742302is a column rename (the FK constraint too), so each account opens on the persona it had.version.py. Backend,constants.ts, the AndroidBuildConfigandprotocol/events.jsonare all updated. The next release should be a new minor.personaStoreloads the selection fromGET /assistantand saves it withPATCH /assistant, instead of local storage. The old key is dropped with the other legacy keys.update_assistantapp tool takesselected_persona_idand goes through the store.PATCH /assistant.Tests
Each new test was run first against the unfixed code and failed:
test_the_selected_persona_is_not_slipped_into_a_chat_that_names_noneanswered as Kurisu, and theTestTheChatSelectiontests had no field.personaSelection.test.tsfailed on load and on save.a_new_chat_can_be_the_assistants_own_while_a_default_persona_is_setfound the row held back.After the fix, all local:
TestMime[notes.md].npm test: all suites pass.npm run typecheck: clean.MockBackendChatTest,NoPersonaTestandConversationsTest: 7/7.personaOptional.spec.tsthen passed 6/6.🤖 Generated with Claude Code
https://claude.ai/code/session_014L9pxjp1MTSJe5DZG9A9sv