Skip to content

slash_commands

Class info

Classes

Name Children Inherits
AvailableCommand
aclientp.schema.slash_commands
Information about a command.
    AvailableCommandInput
    aclientp.schema.slash_commands
    A container for the input specification for a command.
        CommandInputHint
        aclientp.schema.slash_commands
        All text that was typed after the command name is provided as input.

          🛈 DocStrings

          Slash command schema definitions.

          AvailableCommand

          Bases: AnnotatedObject

          Information about a command.

          Source code in src/aclientp/schema/slash_commands.py
          class AvailableCommand(AnnotatedObject):
              """Information about a command."""
          
              description: str
              """Human-readable description of what the command does."""
          
              input: AvailableCommandInput | None = None
              """Input for the command if required."""
          
              name: str
              """Command name (e.g., `create_plan`, `research_codebase`)."""
          
              @classmethod
              def create(cls, name: str, description: str, input_hint: str | None = None) -> Self:
                  """Create a new Command.
          
                  Args:
                      name: Name of the command.
                      description: Description of the command.
                      input_hint: Hint for the input.
          
                  Returns:
                      A new available command.
                  """
                  spec = AvailableCommandInput(root=CommandInputHint(hint=input_hint)) if input_hint else None
                  return cls(name=name, description=description, input=spec)
          

          description instance-attribute

          description: str
          

          Human-readable description of what the command does.

          input class-attribute instance-attribute

          input: AvailableCommandInput | None = None
          

          Input for the command if required.

          name instance-attribute

          name: str
          

          Command name (e.g., create_plan, research_codebase).

          create classmethod

          create(name: str, description: str, input_hint: str | None = None) -> Self
          

          Create a new Command.

          Parameters:

          Name Type Description Default
          name str

          Name of the command.

          required
          description str

          Description of the command.

          required
          input_hint str | None

          Hint for the input.

          None

          Returns:

          Type Description
          Self

          A new available command.

          Source code in src/aclientp/schema/slash_commands.py
          @classmethod
          def create(cls, name: str, description: str, input_hint: str | None = None) -> Self:
              """Create a new Command.
          
              Args:
                  name: Name of the command.
                  description: Description of the command.
                  input_hint: Hint for the input.
          
              Returns:
                  A new available command.
              """
              spec = AvailableCommandInput(root=CommandInputHint(hint=input_hint)) if input_hint else None
              return cls(name=name, description=description, input=spec)
          

          AvailableCommandInput

          Bases: RootModel[CommandInputHint]

          A container for the input specification for a command.

          Source code in src/aclientp/schema/slash_commands.py
          class AvailableCommandInput(RootModel[CommandInputHint]):
              """A container for the input specification for a command."""
          
              root: CommandInputHint
              """The input specification for a command."""
          

          root instance-attribute

          The input specification for a command.

          CommandInputHint

          Bases: AnnotatedObject

          All text that was typed after the command name is provided as input.

          Source code in src/aclientp/schema/slash_commands.py
          class CommandInputHint(AnnotatedObject):
              """All text that was typed after the command name is provided as input."""
          
              hint: str
              """A hint to display when the input hasn't been provided yet."""
          

          hint instance-attribute

          hint: str
          

          A hint to display when the input hasn't been provided yet.