Expand description
The page the user is on, as the assistant sidebar reports it.
Every page of the web UI and every tab of the desktop app declares a small context: the kind of page, the identifiers of the objects on it and the visible state that matters (the section, the revision rule, a search query, the selected row, the rows shown). The client sends it with each question.
A context is a hint, never a fact. PageContext::parse only checks
the shape (lengths, characters, caps) and drops what does not fit; it
never fails and never trusts a value. The server then resolves every
identifier with the rights of the asking user
(services::assistant::resolve_context) and keeps only what that user
may read; an identifier of a restricted group answers exactly like one
that does not exist. Only the resolved context reaches the model, the
thread and the audit record.
Structs§
- Page
Context - What a page declares (see the module documentation).
Constants§
- KINDS
- The kinds of pages. Unknown kinds (a newer client) become
other. - MAX_
FILTERS - Most filters kept.
- MAX_
FILTER_ CHARS - Longest filter value kept (characters).
- MAX_
QUERY_ CHARS - Longest search query kept (characters).
- MAX_
REFERENCE - Longest reference (item number, revision code, change number …).
- MAX_
SHOWN - Most row identifiers kept from the rows a page shows.
Functions§
- is_
reference - Whether
sis a plausible item number, revision code, change number …: short, no spaces. - kind_
label - A readable name of a page kind.