fix(ai): accept local session chat replies - #213
Draft
scotej wants to merge 1 commit into
Draft
Conversation
5 tasks
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
What changed and why
Fixes #212.
The attached Windows and macOS diagnostics show the in-session AI requests reaching the pinned llama-server, generating tokens, and returning HTTP 200. The failure was at the client contract: StudyVis requested generic JSON, then rejected any response that was not exactly a one-key
reply_textobject.This change supplies llama.cpp b9095's supported
json_object + schemacontract, bounds the generated reply, and defensively acceptsreply_textwhile ignoring non-executable extra fields. It also keeps fetch and response-body reads inside the request deadline and records privacy-safe outcome/shape diagnostics without prompts, topics, or replies.Manual test
npm run tauri devlaunched and the changed surface behaves as described— not run: this environment has no Rust/desktop model runtime; the exact request, response, timeout, and cancellation paths are covered by unit tests
Compatibility surfaces
None. This does not change persistence, migrations, peer messages, identity derivation, settings, or release artifacts.
Gates
npm run build && npm run lint && npm run test— 1,252 tests passednpm run check-tokens && npm run check-strings && npm run check-contrastnpm run check-migrations && npm run check-storiesnpm run build-storybook && npm run check-a11y— 335 tests passedcd src-tauri && cargo fmt --check && cargo clippy && cargo test— no Rust changes / CI is the first compiler for this box
cd src-tauri && cargo deny check— no dependency changes; CI will run the supply-chain gateAlso verified Prettier,
git diff --check, and version lockstep locally. The old diagnostics intentionally omitted model response bodies, so they prove the healthy transport/engine path but not the exact rejected extra key; the schema mismatch is the high-confidence code-level cause.Merge style