Source-owned registry for extension-contributed agent slash commands.
Built-in slash commands remain static in MingaEditor.Agent.SlashCommand. Extension declarations are stored here so cleanup and reload no longer depend on scanning running manifests.
Summary
Functions
Returns all registered extension slash commands in deterministic registration order.
Returns registry entries in deterministic registration order.
Registers a source-owned batch of slash command declarations. Same-source batches replace prior entries.
Starts the slash command registry.
Removes all slash commands owned by a source.
Types
@type entry() :: %{ source: source(), id: String.t(), command: MingaEditor.Agent.SlashCommand.Command.t() }
Registry entry for one slash command.
@type source() :: Minga.Extension.ContributionCleanup.contribution_source()
Source that contributed slash commands.
@type state() :: [entry()]
Functions
@spec commands() :: [MingaEditor.Agent.SlashCommand.Command.t()]
Returns all registered extension slash commands in deterministic registration order.
@spec entries() :: [entry()]
Returns registry entries in deterministic registration order.
Registers a source-owned batch of slash command declarations. Same-source batches replace prior entries.
@spec start_link(keyword()) :: GenServer.on_start()
Starts the slash command registry.
@spec unregister_source(source()) :: :ok
Removes all slash commands owned by a source.