@ian2018cs/agenthub 0.1.42 → 0.1.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -562,24 +562,23 @@ function buildHelpCardDirect(boundEmail, state) {
|
|
|
562
562
|
const modeLabel = MODE_LABELS[permission_mode] || '默认模式';
|
|
563
563
|
|
|
564
564
|
return JSON.stringify({
|
|
565
|
-
|
|
565
|
+
schema: '2.0',
|
|
566
|
+
config: { update_multi: true },
|
|
566
567
|
header: {
|
|
567
568
|
title: { tag: 'plain_text', content: '🤖 AgentHub' },
|
|
568
569
|
template: 'blue',
|
|
570
|
+
padding: '12px 8px 12px 8px',
|
|
569
571
|
},
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
tag: '
|
|
572
|
+
body: {
|
|
573
|
+
direction: 'vertical',
|
|
574
|
+
elements: [
|
|
575
|
+
{
|
|
576
|
+
tag: 'markdown',
|
|
575
577
|
content: `**已绑定账号**:${boundEmail || '未绑定'}\n**当前项目**:${projectName}\n**当前模式**:${modeLabel}`,
|
|
576
578
|
},
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
tag: 'div',
|
|
581
|
-
text: {
|
|
582
|
-
tag: 'lark_md',
|
|
579
|
+
{ tag: 'hr' },
|
|
580
|
+
{
|
|
581
|
+
tag: 'markdown',
|
|
583
582
|
content: [
|
|
584
583
|
'**命令列表**',
|
|
585
584
|
'`/auth <token>` 绑定账号',
|
|
@@ -598,19 +597,16 @@ function buildHelpCardDirect(boundEmail, state) {
|
|
|
598
597
|
'`/help` 显示此帮助',
|
|
599
598
|
].join('\n'),
|
|
600
599
|
},
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
tag: 'div',
|
|
605
|
-
text: {
|
|
606
|
-
tag: 'lark_md',
|
|
600
|
+
{ tag: 'hr' },
|
|
601
|
+
{
|
|
602
|
+
tag: 'markdown',
|
|
607
603
|
content: [
|
|
608
604
|
'**权限模式**',
|
|
609
605
|
...Object.entries(MODE_LABELS).map(([k, v]) => `\`${k}\` ${v}`),
|
|
610
606
|
].join('\n'),
|
|
611
607
|
},
|
|
612
|
-
|
|
613
|
-
|
|
608
|
+
],
|
|
609
|
+
},
|
|
614
610
|
});
|
|
615
611
|
}
|
|
616
612
|
|
|
@@ -729,14 +725,19 @@ function buildAskUserQuestionResultCard(answers, skipped = false) {
|
|
|
729
725
|
.join('\n');
|
|
730
726
|
|
|
731
727
|
return JSON.stringify({
|
|
732
|
-
|
|
728
|
+
schema: '2.0',
|
|
729
|
+
config: { update_multi: true },
|
|
733
730
|
header: {
|
|
734
731
|
title: { tag: 'plain_text', content: skipped ? '⏭️ 已跳过' : '✅ 已提交回答' },
|
|
735
732
|
template: skipped ? 'grey' : 'green',
|
|
733
|
+
padding: '12px 8px 12px 8px',
|
|
734
|
+
},
|
|
735
|
+
body: {
|
|
736
|
+
direction: 'vertical',
|
|
737
|
+
elements: [
|
|
738
|
+
{ tag: 'markdown', content },
|
|
739
|
+
],
|
|
736
740
|
},
|
|
737
|
-
elements: [
|
|
738
|
-
{ tag: 'div', text: { tag: 'lark_md', content } },
|
|
739
|
-
],
|
|
740
741
|
});
|
|
741
742
|
}
|
|
742
743
|
|
|
@@ -890,11 +891,19 @@ function buildTextOrMarkdownMessage(text) {
|
|
|
890
891
|
return {
|
|
891
892
|
msgType: 'interactive',
|
|
892
893
|
content: JSON.stringify({
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
894
|
+
schema: '2.0',
|
|
895
|
+
config: { update_multi: true },
|
|
896
|
+
header: {
|
|
897
|
+
title: { tag: 'plain_text', content: '' },
|
|
898
|
+
template: 'default',
|
|
899
|
+
},
|
|
900
|
+
body: {
|
|
901
|
+
direction: 'vertical',
|
|
902
|
+
elements: [{
|
|
903
|
+
tag: 'markdown',
|
|
904
|
+
content: adapted,
|
|
905
|
+
}],
|
|
906
|
+
},
|
|
898
907
|
}),
|
|
899
908
|
};
|
|
900
909
|
}
|