For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/sdk/sapi/runtime/type-aliases/CommandParameter.md.
  • 简体中文
  • Type Alias: CommandParameter

    type CommandParameter = {
      name: string;
      type: CommandParameterType;
      optional?: boolean;
      values?: string[];
    };

    Defined in: sapi/runtime/command.ts:60

    一条原生命令参数。 可选参数必须排在必填参数之后,和 Bedrock 自定义命令的规则一致。

    Properties

    PropertyTypeDescriptionDefined in
    namestring参数名,用于补全和帮助文本。sapi/runtime/command.ts:62
    typeCommandParameterType参数类型。sapi/runtime/command.ts:64
    optional?boolean是否可以省略。省略时回调收到 undefined。sapi/runtime/command.ts:66
    values?string[]type 为 enum 时的可选值。sapi/runtime/command.ts:68