Available commands update.
Notification of changes to the set of available commands in the session.
Required Fields
type- Always "available_commands_update" for this variantsession_update- Update identifieravailable_commands- List of available commands (list of maps)
Optional Fields
meta- Additional metadata (map)
Available Command Structure
Each entry in the available_commands list typically contains:
id- Unique identifier for the commandname- Command namedescription- Description of what the command does- Other fields specific to the command
Example
%ACPex.Schema.Types.SessionUpdate.AvailableCommandsUpdate{
type: "available_commands_update",
session_update: "update-999",
available_commands: [
%{
"id" => "cmd-1",
"name" => "analyze",
"description" => "Analyze the code"
},
%{
"id" => "cmd-2",
"name" => "refactor",
"description" => "Refactor the code"
}
]
}JSON Representation
{
"type": "available_commands_update",
"sessionUpdate": "update-999",
"availableCommands": [
{
"id": "cmd-1",
"name": "analyze",
"description": "Analyze the code"
},
{
"id": "cmd-2",
"name": "refactor",
"description": "Refactor the code"
}
]
}
Summary
Functions
Creates a changeset for validation.
Types
Functions
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Creates a changeset for validation.
Required Fields
session_update- Must be presentavailable_commands- Must be present
The type field defaults to "available_commands_update".