feat(chat): view context — tell the assistant what you're looking at
Nightly Build / build (push) Successful in 7m51s

An eye next to the paperclip shares what the user has open with their next
message: the page, the folder being browsed, the file open in the viewer and
any highlighted passage (line numbers where a source view exists), plus which
entity a detail page is about. The bag is client-authored {label, value} pairs
in English — the backend only clamps (chars, never bytes), neutralizes the
harness tag and renders one <system-extra> block per message, deduped
consecutively so it appears exactly when the view changed. On by default,
per-device toggle, hover/tap to preview, a chip on every sent message;
docs/view-context.md for users, an updated harness.md clause for the model.
This commit is contained in:
Daniele
2026-08-23 20:53:30 +01:00
parent 488c702517
commit 505f2e95c1
42 changed files with 2096 additions and 122 deletions
+10
View File
@@ -73,6 +73,16 @@ export default {
'chat.new_session': 'New conversation',
'chat.scroll_to_latest': 'Scroll to latest',
'chat.security_group': 'Security group',
// The eye in the composer. These are labels a person reads, so they are
// translated — unlike the view-context sentences themselves, which are written
// for the model and stay English (see web/lib/view-context-routes.js).
'chat.view_context.on': 'Sharing what you have open — click to stop',
'chat.view_context.off': 'Not sharing what you have open — click to share',
'chat.view_context.title': 'Sent with your next message',
'chat.view_context.off_title': 'Not shared',
'chat.view_context.off_hint': 'The assistant is not told which page, folder or file you have open. Turn the eye on to share it.',
'chat.view_context.empty': 'Nothing to share from this page yet.',
'chat.view_context.chip': 'What you had open ({n})',
'chat.collapse': 'Hide chat',
'chat.close_tab': 'Close tab',
'chat.new_tab': 'New chat',