233 lines
4.7 KiB
TypeScript
233 lines
4.7 KiB
TypeScript
const functionSelectorCard = {
|
||
elements: [
|
||
{
|
||
tag: "markdown",
|
||
content: "已经选中的群聊:**${chatName}**\n",
|
||
},
|
||
{
|
||
tag: "action",
|
||
actions: [
|
||
{
|
||
tag: "select_static",
|
||
placeholder: {
|
||
tag: "plain_text",
|
||
content: "请选择功能",
|
||
},
|
||
value: {
|
||
chatId: "${chatId}",
|
||
chatName: "${chatName}",
|
||
action: "sendTimeScopeSelector",
|
||
},
|
||
options: "${functions}",
|
||
},
|
||
],
|
||
},
|
||
{
|
||
tag: "hr",
|
||
},
|
||
{
|
||
tag: "note",
|
||
elements: [
|
||
{
|
||
tag: "plain_text",
|
||
content: "🍳 功能由AI创新应用组提供支持,Rid:${requestId}",
|
||
},
|
||
],
|
||
},
|
||
],
|
||
header: {
|
||
template: "purple",
|
||
title: {
|
||
content: "🧑💻 感谢使用 Group Agent",
|
||
tag: "plain_text",
|
||
},
|
||
},
|
||
}
|
||
|
||
const timeScopeSelectorCard = {
|
||
elements: [
|
||
{
|
||
tag: "markdown",
|
||
content:
|
||
"已经选中群聊:**${chatName}**\n\n已经选择功能:**${functionName}**\n\n请选择时间范围",
|
||
},
|
||
{
|
||
tag: "action",
|
||
actions: [
|
||
{
|
||
tag: "button",
|
||
text: {
|
||
tag: "plain_text",
|
||
content: "过去一天",
|
||
},
|
||
type: "default",
|
||
value: {
|
||
chatId: "${chatId}",
|
||
chatName: "${chatName}",
|
||
functionId: "${functionId}",
|
||
functionName: "${functionName}",
|
||
timeScope: "1",
|
||
requestId: "${requestId}",
|
||
action: "manageGroupMsg",
|
||
},
|
||
},
|
||
{
|
||
tag: "button",
|
||
text: {
|
||
tag: "plain_text",
|
||
content: "过去三天",
|
||
},
|
||
type: "default",
|
||
value: {
|
||
chatId: "${chatId}",
|
||
chatName: "${chatName}",
|
||
functionId: "${functionId}",
|
||
functionName: "${functionName}",
|
||
timeScope: "3",
|
||
requestId: "${requestId}",
|
||
action: "manageGroupMsg",
|
||
},
|
||
},
|
||
{
|
||
tag: "button",
|
||
text: {
|
||
tag: "plain_text",
|
||
content: "过去七天",
|
||
},
|
||
type: "default",
|
||
value: {
|
||
chatId: "${chatId}",
|
||
chatName: "${chatName}",
|
||
functionId: "${functionId}",
|
||
functionName: "${functionName}",
|
||
timeScope: "7",
|
||
requestId: "${requestId}",
|
||
action: "manageGroupMsg",
|
||
},
|
||
},
|
||
],
|
||
},
|
||
{
|
||
tag: "hr",
|
||
},
|
||
{
|
||
tag: "note",
|
||
elements: [
|
||
{
|
||
tag: "plain_text",
|
||
content: "🍳 功能由AI创新应用组提供支持,Rid:${requestId}",
|
||
},
|
||
],
|
||
},
|
||
],
|
||
header: {
|
||
template: "purple",
|
||
title: {
|
||
content: "🧑💻 感谢使用 Group Agent",
|
||
tag: "plain_text",
|
||
},
|
||
},
|
||
}
|
||
|
||
const resultReportCard = {
|
||
elements: [
|
||
{
|
||
tag: "markdown",
|
||
content:
|
||
"群聊:**${chatName}**,功能:**${functionName}**,总结天数:**${timeScope}**\n\n以下内容由AI模型生成,耗时:**${processingTime}s**",
|
||
},
|
||
{
|
||
tag: "hr",
|
||
},
|
||
{
|
||
tag: "markdown",
|
||
content: "${llmRes}",
|
||
},
|
||
{
|
||
tag: "hr",
|
||
},
|
||
{
|
||
tag: "note",
|
||
elements: [
|
||
{
|
||
tag: "plain_text",
|
||
content: "🍳 功能由AI创新应用组提供支持,Rid:${requestId}",
|
||
},
|
||
],
|
||
},
|
||
],
|
||
header: {
|
||
template: "green",
|
||
title: {
|
||
content: "🧑💻 感谢使用 Group Agent",
|
||
tag: "plain_text",
|
||
},
|
||
},
|
||
}
|
||
|
||
const successMsgCard = {
|
||
elements: [
|
||
{
|
||
tag: "markdown",
|
||
content: "${content}",
|
||
},
|
||
{
|
||
tag: "hr",
|
||
},
|
||
{
|
||
tag: "note",
|
||
elements: [
|
||
{
|
||
tag: "plain_text",
|
||
content: "🍳 功能由${author}提供支持,Rid:${requestId}",
|
||
},
|
||
],
|
||
},
|
||
],
|
||
header: {
|
||
template: "green",
|
||
title: {
|
||
content: "🔥 感谢使用 ${app}",
|
||
tag: "plain_text",
|
||
},
|
||
},
|
||
}
|
||
|
||
const errorMsgCard = {
|
||
elements: [
|
||
{
|
||
tag: "markdown",
|
||
content: "${content}",
|
||
},
|
||
{
|
||
tag: "hr",
|
||
},
|
||
{
|
||
tag: "note",
|
||
elements: [
|
||
{
|
||
tag: "plain_text",
|
||
content: "🍳 功能由${author}提供支持,Rid:${requestId}",
|
||
},
|
||
],
|
||
},
|
||
],
|
||
header: {
|
||
template: "red",
|
||
title: {
|
||
content: "⛔ ${app} 错误提示",
|
||
tag: "plain_text",
|
||
},
|
||
},
|
||
}
|
||
|
||
const cardTemplateMap = {
|
||
functionSelector: functionSelectorCard,
|
||
timeScopeSelector: timeScopeSelectorCard,
|
||
resultReport: resultReportCard,
|
||
successMsg: successMsgCard,
|
||
errorMsg: errorMsgCard,
|
||
}
|
||
|
||
export default cardTemplateMap
|