@comate/zulu 0.7.1 → 0.7.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.
- package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.d.ts +1 -0
- package/comate-engine/server.js +3 -3
- package/dist/bundle/index.js +2 -2
- package/package.json +1 -1
- package/comate-engine/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/comate-engine/plugins/aiscan/assets/icon.svg +0 -12
- package/comate-engine/plugins/aiscan/dist/index.js +0 -54426
- package/comate-engine/plugins/aiscan/package.json +0 -67
- package/comate-engine/plugins/appdev/assets/icon.png +0 -0
- package/comate-engine/plugins/appdev/dist/help.md +0 -12
- package/comate-engine/plugins/appdev/dist/index.d.ts +0 -2
- package/comate-engine/plugins/appdev/dist/index.js +0 -194
- package/comate-engine/plugins/appdev/dist/providers/err.d.ts +0 -8
- package/comate-engine/plugins/appdev/dist/providers/err.js +0 -37
- package/comate-engine/plugins/appdev/dist/providers/fallback.d.ts +0 -5
- package/comate-engine/plugins/appdev/dist/providers/fallback.js +0 -28
- package/comate-engine/plugins/appdev/dist/providers/help.d.ts +0 -8
- package/comate-engine/plugins/appdev/dist/providers/help.js +0 -19
- package/comate-engine/plugins/appdev/dist/providers/medusa.d.ts +0 -8
- package/comate-engine/plugins/appdev/dist/providers/medusa.js +0 -39
- package/comate-engine/plugins/appdev/dist/providers/qa.d.ts +0 -8
- package/comate-engine/plugins/appdev/dist/providers/qa.js +0 -33
- package/comate-engine/plugins/appdev/package.json +0 -67
- package/comate-engine/plugins/bfc/assets/bfc-icon.png +0 -0
- package/comate-engine/plugins/bfc/dist/config/config.d.ts +0 -4
- package/comate-engine/plugins/bfc/dist/config/config.js +0 -4
- package/comate-engine/plugins/bfc/dist/help.md +0 -11
- package/comate-engine/plugins/bfc/dist/index.d.ts +0 -2
- package/comate-engine/plugins/bfc/dist/index.js +0 -452
- package/comate-engine/plugins/bfc/dist/providers/bfcInstructMode.d.ts +0 -8
- package/comate-engine/plugins/bfc/dist/providers/bfcInstructMode.js +0 -77
- package/comate-engine/plugins/bfc/dist/providers/genAbnormalCode.d.ts +0 -8
- package/comate-engine/plugins/bfc/dist/providers/genAbnormalCode.js +0 -71
- package/comate-engine/plugins/bfc/dist/providers/genBfcCode.d.ts +0 -8
- package/comate-engine/plugins/bfc/dist/providers/genBfcCode.js +0 -74
- package/comate-engine/plugins/bfc/dist/providers/getBatchCases.d.ts +0 -10
- package/comate-engine/plugins/bfc/dist/providers/getBatchCases.js +0 -71
- package/comate-engine/plugins/bfc/dist/providers/help.d.ts +0 -8
- package/comate-engine/plugins/bfc/dist/providers/help.js +0 -19
- package/comate-engine/plugins/bfc/dist/service/generateService.d.ts +0 -14
- package/comate-engine/plugins/bfc/dist/service/generateService.js +0 -27
- package/comate-engine/plugins/bfc/package.json +0 -85
- package/comate-engine/plugins/bpm/assets/bpm.png +0 -0
- package/comate-engine/plugins/bpm/dist/index.js +0 -313
- package/comate-engine/plugins/bpm/package.json +0 -65
- package/comate-engine/plugins/casebuilder/assets/icon.svg +0 -1
- package/comate-engine/plugins/casebuilder/dist/help.md +0 -33
- package/comate-engine/plugins/casebuilder/dist/index.js +0 -837
- package/comate-engine/plugins/casebuilder/package.json +0 -80
- package/comate-engine/plugins/centrino/assets/icon.png +0 -0
- package/comate-engine/plugins/centrino/dist/help.md +0 -30
- package/comate-engine/plugins/centrino/dist/index.js +0 -1046
- package/comate-engine/plugins/centrino/package.json +0 -68
- package/comate-engine/plugins/cnap/assets/cnap.png +0 -0
- package/comate-engine/plugins/cnap/dist/help.md +0 -11
- package/comate-engine/plugins/cnap/dist/index.js +0 -171
- package/comate-engine/plugins/cnap/package.json +0 -65
- package/comate-engine/plugins/demo-timer/assets/icon.svg +0 -2
- package/comate-engine/plugins/demo-timer/dist/index.js +0 -463
- package/comate-engine/plugins/demo-timer/package.json +0 -73
- package/comate-engine/plugins/dev-tools/assets/icon.png +0 -0
- package/comate-engine/plugins/dev-tools/dist/help.md +0 -18
- package/comate-engine/plugins/dev-tools/dist/index.js +0 -166160
- package/comate-engine/plugins/dev-tools/package.json +0 -95
- package/comate-engine/plugins/devaux/assets/icon.svg +0 -1
- package/comate-engine/plugins/devaux/dist/help.md +0 -41
- package/comate-engine/plugins/devaux/dist/index.js +0 -75551
- package/comate-engine/plugins/devaux/dist/static/tree-sitter-cpp.wasm +0 -0
- package/comate-engine/plugins/devaux/dist/static/tree-sitter-go.wasm +0 -0
- package/comate-engine/plugins/devaux/dist/static/tree-sitter.wasm +0 -0
- package/comate-engine/plugins/devaux/dist/tree-sitter.wasm +0 -0
- package/comate-engine/plugins/devaux/package.json +0 -82
- package/comate-engine/plugins/f2c/assets/icon.svg +0 -11
- package/comate-engine/plugins/f2c/dist/help.md +0 -13
- package/comate-engine/plugins/f2c/dist/index.js +0 -101649
- package/comate-engine/plugins/f2c/package.json +0 -56
- package/comate-engine/plugins/fcnap/assets/icon.png +0 -0
- package/comate-engine/plugins/fcnap/dist/help.md +0 -9
- package/comate-engine/plugins/fcnap/dist/index.js +0 -105
- package/comate-engine/plugins/fcnap/package.json +0 -50
- package/comate-engine/plugins/front-end-skills/assets/icon.svg +0 -1
- package/comate-engine/plugins/front-end-skills/dist/help.md +0 -17
- package/comate-engine/plugins/front-end-skills/dist/index.js +0 -8172
- package/comate-engine/plugins/front-end-skills/package.json +0 -79
- package/comate-engine/plugins/gdp/assets/icon.png +0 -0
- package/comate-engine/plugins/gdp/dist/help.md +0 -11
- package/comate-engine/plugins/gdp/dist/index.js +0 -70806
- package/comate-engine/plugins/gdp/package.json +0 -80
- package/comate-engine/plugins/git/assets/git.svg +0 -1
- package/comate-engine/plugins/git/assets/icon.svg +0 -1
- package/comate-engine/plugins/git/dist/help.md +0 -7
- package/comate-engine/plugins/git/dist/index.js +0 -32765
- package/comate-engine/plugins/git/package.json +0 -91
- package/comate-engine/plugins/harmonyos/assets/harmonyos.png +0 -0
- package/comate-engine/plugins/harmonyos/dist/index.js +0 -78
- package/comate-engine/plugins/harmonyos/package.json +0 -37
- package/comate-engine/plugins/iapi/assets/icon.png +0 -0
- package/comate-engine/plugins/iapi/dist/help.md +0 -13
- package/comate-engine/plugins/iapi/dist/index.js +0 -458
- package/comate-engine/plugins/iapi/dist/static/lang/tree-sitter-go.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/static/lang/tree-sitter-java.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/static/tree-sitter-go.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/static/tree-sitter-java.wasm +0 -0
- package/comate-engine/plugins/iapi/dist/tree-sitter.wasm +0 -0
- package/comate-engine/plugins/iapi/package.json +0 -102
- package/comate-engine/plugins/icafe/assets/icafe.svg +0 -1
- package/comate-engine/plugins/icafe/dist/help.md +0 -5
- package/comate-engine/plugins/icafe/dist/index.js +0 -885
- package/comate-engine/plugins/icafe/package.json +0 -74
- package/comate-engine/plugins/ievalue/assets/iEValue.svg +0 -10
- package/comate-engine/plugins/ievalue/dist/index.js +0 -2920
- package/comate-engine/plugins/ievalue/package.json +0 -88
- package/comate-engine/plugins/ipipe/assets/iPipePlugin.png +0 -0
- package/comate-engine/plugins/ipipe/dist/help.md +0 -15
- package/comate-engine/plugins/ipipe/dist/index.js +0 -7268
- package/comate-engine/plugins/ipipe/package.json +0 -62
- package/comate-engine/plugins/jarvis/assets/icon.svg +0 -1
- package/comate-engine/plugins/jarvis/dist/help.md +0 -17
- package/comate-engine/plugins/jarvis/dist/index.js +0 -140473
- package/comate-engine/plugins/jarvis/package.json +0 -93
- package/comate-engine/plugins/mapsearch/assets/mapsearchicon.png +0 -0
- package/comate-engine/plugins/mapsearch/dist/help.md +0 -4
- package/comate-engine/plugins/mapsearch/dist/index.js +0 -145
- package/comate-engine/plugins/mapsearch/package.json +0 -53
- package/comate-engine/plugins/paddle/assets/icon.png +0 -0
- package/comate-engine/plugins/paddle/assets/paconvert-3.0.1-py3-none-any.whl +0 -0
- package/comate-engine/plugins/paddle/dist/help.md +0 -31
- package/comate-engine/plugins/paddle/dist/index.js +0 -1011
- package/comate-engine/plugins/paddle/package.json +0 -129
- package/comate-engine/plugins/robot/assets/Robot.png +0 -0
- package/comate-engine/plugins/robot/dist/index.js +0 -476
- package/comate-engine/plugins/robot/package.json +0 -91
- package/comate-engine/plugins/security/assets/comate.png +0 -0
- package/comate-engine/plugins/security/dist/index.js +0 -18434
- package/comate-engine/plugins/security/package.json +0 -82
- package/comate-engine/plugins/smartapp/assets/icon.png +0 -0
- package/comate-engine/plugins/smartapp/dist/help.md +0 -4
- package/comate-engine/plugins/smartapp/dist/index.js +0 -113
- package/comate-engine/plugins/smartapp/package.json +0 -54
- package/comate-engine/plugins/testmate/assets/icon.svg +0 -1
- package/comate-engine/plugins/testmate/dist/help.md +0 -62
- package/comate-engine/plugins/testmate/dist/index.js +0 -21483
- package/comate-engine/plugins/testmate/package.json +0 -85
- package/comate-engine/plugins/tor/assets/TorPlugin.png +0 -0
- package/comate-engine/plugins/tor/dist/help.md +0 -22
- package/comate-engine/plugins/tor/dist/index.js +0 -807
- package/comate-engine/plugins/tor/package.json +0 -99
- package/comate-engine/plugins/weiyun/assets/icon.png +0 -0
- package/comate-engine/plugins/weiyun/dist/help.md +0 -11
- package/comate-engine/plugins/weiyun/dist/index.js +0 -100495
- package/comate-engine/plugins/weiyun/package.json +0 -55
- package/comate-engine/plugins/workcard/assets/favicon.png +0 -0
- package/comate-engine/plugins/workcard/dist/help.md +0 -30
- package/comate-engine/plugins/workcard/dist/index.js +0 -547
- package/comate-engine/plugins/workcard/package.json +0 -102
|
@@ -1,91 +0,0 @@
|
|
|
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
|
-
}
|
|
Binary file
|
|
@@ -1,78 +0,0 @@
|
|
|
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 };
|
|
@@ -1,37 +0,0 @@
|
|
|
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
|
-
}
|
|
Binary file
|
|
@@ -1,13 +0,0 @@
|
|
|
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** 进行反馈。
|