167 lines
3.0 KiB
TypeScript
167 lines
3.0 KiB
TypeScript
import { cardComponent } from "@egg/lark-msg-tool"
|
|
|
|
const groupSelector = {
|
|
config: {
|
|
update_multi: true,
|
|
},
|
|
elements: [
|
|
{
|
|
tag: "markdown",
|
|
content: "请选择要对话的群聊",
|
|
},
|
|
{
|
|
tag: "action",
|
|
actions: [
|
|
{
|
|
tag: "select_static",
|
|
placeholder: {
|
|
tag: "plain_text",
|
|
content: "请选择群名称",
|
|
},
|
|
value: {
|
|
cardGroup: "groupAgent",
|
|
cardName: "groupSelector",
|
|
},
|
|
options: "${groupOptions}",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
tag: "hr",
|
|
},
|
|
cardComponent.commonNote,
|
|
],
|
|
header: cardComponent.pendingHeader,
|
|
}
|
|
|
|
const functionSelector = {
|
|
config: {
|
|
update_multi: true,
|
|
},
|
|
elements: [
|
|
{
|
|
tag: "action",
|
|
actions: [
|
|
{
|
|
tag: "select_static",
|
|
placeholder: {
|
|
tag: "plain_text",
|
|
content: "请选择功能",
|
|
},
|
|
value: {
|
|
cardGroup: "groupAgent",
|
|
cardName: "functionSelector",
|
|
},
|
|
options: "${functionOptions}",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
tag: "hr",
|
|
},
|
|
cardComponent.commonNote,
|
|
],
|
|
header: cardComponent.pendingHeader,
|
|
}
|
|
|
|
const timeScopeSelector = {
|
|
config: {
|
|
update_multi: true,
|
|
},
|
|
elements: [
|
|
{
|
|
tag: "markdown",
|
|
content: "请选择时间范围",
|
|
},
|
|
{
|
|
tag: "action",
|
|
actions: [
|
|
{
|
|
tag: "button",
|
|
text: {
|
|
tag: "plain_text",
|
|
content: "过去一天",
|
|
},
|
|
type: "default",
|
|
value: {
|
|
cardGroup: "groupAgent",
|
|
cardName: "timeScopeSelector",
|
|
timeScope: "1",
|
|
},
|
|
},
|
|
{
|
|
tag: "button",
|
|
text: {
|
|
tag: "plain_text",
|
|
content: "过去三天",
|
|
},
|
|
type: "default",
|
|
value: {
|
|
cardGroup: "groupAgent",
|
|
cardName: "timeScopeSelector",
|
|
timeScope: "3",
|
|
},
|
|
},
|
|
{
|
|
tag: "button",
|
|
text: {
|
|
tag: "plain_text",
|
|
content: "过去七天",
|
|
},
|
|
type: "default",
|
|
value: {
|
|
cardGroup: "groupAgent",
|
|
cardName: "timeScopeSelector",
|
|
timeScope: "7",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
tag: "hr",
|
|
},
|
|
cardComponent.commonNote,
|
|
],
|
|
header: cardComponent.pendingHeader,
|
|
}
|
|
|
|
const resultReport = {
|
|
config: {
|
|
update_multi: true,
|
|
},
|
|
elements: [
|
|
{
|
|
tag: "markdown",
|
|
content: "${content}",
|
|
},
|
|
{
|
|
tag: "hr",
|
|
},
|
|
{
|
|
tag: "markdown",
|
|
content: "${llmRes}",
|
|
},
|
|
{
|
|
tag: "hr",
|
|
},
|
|
cardComponent.commonNote,
|
|
],
|
|
header: cardComponent.successHeader,
|
|
}
|
|
|
|
export const functionOptionList = [
|
|
{
|
|
id: "summary-qwen-72b-instruct-int4",
|
|
name: "总结消息",
|
|
},
|
|
]
|
|
|
|
const cardMap = {
|
|
functionSelector,
|
|
timeScopeSelector,
|
|
resultReport,
|
|
groupSelector,
|
|
}
|
|
|
|
export default cardMap
|