feat: persist NPC conversation turns#104
Merged
Merged
Conversation
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.
Summary
secondspawn_npc_conversation_getso clients and debug tools can inspect an active NPC conversation session.recent_turnson conversation sessions, including the triggering player line and each NPC reply.conversation_session_idinstead of creating a fresh stateless session every message.recent_turnsin the DOS.AI decision prompt conversation context.Why
NPC chat was model-backed and session-aware, but follow-up player messages could still create fresh sessions. This makes a 1:1 chat behave more like an RPG conversation: the NPC can see what was just said and clients can inspect the session state.
Safety
Local Code Review Fallback
Verdict: APPROVED.
.Codex/docs/technical-preferences.mdis not present, so specialist configuration was skipped.TDD Evidence
recent_turnsand failed becausesecondspawn_npc_conversation_getdid not exist.Verification
npm.cmd installinbackend/nakamanpm.cmd run buildinbackend/nakamanpm.cmd testinbackend/nakamagit diff --check --cachedVerification Note
Unity C# compile still needs Editor/root-checkout verification because isolated worktrees do not contain Unity
Librarypackage assemblies. The Unity changes are DTO string fields plus session-id routing in the existing chat script.Unrelated Files Left Out
The generated knowledge-pack file was touched by
npm run buildline endings only and was intentionally not staged.