Skip to content

CommandCtx

Methods

set_input

CommandCtx:set_input(text) -> CommandAction

Populate the input box with text for the user to edit and send, without submitting it.

Parameters

  • text: string

Returns

spawn_subagent

CommandCtx:spawn_subagent(opts) -> CommandAction

Build a [CommandAction::SpawnSubagent] delegating opts.task to a detached sub-agent.

Parameters

  • opts: {personality: string, mode: string?, task: string, context: string?}

Returns

submit_prompt

CommandCtx:submit_prompt(text, opts?) -> CommandAction

Submit text as a user turn, as if the user had typed and sent it. The optional opts applies a model and/or personality override for just that turn.

Parameters

  • text: string
  • opts: {model: string?, personality: string?} (optional)
    • model — The [provider/]model[@effort] reference to switch to for the turn.
    • personality — The personality (optionally personality/mode) to switch to for the turn.

Returns