135 lines
2.9 KiB
TypeScript
135 lines
2.9 KiB
TypeScript
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
|