SoulFire LogoSoulFire

Complete command

Retrieves tab-completion suggestions for a partial command. Uses Brigadier's completion system to generate context-aware suggestions based on the command structure and current cursor position. Permission requirements depend on the scope (same as ExecuteCommand).

POST
/v1/commands:complete

Retrieves tab-completion suggestions for a partial command. Uses Brigadier's completion system to generate context-aware suggestions based on the command structure and current cursor position.

Permission requirements depend on the scope (same as ExecuteCommand).

Authorization

AuthorizationBearer <token>

Preferred API authentication. Use a JWT with the api audience.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

scope.instance.instance_id*string

The unique identifier (UUID) of the instance to scope commands to. Must be a valid UUID string.

Formatuuid
scope.bot.instance_id*string

The unique identifier (UUID) of the instance containing the bot. Must be a valid UUID string.

Formatuuid
scope.bot.bot_id*string

The unique identifier (UUID) of the bot (profile ID) to scope commands to. Must be a valid UUID string matching the bot's account profile ID.

Formatuuid
command*string

The partial command string to complete. May be an incomplete command that the user is typing, e.g., "mov" or "move 100 ".

cursor*integer

The cursor position within the command string (0-indexed). Completions will be generated for the token at this position. Typically this is the length of the command string for end-of-line completion.

Formatint32

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://127.0.0.1:38765/v1/commands:complete" \  -H "Content-Type: application/json" \  -d '{    "command": "",    "cursor": 0  }'
{  "suggestions": [    {      "suggestion": "string",      "tooltip": "string"    }  ]}

How is this page?