Expand description
Reusable GPUI components for Ragrig.
ragrig-gpui packages the chat, composer, transcript, attachment, session,
agent-status and settings surfaces needed to build a RAG front end. The
crate contains no editor widget: it exports the editor roundtrip contract
(editor) so hosting applications such as Scico can plug in their
own editor component.
§State model
The reducers in ChatState are plain data. ChatView wraps one in an
entity, keeps one TextViewState per message for incremental Markdown, and
renders it with MessageScroller. Composer owns its input and emits
ComposerEvents; it does not know about a controller.
§Feature flags
ragrig(default): enables the Ragrig controller, full settings page, and the compositeRagChatsurface. The worker uses a dedicated Tokio runtime thread.grobid: enables GROBID/BibTeX reference ingestion throughgrobid-bibtex, the reference rows, and their hover copy actions. It impliesragrig.
Re-exports§
pub use editor::*;
Modules§
Structs§
- Agent
Bar - A row of pipeline components with status dots and detail popovers.
- Agent
Component - One component shown in the agent bar.
- Agent
Info - The active Ragrig agent, as reported after a successful build.
- Attachment
- One chip above the composer.
- Attachment
Rows - A wrapping row of
Attachmentchips. - Cancel
Flag - A cloneable, thread-safe cancellation flag.
- Chat
Identity - How the assistant signs its messages.
- Chat
Message - A message as stored in a
ChatState. - Chat
Settings - Chat-model configuration.
- Chat
State - The transcript reducer.
- Chat
View - A streamed, Markdown transcript with metadata and source chips.
- Component
Toggle - A switch shown in a component’s status popover.
- Composer
- A reusable chat input.
- Empty
State - The empty-transcript state.
- Ingest
Progress - A readable snapshot of a running ingestion.
- Library
Document - One document in the vector store, for the library panel.
- Library
Snapshot - A snapshot of the vector store.
- Message
Id - Stable identity of one message in a
ChatState. - Message
Meta - Pipeline metadata shown in a message footer.
- NewMessage
- Input for
ChatState::pushandChatState::replace. - Pending
Attachment - One context item waiting for the next question.
- Prompt
Actions - Host actions for the system-prompt file row.
- RagChanges
- The editable fields that differ from the applied configuration.
- RagChat
- A complete chat surface backed by a Ragrig controller.
- RagController
- Sends commands to the Ragrig worker and mirrors its state for widgets.
- RagReply
- Metadata returned with a finished answer.
- RagSettings
- Editable configuration shown by the settings page.
- RagSetup
- Everything needed to build one
ragrig::RagAgent. - Request
Id - Identity of one request (generation or ingestion) sent to the worker.
- Scico
Attach - Merge attachments and retrieved chunks into Scico’s context containers.
- Session
Entry - One saved conversation.
- Session
Info - One saved conversation, before the controller formats it.
- Session
Picker - A dropdown of saved conversations.
- Session
Turn - A conversation turn loaded from the session store.
- Setting
Row - A titled setting row whose title marks unsaved changes.
- Side
Panel - A reusable left/right dock surface.
- Source
Ref - One retrieved source shown under an assistant message.
- Sync
Summary - Result of a completed ingestion.
Enums§
- Agent
BarEvent - What the user asked the agent bar to do.
- Attachment
Event - What the user did with an attachment chip.
- Attachment
Kind - How an attachment chip behaves.
- Attachment
Source - Where an attached context item comes from.
- Chat
Icon - An icon the host can plug into
crate::EmptyStateorcrate::ChatIdentity. - Chat
Provider - Chat backend offered by the settings page.
- Chat
Role - Who authored a message.
- Chat
View Event - What the user did inside the transcript.
- Component
Kind - The role a component plays in the RAG pipeline.
- Component
Status - Status of one agent component.
- Composer
Event - What the host should do after the composer was used.
- Grobid
Source - Where the GROBID server comes from.
- Ingest
Phase - Coarse ingestion phase, used for status text and progress emphasis.
- Memory
Choice - Memory strategy offered by the settings page.
- Message
State - Lifecycle of one message.
- PdfBackend
- PDF backend offered by the settings page.
- RagChat
Event - What the composite chat surface reports to its host.
- RagCommand
- Work sent from the UI to the Ragrig worker.
- RagEvent
- Events emitted by the worker and re-emitted by the controller.
- RagField
- One editable RAG setting.
- RagSection
- A group of settings shown on one page.
- Session
Picker Event - What the user asked the picker to do.
Constants§
- DEFAULT_
GROBID_ IMAGE - The default managed GROBID image: all CRF and Deep Learning models.
- DEFAULT_
GROBID_ URL - The GROBID URL used when no server URL has been configured.
Functions§
- chat_
settings - Build a complete
Settingselement for chat configuration. - chat_
settings_ page - Build the standard chat settings page.
- control
- Box a control closure.
- dirty_
color - The bold violet that marks unsaved settings.
- dirty_
header - The style refinement that marks a page header as unsaved.
- dropdown_
control - A dropdown control built from
(value, label)pairs. - init
- Initializes the GPUI kit and Ragrig UI state.
- no_
changes - A
Changesclosure for hosts that do not track pending edits. - number_
control - A numeric control that commits on Enter or blur.
- path_
control - A path input with a Browse… button, for use inside a
SettingRow. - path_
setting - A path field with a Browse… button.
- rag_
model_ page - The model, retrieval, parsing, and memory groups.
- rag_
reference_ processing_ group - The reference-processing rows for a host that manages the GROBID server on its own External services page.
- rag_
references_ group - The reference-ingestion group for a host’s library page.
- rag_
settings - Build a complete
Settingselement for Ragrig configuration. - rag_
settings_ page - Build the complete Ragrig settings page.
- stabilize_
markdown - Closes a code fence left open at the end of a streaming answer.
- switch_
control - A switch control.
- text_
control - A one-line text control.
- token_
control - A power-of-two token slider, for use inside a
SettingRow. - token_
slider - A slider over powers of two.
Type Aliases§
- Changes
- Reports which settings differ from the configuration applied to the worker.
- Control
- A control rendered beside a
SettingRowtitle. - Export
Prompt - Writes the host’s built-in prompt into the workspace and opens it.
- Open
Prompt - Opens the effective prompt in the host editor.