egg_server/utils/Card/groupAgentCard.ts
zhaoyingbo b44f66f6be
All checks were successful
Egg Server CI/CD / build-image (push) Successful in 1m9s
Egg Server CI/CD / refresh-image (push) Successful in 14s
Egg Server CI/CD / fast-deploy (push) Successful in 5s
feat(mi-chat): 优化消息返回功能
2024-10-11 10:59:32 +00:00

135 lines
2.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { commonNote, pendingHeader, successHeader } from "./common"
const functionSelector = {
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",
},
commonNote,
],
pendingHeader,
}
const timeScopeSelector = {
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",
},
commonNote,
],
pendingHeader,
}
const resultReport = {
elements: [
{
tag: "markdown",
content:
"群聊:**${chatName}**,功能:**${functionName}**,总结天数:**${timeScope}**\n\n以下内容由AI模型生成耗时**${processingTime}s**",
},
{
tag: "hr",
},
{
tag: "markdown",
content: "${llmRes}",
},
{
tag: "hr",
},
commonNote,
],
successHeader,
}
const groupAgentCard = {
functionSelector,
timeScopeSelector,
resultReport,
}
export default groupAgentCard