Add page awareness: ground the chatbot in the visitor's current page - #207
Open
HardeepAsrani wants to merge 3 commits into
Open
Add page awareness: ground the chatbot in the visitor's current page#207HardeepAsrani wants to merge 3 commits into
HardeepAsrani wants to merge 3 commits into
Conversation
The widget sends the page URL with each chat turn. The server accepts same-origin URLs only, resolves them to a post when possible, pins the post's KB chunks into the context when indexed, and falls back to extracted page content (cached per post or per URL) when not. Connect mode forwards a page object so the platform can do the same. Pro-only, behind the hyve_page_context_enabled filter. Also adopt the platform-minted thread_id from the streaming done event so Connect chat history survives page navigation.
abaicus
approved these changes
Jul 20, 2026
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 Codeinwp/hyve#249
Pro PR: https://github.com/Codeinwp/hyve/pull/267
Agent PR: https://github.com/Codeinwp/agents/pull/134
This makes the chatbot aware of the page the visitor is chatting from. Questions like "how much does this cost?" used to fail even when the answer was right there on the page, because retrieval had no idea what "this" was.
How it works:
The whole thing is Pro-only: lite ships the plumbing behind the hyve_page_context_enabled filter (default off), and Pro flips it from the new "Page awareness" toggle (Conversation card, default on, needs an active license).
Also in this PR:
Manual QA
Needs Pro with an active license. The toggle lives in Chat Behavior > Conversation ("Page awareness", on by default).