@comate/zulu 0.8.0-beta.2 → 0.8.0-beta.3

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.
Files changed (154) hide show
  1. package/comate-engine/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  2. package/comate-engine/plugins/aiscan/assets/icon.svg +12 -0
  3. package/comate-engine/plugins/aiscan/dist/index.js +54662 -0
  4. package/comate-engine/plugins/aiscan/package.json +67 -0
  5. package/comate-engine/plugins/appdev/assets/icon.png +0 -0
  6. package/comate-engine/plugins/appdev/dist/help.md +12 -0
  7. package/comate-engine/plugins/appdev/dist/index.d.ts +2 -0
  8. package/comate-engine/plugins/appdev/dist/index.js +194 -0
  9. package/comate-engine/plugins/appdev/dist/providers/err.d.ts +8 -0
  10. package/comate-engine/plugins/appdev/dist/providers/err.js +37 -0
  11. package/comate-engine/plugins/appdev/dist/providers/fallback.d.ts +5 -0
  12. package/comate-engine/plugins/appdev/dist/providers/fallback.js +28 -0
  13. package/comate-engine/plugins/appdev/dist/providers/help.d.ts +8 -0
  14. package/comate-engine/plugins/appdev/dist/providers/help.js +19 -0
  15. package/comate-engine/plugins/appdev/dist/providers/medusa.d.ts +8 -0
  16. package/comate-engine/plugins/appdev/dist/providers/medusa.js +39 -0
  17. package/comate-engine/plugins/appdev/dist/providers/qa.d.ts +8 -0
  18. package/comate-engine/plugins/appdev/dist/providers/qa.js +33 -0
  19. package/comate-engine/plugins/appdev/package.json +67 -0
  20. package/comate-engine/plugins/bfc/assets/bfc-icon.png +0 -0
  21. package/comate-engine/plugins/bfc/dist/config/config.d.ts +4 -0
  22. package/comate-engine/plugins/bfc/dist/config/config.js +4 -0
  23. package/comate-engine/plugins/bfc/dist/help.md +11 -0
  24. package/comate-engine/plugins/bfc/dist/index.d.ts +2 -0
  25. package/comate-engine/plugins/bfc/dist/index.js +452 -0
  26. package/comate-engine/plugins/bfc/dist/providers/bfcInstructMode.d.ts +8 -0
  27. package/comate-engine/plugins/bfc/dist/providers/bfcInstructMode.js +77 -0
  28. package/comate-engine/plugins/bfc/dist/providers/genAbnormalCode.d.ts +8 -0
  29. package/comate-engine/plugins/bfc/dist/providers/genAbnormalCode.js +71 -0
  30. package/comate-engine/plugins/bfc/dist/providers/genBfcCode.d.ts +8 -0
  31. package/comate-engine/plugins/bfc/dist/providers/genBfcCode.js +74 -0
  32. package/comate-engine/plugins/bfc/dist/providers/getBatchCases.d.ts +10 -0
  33. package/comate-engine/plugins/bfc/dist/providers/getBatchCases.js +71 -0
  34. package/comate-engine/plugins/bfc/dist/providers/help.d.ts +8 -0
  35. package/comate-engine/plugins/bfc/dist/providers/help.js +19 -0
  36. package/comate-engine/plugins/bfc/dist/service/generateService.d.ts +14 -0
  37. package/comate-engine/plugins/bfc/dist/service/generateService.js +27 -0
  38. package/comate-engine/plugins/bfc/package.json +85 -0
  39. package/comate-engine/plugins/bpm/assets/bpm.png +0 -0
  40. package/comate-engine/plugins/bpm/dist/index.js +313 -0
  41. package/comate-engine/plugins/bpm/package.json +65 -0
  42. package/comate-engine/plugins/casebuilder/assets/icon.svg +1 -0
  43. package/comate-engine/plugins/casebuilder/dist/help.md +33 -0
  44. package/comate-engine/plugins/casebuilder/dist/index.js +837 -0
  45. package/comate-engine/plugins/casebuilder/package.json +80 -0
  46. package/comate-engine/plugins/centrino/assets/icon.png +0 -0
  47. package/comate-engine/plugins/centrino/dist/help.md +30 -0
  48. package/comate-engine/plugins/centrino/dist/index.js +1046 -0
  49. package/comate-engine/plugins/centrino/package.json +68 -0
  50. package/comate-engine/plugins/cnap/assets/cnap.png +0 -0
  51. package/comate-engine/plugins/cnap/dist/help.md +11 -0
  52. package/comate-engine/plugins/cnap/dist/index.js +171 -0
  53. package/comate-engine/plugins/cnap/package.json +65 -0
  54. package/comate-engine/plugins/demo-timer/assets/icon.svg +2 -0
  55. package/comate-engine/plugins/demo-timer/dist/index.js +463 -0
  56. package/comate-engine/plugins/demo-timer/package.json +73 -0
  57. package/comate-engine/plugins/dev-tools/assets/icon.png +0 -0
  58. package/comate-engine/plugins/dev-tools/dist/help.md +18 -0
  59. package/comate-engine/plugins/dev-tools/dist/index.js +166160 -0
  60. package/comate-engine/plugins/dev-tools/package.json +95 -0
  61. package/comate-engine/plugins/devaux/assets/icon.svg +1 -0
  62. package/comate-engine/plugins/devaux/dist/help.md +41 -0
  63. package/comate-engine/plugins/devaux/dist/index.js +76480 -0
  64. package/comate-engine/plugins/devaux/dist/static/tree-sitter-cpp.wasm +0 -0
  65. package/comate-engine/plugins/devaux/dist/static/tree-sitter-go.wasm +0 -0
  66. package/comate-engine/plugins/devaux/dist/static/tree-sitter.wasm +0 -0
  67. package/comate-engine/plugins/devaux/dist/tree-sitter.wasm +0 -0
  68. package/comate-engine/plugins/devaux/package.json +82 -0
  69. package/comate-engine/plugins/f2c/assets/icon.svg +11 -0
  70. package/comate-engine/plugins/f2c/dist/help.md +13 -0
  71. package/comate-engine/plugins/f2c/dist/index.js +102657 -0
  72. package/comate-engine/plugins/f2c/package.json +56 -0
  73. package/comate-engine/plugins/fcnap/assets/icon.png +0 -0
  74. package/comate-engine/plugins/fcnap/dist/help.md +9 -0
  75. package/comate-engine/plugins/fcnap/dist/index.js +105 -0
  76. package/comate-engine/plugins/fcnap/package.json +50 -0
  77. package/comate-engine/plugins/front-end-skills/assets/icon.svg +1 -0
  78. package/comate-engine/plugins/front-end-skills/dist/help.md +17 -0
  79. package/comate-engine/plugins/front-end-skills/dist/index.js +8172 -0
  80. package/comate-engine/plugins/front-end-skills/package.json +79 -0
  81. package/comate-engine/plugins/gdp/assets/icon.png +0 -0
  82. package/comate-engine/plugins/gdp/dist/help.md +11 -0
  83. package/comate-engine/plugins/gdp/dist/index.js +71663 -0
  84. package/comate-engine/plugins/gdp/package.json +80 -0
  85. package/comate-engine/plugins/git/assets/git.svg +1 -0
  86. package/comate-engine/plugins/git/assets/icon.svg +1 -0
  87. package/comate-engine/plugins/git/dist/help.md +7 -0
  88. package/comate-engine/plugins/git/dist/index.js +32765 -0
  89. package/comate-engine/plugins/git/package.json +91 -0
  90. package/comate-engine/plugins/harmonyos/assets/harmonyos.png +0 -0
  91. package/comate-engine/plugins/harmonyos/dist/index.js +78 -0
  92. package/comate-engine/plugins/harmonyos/package.json +37 -0
  93. package/comate-engine/plugins/iapi/assets/icon.png +0 -0
  94. package/comate-engine/plugins/iapi/dist/help.md +13 -0
  95. package/comate-engine/plugins/iapi/dist/index.js +458 -0
  96. package/comate-engine/plugins/iapi/dist/static/lang/tree-sitter-go.wasm +0 -0
  97. package/comate-engine/plugins/iapi/dist/static/lang/tree-sitter-java.wasm +0 -0
  98. package/comate-engine/plugins/iapi/dist/static/tree-sitter-go.wasm +0 -0
  99. package/comate-engine/plugins/iapi/dist/static/tree-sitter-java.wasm +0 -0
  100. package/comate-engine/plugins/iapi/dist/tree-sitter.wasm +0 -0
  101. package/comate-engine/plugins/iapi/package.json +102 -0
  102. package/comate-engine/plugins/icafe/assets/icafe.svg +1 -0
  103. package/comate-engine/plugins/icafe/dist/help.md +5 -0
  104. package/comate-engine/plugins/icafe/dist/index.js +885 -0
  105. package/comate-engine/plugins/icafe/package.json +74 -0
  106. package/comate-engine/plugins/ievalue/assets/iEValue.svg +10 -0
  107. package/comate-engine/plugins/ievalue/dist/index.js +2920 -0
  108. package/comate-engine/plugins/ievalue/package.json +88 -0
  109. package/comate-engine/plugins/ipipe/assets/iPipePlugin.png +0 -0
  110. package/comate-engine/plugins/ipipe/dist/help.md +15 -0
  111. package/comate-engine/plugins/ipipe/dist/index.js +7268 -0
  112. package/comate-engine/plugins/ipipe/package.json +62 -0
  113. package/comate-engine/plugins/jarvis/assets/icon.svg +1 -0
  114. package/comate-engine/plugins/jarvis/dist/help.md +17 -0
  115. package/comate-engine/plugins/jarvis/dist/index.js +140473 -0
  116. package/comate-engine/plugins/jarvis/package.json +93 -0
  117. package/comate-engine/plugins/mapsearch/assets/mapsearchicon.png +0 -0
  118. package/comate-engine/plugins/mapsearch/dist/help.md +4 -0
  119. package/comate-engine/plugins/mapsearch/dist/index.js +145 -0
  120. package/comate-engine/plugins/mapsearch/package.json +53 -0
  121. package/comate-engine/plugins/paddle/assets/icon.png +0 -0
  122. package/comate-engine/plugins/paddle/assets/paconvert-3.0.1-py3-none-any.whl +0 -0
  123. package/comate-engine/plugins/paddle/dist/help.md +31 -0
  124. package/comate-engine/plugins/paddle/dist/index.js +1011 -0
  125. package/comate-engine/plugins/paddle/package.json +129 -0
  126. package/comate-engine/plugins/robot/assets/Robot.png +0 -0
  127. package/comate-engine/plugins/robot/dist/index.js +476 -0
  128. package/comate-engine/plugins/robot/package.json +91 -0
  129. package/comate-engine/plugins/security/assets/comate.png +0 -0
  130. package/comate-engine/plugins/security/dist/index.js +18671 -0
  131. package/comate-engine/plugins/security/package.json +82 -0
  132. package/comate-engine/plugins/smartapp/assets/icon.png +0 -0
  133. package/comate-engine/plugins/smartapp/dist/help.md +4 -0
  134. package/comate-engine/plugins/smartapp/dist/index.js +113 -0
  135. package/comate-engine/plugins/smartapp/package.json +54 -0
  136. package/comate-engine/plugins/testmate/assets/icon.svg +1 -0
  137. package/comate-engine/plugins/testmate/dist/help.md +62 -0
  138. package/comate-engine/plugins/testmate/dist/index.js +22340 -0
  139. package/comate-engine/plugins/testmate/package.json +85 -0
  140. package/comate-engine/plugins/tor/assets/TorPlugin.png +0 -0
  141. package/comate-engine/plugins/tor/dist/help.md +22 -0
  142. package/comate-engine/plugins/tor/dist/index.js +807 -0
  143. package/comate-engine/plugins/tor/package.json +99 -0
  144. package/comate-engine/plugins/weiyun/assets/icon.png +0 -0
  145. package/comate-engine/plugins/weiyun/dist/help.md +11 -0
  146. package/comate-engine/plugins/weiyun/dist/index.js +100495 -0
  147. package/comate-engine/plugins/weiyun/package.json +55 -0
  148. package/comate-engine/plugins/workcard/assets/favicon.png +0 -0
  149. package/comate-engine/plugins/workcard/dist/help.md +30 -0
  150. package/comate-engine/plugins/workcard/dist/index.js +547 -0
  151. package/comate-engine/plugins/workcard/package.json +102 -0
  152. package/comate-engine/server.js +1 -1
  153. package/dist/bundle/index.js +2 -2
  154. package/package.json +1 -1
@@ -0,0 +1,91 @@
1
+ {
2
+ "private": true,
3
+ "name": "@comate-plugin/git",
4
+ "version": "0.9.2",
5
+ "type": "module",
6
+ "scripts": {
7
+ "clean": "rm -rf dist",
8
+ "dev": "cpd dev",
9
+ "build": "tsc && cpd build",
10
+ "lint": "eslint --max-warnings=0 src --fix"
11
+ },
12
+ "dependencies": {
13
+ "@gitbeaker/rest": "^39.34.3",
14
+ "hosted-git-info": "^7.0.1",
15
+ "octokit": "^3.1.2",
16
+ "simple-git": "^3.22.0"
17
+ },
18
+ "devDependencies": {
19
+ "@comate/plugin-cli": "^0.9.2",
20
+ "@comate/plugin-host": "^0.9.2",
21
+ "@types/hosted-git-info": "^3.0.5",
22
+ "eslint": "^8.54.0",
23
+ "typescript": "^5.3.3"
24
+ },
25
+ "comate": {
26
+ "name": "git",
27
+ "version": "1.0.0",
28
+ "icon": "./assets/git.svg",
29
+ "entry": "./dist/index.js",
30
+ "displayName": "Git",
31
+ "description": "支持创建GitHub、Gitee、GitLab Issues、生成提交信息等",
32
+ "keyword": [],
33
+ "capabilities": [
34
+ {
35
+ "type": "Skill",
36
+ "name": "git-help",
37
+ "displayName": "插件介绍",
38
+ "description": "插件介绍",
39
+ "placeholder": "无需输入内容,回车获得插件介绍"
40
+ },
41
+ {
42
+ "type": "Skill",
43
+ "name": "commitMessage",
44
+ "displayName": "生成提交",
45
+ "description": "使用大模型为你生成Git提交信息",
46
+ "placeholder": "无需输入内容,回车为你生成提交信息"
47
+ },
48
+ {
49
+ "type": "Skill",
50
+ "name": "createIssue",
51
+ "displayName": "创建Issue",
52
+ "description": "通过代码的修改创建Git Issue",
53
+ "placeholder": "无需输入内容,回车为你生成一个Issue"
54
+ },
55
+ {
56
+ "type": "Fallback",
57
+ "name": "fallback",
58
+ "displayName": "兜底",
59
+ "description": "兜底"
60
+ }
61
+ ],
62
+ "configSchema": {
63
+ "sections": [
64
+ {
65
+ "title": "应用授权",
66
+ "properties": {
67
+ "githubAccessToken": {
68
+ "type": "string",
69
+ "title": "GitHub Access Token",
70
+ "description": "输入你的GitHub Personal Access Token,请确保有创建Issue的权限",
71
+ "default": ""
72
+ },
73
+ "giteeAccessToken": {
74
+ "type": "string",
75
+ "title": "Gitee Access Token",
76
+ "description": "输入你的Gitee Personal Access Token,请确保有创建Issue的权限",
77
+ "default": ""
78
+ },
79
+ "gitlabAccessToken": {
80
+ "type": "string",
81
+ "title": "GitLab Access Token ",
82
+ "description": "输入你的GitLab Personal Access Token,请确保有创建Issue的权限",
83
+ "default": ""
84
+ }
85
+ },
86
+ "required": []
87
+ }
88
+ ]
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,78 @@
1
+ import { SkillProvider, StringChunkStream, TextModel } from '@comate/plugin-host';
2
+
3
+ const promptTemplate = `
4
+ 请根据以下背景知识:
5
+
6
+ {{trimedKnowledge}}
7
+
8
+ 回答问题:
9
+
10
+ {{query}}
11
+ `;
12
+ class ChatSkillProvider extends SkillProvider {
13
+ static{
14
+ this.skillName = 'answerQuestion';
15
+ }
16
+ static{
17
+ this.displayName = '鸿蒙知识集智能问答';
18
+ }
19
+ static{
20
+ this.description = '智能解答关于鸿蒙知识集的相关问题';
21
+ }
22
+ static{
23
+ this.parameters = {
24
+ type: 'object',
25
+ properties: {}
26
+ };
27
+ }
28
+ async *execute() {
29
+ const { query } = this.currentContext;
30
+ const stream = new StringChunkStream();
31
+ yield stream.flush('正在思考中,请耐心等候...');
32
+ try {
33
+ const knowledge = await this.retriever.knowledgeFromQuery(query, {
34
+ knowledgeSets: [
35
+ {
36
+ uuid: 'c00135be-ba05-4008-97ce-1f96d07247e4',
37
+ type: 'NORMAL'
38
+ }
39
+ ]
40
+ });
41
+ const isHavePic = knowledge?.some((x)=>x.match(/!\[(.*?)\]\((.*?)\)/)?.length);
42
+ const trimedKnowledge = this.trimKnowledge(knowledge, 8);
43
+ const prompt = this.llm.createPrompt(knowledge.length ? promptTemplate : '{{query}}', {
44
+ trimedKnowledge,
45
+ query: isHavePic ? `${query}图` : query
46
+ });
47
+ const chunks = this.llm.askForTextStreaming(prompt, {
48
+ model: TextModel.Default
49
+ });
50
+ yield stream.flushReplaceLast('');
51
+ for await (const chunk of chunks){
52
+ yield stream.flush(chunk);
53
+ }
54
+ } catch (error) {
55
+ yield stream.flushReplaceLast('出现错误,请稍后再试');
56
+ }
57
+ }
58
+ trimKnowledge(list, maxCount = 6, maxLength = 10000) {
59
+ const state = {
60
+ length: 0
61
+ };
62
+ const output = [];
63
+ for (const item of list){
64
+ if (state.length + item.length > maxLength || output.length >= maxCount) {
65
+ break;
66
+ }
67
+ output.push(item);
68
+ state.length += item.length;
69
+ }
70
+ return output;
71
+ }
72
+ }
73
+
74
+ function setup({ registry }) {
75
+ registry.registerSkillProvider('chat', ChatSkillProvider);
76
+ }
77
+
78
+ export { setup };
@@ -0,0 +1,37 @@
1
+ {
2
+ "private": true,
3
+ "name": "@comate-plugin/harmonyos",
4
+ "version": "0.8.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "clean": "rm -rf dist",
8
+ "dev": "cpd dev",
9
+ "build": "tsc && cpd build"
10
+ },
11
+ "dependencies": {},
12
+ "devDependencies": {
13
+ "@comate/plugin-cli": "^0.9.2",
14
+ "@comate/plugin-host": "^0.9.2",
15
+ "typescript": "^5.3.2"
16
+ },
17
+ "comate": {
18
+ "name": "harmonyos",
19
+ "version": "1.0.0",
20
+ "icon": "./assets/harmonyos.png",
21
+ "entry": "./dist/index.js",
22
+ "displayName": "鸿蒙",
23
+ "description": "帮助开发者快速、准确、全面的了解鸿蒙开发",
24
+ "keyword": [],
25
+ "capabilities": [
26
+ {
27
+ "type": "Skill",
28
+ "name": "chat",
29
+ "displayName": "智能问答",
30
+ "description": "智能解答关于鸿蒙知识集的相关问题"
31
+ }
32
+ ],
33
+ "configSchema": {
34
+ "sections": []
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,13 @@
1
+ 您好,我是您的 API 研发智能化助手 iAPI,我可以为您生成接口实现代码、接口代码注释等。
2
+
3
+ **接口实现代码**
4
+ * 输入来自 [iAPI官网](https://iapi.baidu-int.com/) 的接口ID或接口档协作链接后,点击发送或直接回车;
5
+ * 只需片刻,iAPI 将为您生成 Java 语言 SpringBoot 框架的实现代码,实现代码中包括 Bean、Dao、Service 、Controller 层;
6
+ * 详细教程请点击 [接口实现代码生成](https://ku.baidu-int.com/knowledge/HFVrC7hq1Q/t7n0qKWNJW/7urCLykvXO/Q0sCGFKFXa7OR8) 查看;
7
+
8
+ **接口代码注释**
9
+ * 框选需要生成注释的代码片段(接口实现方法、入参出参 Bean 结构等),点击发送或直接回车;
10
+ * 只需片刻,iAPI 将为您生成代码注释,目前支持 Java、Go 语言代码生成注释,生成的注释符合[API注释规范](https://ku.baidu-int.com/knowledge/HFVrC7hq1Q/_SKPgSwp2G/m2l2hEPGZF/B4D1Lp4Gcj8-tJ#anchor-d8dad8d3-bfde-11ee-8384-830bbf057322);
11
+ * 详细教程请点击 [接口代码注释生成](https://ku.baidu-int.com/knowledge/HFVrC7hq1Q/t7n0qKWNJW/7urCLykvXO/OyndOzRpviu47s) 查看;
12
+
13
+ 如果您在使用过程中发现问题或有其他需求、建议,欢迎加入我们的如流用户群 **8301696** 进行反馈。