Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T02:57:08.563Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

slash_command.rs

44 lines · 1.4 KB · rust
1use std::ops::Range;
2
3/// A slash command for use in the Assistant.
4#[derive(Debug, Clone)]
5pub struct SlashCommand {
6    /// The name of the slash command.
7    pub name: String,
8    /// The description of the slash command.
9    pub description: String,
10    /// The tooltip text to display for the run button.
11    pub tooltip_text: String,
12    /// Whether this slash command requires an argument.
13    pub requires_argument: bool,
14}
15
16/// The output of a slash command.
17#[derive(Debug, Clone)]
18pub struct SlashCommandOutput {
19    /// The text produced by the slash command.
20    pub text: String,
21    /// The list of sections to show in the slash command placeholder.
22    pub sections: Vec<SlashCommandOutputSection>,
23}
24
25/// A section in the slash command output.
26#[derive(Debug, Clone)]
27pub struct SlashCommandOutputSection {
28    /// The range this section occupies.
29    pub range: Range<usize>,
30    /// The label to display in the placeholder for this section.
31    pub label: String,
32}
33
34/// A completion for a slash command argument.
35#[derive(Debug, Clone)]
36pub struct SlashCommandArgumentCompletion {
37    /// The label to display for this completion.
38    pub label: String,
39    /// The new text that should be inserted into the command when this completion is accepted.
40    pub new_text: String,
41    /// Whether the command should be run when accepting this completion.
42    pub run_command: bool,
43}
44
Served at tenant.openagents/omega Member data and write actions are omitted.