Skip to content

fix(ai): repair current chapter context - #724

Open
cha1latte wants to merge 1 commit into
codedogQBY:mainfrom
cha1latte:fix/upstream-current-chapter-context
Open

fix(ai): repair current chapter context#724
cha1latte wants to merge 1 commit into
codedogQBY:mainfrom
cha1latte:fix/upstream-current-chapter-context

Conversation

@cha1latte

Copy link
Copy Markdown
Contributor

Summary

  • resolve reader context from the loaded TOC so subsection anchors that share a document map to their logical parent chapter
  • resync AI reading context when the TOC arrives after the latest relocate event
  • reuse cached original-book chapters during repeated generic TOC reads instead of clearing the warm fallback first
  • localize agent guardrail errors and remove hardcoded Chinese failure text

Verification

  • pnpm --filter @readany/core test — 80 files, 590 tests passed
  • pnpm --filter @readany/app-expo test — 6 files, 14 tests passed
  • pnpm --filter @readany/app-expo exec tsc --noEmit — passed
  • Biome check on all 16 changed files — zero errors
  • Live Android proof: Desire at “Opening Up” resolved to Chapter 8 at 77.2%, answered in English, with no ragToc timeout

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.

1 participant