aegon-gen 1.0.0
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 +12 -0
- package/src/App.vue +3 -0
- package/src/api/index.ts +19 -0
- package/src/api/modules/gen-ai/gen-entry/index.ts +30 -0
- package/src/api/modules/gen-ai/model-manager/index.ts +42 -0
- package/src/api/modules/gen-ai/model-manager/mockApi.ts +33 -0
- package/src/api/modules/index.ts +98 -0
- package/src/api/modules/user/index.ts +4 -0
- package/src/api/request.ts +102 -0
- package/src/assets/sample-access-icon.png +0 -0
- package/src/assets/sample-pie-chart.png +0 -0
- package/src/assets/vue.svg +1 -0
- package/src/components/CapsuleScrollbar.vue +93 -0
- package/src/components/Export/ExcelExport.vue +592 -0
- package/src/components/Export/ExcelExport2.vue +494 -0
- package/src/components/Export/ExcelExport3.vue +342 -0
- package/src/components/Export/ExcelExport4.vue +665 -0
- package/src/components/Export/excelExport.js +547 -0
- package/src/components/Export/excelExport.ts +551 -0
- package/src/components/GEN-AI/index.vue +142 -0
- package/src/components/GEN-AI/index1.vue +456 -0
- package/src/components/GEN-AI/index10.vue +5 -0
- package/src/components/GEN-AI/index2.vue +568 -0
- package/src/components/GEN-AI/index3.vue +623 -0
- package/src/components/GEN-AI/index4.vue +629 -0
- package/src/components/GEN-AI/index5.vue +578 -0
- package/src/components/GEN-AI/index6.vue +656 -0
- package/src/components/GEN-AI/index7.vue +717 -0
- package/src/components/GEN-AI/index8.vue +405 -0
- package/src/components/GEN-AI/index9.vue +1065 -0
- package/src/components/GEN-AI/types.ts +12 -0
- package/src/components/GEN-AI/utils.ts +42 -0
- package/src/components/HelloWorld.vue +41 -0
- package/src/components/PageCard.vue +7 -0
- package/src/components/PageHeader.vue +32 -0
- package/src/components/backup/index5 copy.vue +556 -0
- package/src/components/backup/index5.vue +620 -0
- package/src/components/backup/index9 copy.vue +1029 -0
- package/src/components/backup/index9-pro.vue +1065 -0
- package/src/components/backup/index9.vue +1057 -0
- package/src/components/el-date-picker.vue +64 -0
- package/src/directives/btnLoading.ts +427 -0
- package/src/directives/debounce copy.ts +670 -0
- package/src/directives/debounce.ts +98 -0
- package/src/directives/index.ts +25 -0
- package/src/layouts/MainLayout.vue +101 -0
- package/src/main.ts +85 -0
- package/src/router/index.ts +76 -0
- package/src/router/menus.ts +28 -0
- package/src/style.css +79 -0
- package/src/styles/_variables.scss +24 -0
- package/src/styles/app-button.css +26 -0
- package/src/styles/element-overrides.css +23 -0
- package/src/styles/global.css +44 -0
- package/src/styles/index.scss +1 -0
- package/src/styles/page-card.css +21 -0
- package/src/styles/variables.css +26 -0
- package/src/test/mock.ts +101 -0
- package/src/test/test1.vue +402 -0
- package/src/test/test2.vue +1689 -0
- package/src/types/gen-ai/gen-entry/index.ts +17 -0
- package/src/types/gen-ai/model-manager/index.ts +19 -0
- package/src/utils/docxExport.ts +1610 -0
- package/src/utils/gen-ai-navigation.ts +37 -0
- package/src/utils/gen-ai-scroll.ts +455 -0
- package/src/utils/openDataLoaderWordExport.ts +33 -0
- package/src/utils/pageScrollbar.ts +115 -0
- package/src/utils/randomTranscode.ts +87 -0
- package/src/utils/reportPdfExport.ts +44 -0
- package/src/views/AdminCenter/index.vue +817 -0
- package/src/views/Blank.vue +68 -0
- package/src/views/Home.vue +29 -0
- package/src/views/ReportCenter/index.vue +1380 -0
- package/src/views/TemplateCenter/Knowledge.ts +83 -0
- package/src/views/TemplateCenter/data.d.ts +10 -0
- package/src/views/TemplateCenter/index.vue +1205 -0
- package/src/views/TemplateCenter/service.ts +69 -0
- package/src/views/gen-ai/components/RecentReportsTable.vue +193 -0
- package/src/views/gen-ai/gen-entry/index.vue +309 -0
- package/src/views/gen-ai/gen-entry/mockData.ts +160 -0
- package/src/views/gen-ai/management-center/index.vue +53 -0
- package/src/views/gen-ai/model-manager/ChapterTitleScroll.vue +275 -0
- package/src/views/gen-ai/model-manager/index.vue +1205 -0
- package/src/views/gen-ai/model-manager/mockData.ts +122 -0
- package/src/views/gen-ai/report-center/index.vue +158 -0
- package/src/vite-env.d.ts +38 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/** Offline / fallback answers for HederaRoot assistant. */
|
|
2
|
+
export const HEDERA_SYSTEM_PROMPT = `你是 HederaRoot 平台的 Hedera 链上运营助手。
|
|
3
|
+
你熟悉 HTS(代币)、HCS(共识存证)、HSCS(智能合约)、Governance(KYC/密钥矩阵)、RWA 上链与 Mirror Node 监控。
|
|
4
|
+
回答应简洁、可执行,优先给出页面路径(如 /hts/tokens、/governance/kyc)与 .env 配置提示。
|
|
5
|
+
若涉及私钥,提醒用户仅在 .env 本地配置,不要提交到 Git。`;
|
|
6
|
+
|
|
7
|
+
export const HEDERA_PROMPT_SUGGESTIONS = [
|
|
8
|
+
'如何创建带 KYC Key 的 HTS 代币?',
|
|
9
|
+
'TokenServe 暂停代币失败怎么排查?',
|
|
10
|
+
'RWA 上链 metadata 超过 100 字节怎么办?',
|
|
11
|
+
'如何在 HSCS 调试页调用合约 read 方法?',
|
|
12
|
+
'KYC 授权链上交易需要什么 Key?',
|
|
13
|
+
'Mirror Node 与 Hashio RPC 有什么区别?',
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
type KnowledgeEntry = {
|
|
17
|
+
keywords: string[];
|
|
18
|
+
answer: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const KNOWLEDGE_BASE: KnowledgeEntry[] = [
|
|
22
|
+
{
|
|
23
|
+
keywords: ['创建', '代币', 'hts', 'create'],
|
|
24
|
+
answer:
|
|
25
|
+
'创建 FT/NFT:打开 **/hts/create-token**,在 .env 配置 ACCOUNT_ID 与 PRIVATE_KEY。勾选需要的管理 Key(KYC、Pause、Supply 等),Treasury 默认为操作员账户。创建成功后可在 **/hts/tokens** 查看并在 **/hts/TokenServe** 管理。',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
keywords: ['kyc', '白名单', '准入'],
|
|
29
|
+
answer:
|
|
30
|
+
'KYC 流程:1) 创建代币时设置 **KYC Key**;2) **/governance/keys** 确认 KYC Key 已激活;3) **/governance/kyc** 新增申请并链上授权。操作员私钥须与 KYC Key 匹配,否则 `INVALID_SIGNATURE`。',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
keywords: ['暂停', 'pause', '熔断'],
|
|
34
|
+
answer:
|
|
35
|
+
'代币暂停需 Token 设置 **Pause Key** 且操作员持有该 Key。在 **/hts/TokenServe** 连接账户后执行暂停/恢复。若报 `TOKEN_HAS_NO_PAUSE_KEY`,说明创建时未配置 Pause Key。',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
keywords: ['rwa', 'metadata', '100'],
|
|
39
|
+
answer:
|
|
40
|
+
'Hedera Token metadata 上限 **100 字节**。RWA 完整信息会先写入 **HCS Topic**,链上 metadata 使用 `hcs:0.0.xxx/seq` 指针或紧凑 JSON。见 **/hts/rwa** 执行上链流程。',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
keywords: ['合约', 'hscs', 'deploy', '部署'],
|
|
44
|
+
answer:
|
|
45
|
+
'智能合约:**/hscs/contracts** 部署(MyToken 模板 / 上传 artifact / 粘贴 bytecode),使用 ContractCreateFlow。部署后在 **/hscs/debug** 选择 Contract ID,加载 ABI,读操作用 Query,写操作用 Transaction。',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
keywords: ['mirror', 'tps', '网络'],
|
|
49
|
+
answer:
|
|
50
|
+
'网络监控:**/settings/network** 与 **/dashboard/monitor** 从 Mirror Node 拉取 TPS、节点、Gas。链上读写可用 Hashio RPC(.env 的 HEDERA_RPC_URL)。Operator 配置在 **/settings/operator**。',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
keywords: ['hcs', '存证', 'topic'],
|
|
54
|
+
answer:
|
|
55
|
+
'HCS 共识存证:**/hcs** 查看 Topic 消息流。RWA 审计默认 Topic `0.0.529001`。消息可通过 Mirror 查询,**AI 审计** 页会采样分析。',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
keywords: ['env', 'account', '私钥', '配置'],
|
|
59
|
+
answer:
|
|
60
|
+
'在项目根目录 `.env` 配置 ACCOUNT_ID、PRIVATE_KEY、HEDERA_RPC_URL。修改后需重启 npm start。切勿将 .env 提交到 Git。',
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
export function matchLocalKnowledge(question: string): string | null {
|
|
65
|
+
const lower = question.toLowerCase();
|
|
66
|
+
let best: KnowledgeEntry | null = null;
|
|
67
|
+
let bestScore = 0;
|
|
68
|
+
|
|
69
|
+
for (const entry of KNOWLEDGE_BASE) {
|
|
70
|
+
let score = 0;
|
|
71
|
+
for (const kw of entry.keywords) {
|
|
72
|
+
if (lower.includes(kw.toLowerCase())) score += 1;
|
|
73
|
+
}
|
|
74
|
+
if (score > bestScore) {
|
|
75
|
+
bestScore = score;
|
|
76
|
+
best = entry;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return bestScore > 0 ? best!.answer : null;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export const DEFAULT_WELCOME = '🤖 Hedera 链上助手 · 可问我 HTS / HCS / HSCS / 合规相关问题';
|