Skip to main content

Crate subspace_agent

Crate subspace_agent 

Source
Expand description

Local chat runtimes. Service tools come from the boards the product selects, as a subspace_agent_tools::Catalog. No GPUI dependencies.

Re-exports§

pub use failure::FailureCategory;
pub use failure::TurnFailure;

Modules§

canvas
Read-only native canvas input and per-conversation selection.
failure
Why a Copilot turn failed, with the facts that help to report it. The runtime builds a TurnFailure from a session.error event, or when the Copilot runtime stops or stops answering, and the chat panel shows its title, its action and its details.

Structs§

AgentHandle
ChatPreferences
Preferences captured by the UI at the boundary where a new chat opens.
Choice
ContextRef
ImageAttachment
An image kept in the chat draft until the user explicitly submits it. Shared bytes let the UI retain a rejected draft without copying its payload.
ModelChoice
A model the SDK offers, with the reasoning efforts it supports.
SessionSummary
A saved conversation of the current account.
SlashCommand
A skill-backed slash command. Runtime built-ins are not offered.
ToolCall
One tool call, built from the toolRequests entry that asked for it and the execution events that carry its outcome. call_id is the SDK’s toolCallId, so start and completion update one transcript row.
TranscriptEntry
Usage
What the SDK reported for the last request. Every field is optional: a missing counter is omitted rather than invented, and this is never a remaining credit balance.

Enums§

AcpAgent
An ACP agent preset. Custom runs chat.acp.command.
ChatCommand
What one open chat is asked to do.
ChatEngine
ChatEvent
What happened in one open chat.
ChatMode
The agent interaction mode, mapped to the SDK SessionMode.
Command
Entry
A transcript row. The runtime builds these from SDK events, so the view never parses preformatted text.
EntryKind
Event
SignInOffer
The sign-in that would give chat a working GitHub account.
ToolStatus
How a tool call ended, as tool.execution_complete reported it.

Constants§

ATTACHMENT_MARKER
Separates the message from each attached reference in a sent prompt. The chat transcript replays the whole prompt, so the UI splits it on this.
COPILOT_BUILT_IN
Whether this build has the Copilot engine, the crate’s copilot feature.
COPILOT_UNAVAILABLE
What a build without Copilot says when the config file selects it. The file keeps the choice, so a build with Copilot starts it again.
DRAFT_ATTACHMENT_LIMIT
One draft’s total encoded image budget, matching the existing private attachment-workspace budget.
MAX_CHATS
The most chats the runtime keeps open at once.

Traits§

ChatToolServer

Functions§

export_file_name
A file name for the save dialog: the chat’s name, without path separators and without the ellipsis a cut display name carries.
read_attachment_image
Reads a prospective image attachment without following symlinks or trusting metadata alone. Decoding remains the UI image module’s responsibility.
repeats
Whether a title says what an argument summary already says.

Type Aliases§

ChatId
One open chat, as the panel numbers its tabs. The runtime never invents one: it only answers for the ids the panel opened, or the ids it reports in Event::Restore.