Skip to content

ppagent / SourceChatCardContent

Type Alias: SourceChatCardContent

SourceChatCardContent = object

Defined in: src/source/source.ts:382

Properties

content

content: any

Defined in: src/source/source.ts:401

卡片的完整内容或者绑定的变量体


result?

optional result: any

Defined in: src/source/source.ts:405

卡片交互结果,一般用户交互回调后才有


template?

optional template: string

Defined in: src/source/source.ts:397

卡片的模板结构,变量使用{var}的方式进行占位。

如果type类型是template,则表示模板的id

type是content时可不设置


type

type: "template" | "templateId" | "content"

Defined in: src/source/source.ts:389

卡片的类型。

  • templateId表示使用模板id,这时候template是id的值,content是绑定的变量
  • template表示使用模板,这时候template提供模板结构,content提供变量对象
  • content表示直接使用完整的卡片内容,这时候template为空