Repository navigation
feat(timeline): ask the assistant about a feed item from the item - #588
Merged
Merged
Conversation
An opened timeline item has "Ask about this", and `a` on a line does the same: the chat beside the page opens with the item's id, line, time, link and fields as what the question is about (sent as the highlighted part, so the model reads it as data). The page chat listens for a lens:ask-about event that any page's own buttons can send. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q5D9UGwJBfue5FU8tL27aF
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.
Requested by Adeel · project thread
Description
Before: to talk to the assistant about something on the Timeline you had to open the chat and describe the item yourself, or highlight its text.
After: an opened item has Ask about this, and
aon a line does the same (every item of a grouped line). The chat beside the page opens with the item as what the question is about: its id, kind, time, who did it, its line, where it opens and its fields. You type the question and press Enter.How: the page chat listens for a
lens:ask-aboutwindow event (askAbout()inpage-chat-model.ts) and opens with that text as the highlighted part, so it reuses the existing page-context path. The server already wraps that path as untrusted data (chat.with_context).askQuote()intimeline/model.tsbuilds the text, keeping whole items up to 4,000 characters. Because the id is included, "mark it important" works through the assistant's existingmark_activitiestool.Motivation and Context
This is the queued feature "Talk to the agent from a feed item". @lens inside a comment is a separate feature, owned by the Activity stream thread (#570 and the PR after it). This PR doesn't touch that work.
Types of changes
Checklist:
timeline-ui.test.tsx,page-chat.test.tsx).docs/(timeline.md "Asking about an item", assistant.md).changelog.d/ask-about-timeline-item.md.Local CI (
ci/local-ci.sh --jobs frontend,pre-commit,title) on 182030f: Next.js pass, pre-commit pass, PR title pass.Done questions
timeline) and act on them by id (mark_activities). This PR adds the person-side entry point.Generated by Claude Code