ai-worktool 1.0.7
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/CHANGELOG.md +169 -0
- package/LICENSE.txt +1 -0
- package/README.md +67 -0
- package/dist/agents/chanjet.js +377 -0
- package/dist/agents/index.js +73 -0
- package/dist/agents/jianguoke.js +182 -0
- package/dist/agents/prompt.js +41 -0
- package/dist/agents/toolCall.js +135 -0
- package/dist/cli.js +9 -0
- package/dist/loging.js +110 -0
- package/dist/program.js +35 -0
- package/dist/testAgent.js +142 -0
- package/dist/tools/file.js +543 -0
- package/dist/tools/git.js +204 -0
- package/dist/tools/index.js +71 -0
- package/dist/tools/interface.js +3 -0
- package/dist/tools/javascript.js +180 -0
- package/dist/tools/jest.js +482 -0
- package/dist/tools/mocha.js +107 -0
- package/dist/tools/package.js +376 -0
- package/dist/tools/project.js +541 -0
- package/dist/tools/typescript.js +242 -0
- package/dist/tools/vitest.js +115 -0
- package/dist/user.js +472 -0
- package/dist/view.js +216 -0
- package/package.json +289 -0
package/package.json
ADDED
@@ -0,0 +1,289 @@
|
|
1
|
+
{
|
2
|
+
"name": "ai-worktool",
|
3
|
+
"displayName": "吃豆豆:单测智能体",
|
4
|
+
"version": "1.0.7",
|
5
|
+
"description": "单元测试智能体,帮你开发单元测试用例代码直到100%单测覆盖通过。",
|
6
|
+
"author": "jianguoke.cn",
|
7
|
+
"license": "MIT",
|
8
|
+
"repository": "https://codeup.aliyun.com/666cf9ed29ecbe23053513a3/JianGuoKe/ai-worktools",
|
9
|
+
"bin": {
|
10
|
+
"aicoder": "dist/cli.js"
|
11
|
+
},
|
12
|
+
"scripts": {
|
13
|
+
"watch": "tsc -w",
|
14
|
+
"build": "tsc",
|
15
|
+
"test": "jest --passWithNoTests test/tools/*.test.ts",
|
16
|
+
"plugin": "ts-node ./tools.ts && dify plugin package plugins/dify-plugin",
|
17
|
+
"package": "cross-env PKG_CACHE_PATH=./binaries pkg . --targets node20-win-x64 --out-path aicoder ",
|
18
|
+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
|
19
|
+
"ver": "node ./updatever.js",
|
20
|
+
"remove-deps": "node ./remove-deps.js",
|
21
|
+
"restore-deps": "node ./restore-deps.js",
|
22
|
+
"pub": "yarn remove-deps && yarn changelog && vsce publish --yarn --baseContentUrl https://static.jianguoke.cn/aicoder && yarn restore-deps",
|
23
|
+
"pubovsx": "yarn remove-deps && ovsx publish -p 47621ff6-be56-4814-865e-d2a8e8a76f86 --yarn --baseContentUrl https://static.jianguoke.cn/aicoder && yarn restore-deps",
|
24
|
+
"puball": "yarn remove-deps && yarn ver && yarn pub && yarn pubovsx && yarn restore-deps",
|
25
|
+
"patch": "yarn remove-deps && vsce publish patch --yarn && yarn restore-deps",
|
26
|
+
"vspack": "yarn remove-deps && vsce package -o aicoder.vsix --yarn --baseContentUrl https://static.jianguoke.cn/aicoder && yarn restore-deps",
|
27
|
+
"prepare": "husky"
|
28
|
+
},
|
29
|
+
"publisher": "JianGuoKe",
|
30
|
+
"icon": "resources/logo_white.png",
|
31
|
+
"engines": {
|
32
|
+
"vscode": "^1.54.0"
|
33
|
+
},
|
34
|
+
"pkg": {
|
35
|
+
"targets": [
|
36
|
+
"node18-win-x64",
|
37
|
+
"node18-macos-x64",
|
38
|
+
"node18-linux-x64"
|
39
|
+
],
|
40
|
+
"outputPath": "dist"
|
41
|
+
},
|
42
|
+
"categories": [
|
43
|
+
"Other"
|
44
|
+
],
|
45
|
+
"activationEvents": [
|
46
|
+
"onView:ai-worktool-apps"
|
47
|
+
],
|
48
|
+
"main": "./dist/extension.js",
|
49
|
+
"contributes": {
|
50
|
+
"commands": [
|
51
|
+
{
|
52
|
+
"command": "ai-worktool.startTestAgent",
|
53
|
+
"category": "单测智能体",
|
54
|
+
"title": "启用/停用单测智能体"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"command": "ai-worktool.loginCommand",
|
58
|
+
"category": "单测智能体",
|
59
|
+
"title": "登录"
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"command": "ai-worktool.logoutCommand",
|
63
|
+
"category": "单测智能体",
|
64
|
+
"title": "退出"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"command": "ai-worktool.cancelLoginCommand",
|
68
|
+
"category": "单测智能体",
|
69
|
+
"title": "取消登录"
|
70
|
+
},
|
71
|
+
{
|
72
|
+
"command": "ai-worktool.orderCommand",
|
73
|
+
"category": "单测智能体",
|
74
|
+
"title": "购买"
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"command": "ai-worktool.usageCommand",
|
78
|
+
"category": "单测智能体",
|
79
|
+
"title": "用量"
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"command": "ai-worktool.homePageCommand",
|
83
|
+
"category": "单测智能体",
|
84
|
+
"title": "首页"
|
85
|
+
}
|
86
|
+
],
|
87
|
+
"submenus": [
|
88
|
+
{
|
89
|
+
"id": "ai-worktool.submenu",
|
90
|
+
"label": "更多操作",
|
91
|
+
"icon": "$(ellipsis)"
|
92
|
+
}
|
93
|
+
],
|
94
|
+
"menus": {
|
95
|
+
"view/title": [
|
96
|
+
{
|
97
|
+
"when": "view == ai-worktool-webview && ai-worktool.isLoggedIn == true",
|
98
|
+
"submenu": "ai-worktool.submenu",
|
99
|
+
"group": "navigation"
|
100
|
+
}
|
101
|
+
],
|
102
|
+
"ai-worktool.submenu": [
|
103
|
+
{
|
104
|
+
"command": "ai-worktool.homePageCommand",
|
105
|
+
"when": "ai-worktool.isLoggedIn == true",
|
106
|
+
"group": "navigation@1"
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"command": "ai-worktool.loginCommand",
|
110
|
+
"when": "ai-worktool.isLoggedIn == false",
|
111
|
+
"group": "navigation@2"
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"command": "ai-worktool.usageCommand",
|
115
|
+
"when": "ai-worktool.isLoggedIn == true",
|
116
|
+
"group": "navigation@5"
|
117
|
+
},
|
118
|
+
{
|
119
|
+
"command": "ai-worktool.logoutCommand",
|
120
|
+
"when": "ai-worktool.isLoggedIn == true",
|
121
|
+
"group": "navigation@10"
|
122
|
+
}
|
123
|
+
]
|
124
|
+
},
|
125
|
+
"viewsContainers": {
|
126
|
+
"activitybar": [
|
127
|
+
{
|
128
|
+
"id": "ai-worktool",
|
129
|
+
"title": "吃豆豆:单测智能体",
|
130
|
+
"icon": "resources/logo.svg"
|
131
|
+
}
|
132
|
+
]
|
133
|
+
},
|
134
|
+
"views": {
|
135
|
+
"ai-worktool": [
|
136
|
+
{
|
137
|
+
"type": "webview",
|
138
|
+
"id": "ai-worktool-webview",
|
139
|
+
"icon": "resources/logo.svg",
|
140
|
+
"name": "吃豆豆:单测智能体"
|
141
|
+
}
|
142
|
+
]
|
143
|
+
},
|
144
|
+
"configuration": {
|
145
|
+
"type": "object",
|
146
|
+
"title": "吃豆豆:单测智能体",
|
147
|
+
"properties": {
|
148
|
+
"ai-worktool.platform": {
|
149
|
+
"type": "string",
|
150
|
+
"default": "jianguoke",
|
151
|
+
"enum": [
|
152
|
+
"jianguoke",
|
153
|
+
"chanjet"
|
154
|
+
],
|
155
|
+
"description": "智能体平台选择"
|
156
|
+
},
|
157
|
+
"ai-worktool.packageManager": {
|
158
|
+
"type": "string",
|
159
|
+
"default": "yarn",
|
160
|
+
"description": "包管理器选择",
|
161
|
+
"enum": [
|
162
|
+
"npm",
|
163
|
+
"yarn",
|
164
|
+
"pnpm",
|
165
|
+
"bun"
|
166
|
+
],
|
167
|
+
"scope": "resource"
|
168
|
+
},
|
169
|
+
"ai-worktool.testFramework": {
|
170
|
+
"type": "string",
|
171
|
+
"default": "jest",
|
172
|
+
"description": "测试框架选择",
|
173
|
+
"enum": [
|
174
|
+
"jest",
|
175
|
+
"vitest",
|
176
|
+
"mocha",
|
177
|
+
"jasmine",
|
178
|
+
"junit",
|
179
|
+
"pytest",
|
180
|
+
"cypress",
|
181
|
+
"cucumber",
|
182
|
+
"protractor",
|
183
|
+
"testcafe"
|
184
|
+
],
|
185
|
+
"scope": "resource"
|
186
|
+
},
|
187
|
+
"ai-worktool.language": {
|
188
|
+
"type": "string",
|
189
|
+
"default": "typescript",
|
190
|
+
"description": "开发语言选择",
|
191
|
+
"enum": [
|
192
|
+
"typescript",
|
193
|
+
"javascript",
|
194
|
+
"python",
|
195
|
+
"java",
|
196
|
+
"c++",
|
197
|
+
"ruby",
|
198
|
+
"php",
|
199
|
+
"go",
|
200
|
+
"rust",
|
201
|
+
"swift",
|
202
|
+
"kotlin",
|
203
|
+
"scala",
|
204
|
+
"objective-c",
|
205
|
+
"c#",
|
206
|
+
"fortran",
|
207
|
+
"lisp",
|
208
|
+
"commonlisp",
|
209
|
+
"scheme",
|
210
|
+
"cobol",
|
211
|
+
"apl",
|
212
|
+
"c"
|
213
|
+
],
|
214
|
+
"scope": "resource"
|
215
|
+
},
|
216
|
+
"ai-worktool.coverageDir": {
|
217
|
+
"type": "string",
|
218
|
+
"default": "coverage",
|
219
|
+
"description": "单测报告文件夹",
|
220
|
+
"scope": "resource"
|
221
|
+
},
|
222
|
+
"ai-worktool.testDir": {
|
223
|
+
"type": "string",
|
224
|
+
"default": "test",
|
225
|
+
"description": "单测文件夹",
|
226
|
+
"scope": "resource"
|
227
|
+
},
|
228
|
+
"ai-worktool.srcDir": {
|
229
|
+
"type": "string",
|
230
|
+
"default": "src",
|
231
|
+
"description": "源代码文件夹",
|
232
|
+
"scope": "resource"
|
233
|
+
},
|
234
|
+
"ai-worktool.autoCommit": {
|
235
|
+
"type": "boolean",
|
236
|
+
"default": true,
|
237
|
+
"description": "单测通过修改文件自动提交代码到远程仓库"
|
238
|
+
},
|
239
|
+
"ai-worktool.withConversation": {
|
240
|
+
"type": "boolean",
|
241
|
+
"default": false,
|
242
|
+
"description": "每次执行单测时是否继续与智能体进行会话对话"
|
243
|
+
},
|
244
|
+
"ai-worktool.fullCoverageEnd": {
|
245
|
+
"type": "boolean",
|
246
|
+
"default": true,
|
247
|
+
"description": "单测覆盖100%时结束执行"
|
248
|
+
}
|
249
|
+
}
|
250
|
+
}
|
251
|
+
},
|
252
|
+
"dependencies": {
|
253
|
+
"fetch-sse": "^1.1.2",
|
254
|
+
"jsonwebtoken": "^9.0.2",
|
255
|
+
"simple-git": "^3.28.0",
|
256
|
+
"acorn": "^8.15.0",
|
257
|
+
"acorn-walk": "^8.3.4",
|
258
|
+
"typescript": "^5.9.2",
|
259
|
+
"chalk": "^5.4.1",
|
260
|
+
"commander": "^14.0.0",
|
261
|
+
"table": "^6.9.0"
|
262
|
+
},
|
263
|
+
"devDependencies": {
|
264
|
+
"@types/jest": "^30.0.0",
|
265
|
+
"@types/jsonwebtoken": "^9.0.10",
|
266
|
+
"@types/node": "^24.1.0",
|
267
|
+
"@types/vscode": "^1.54.0",
|
268
|
+
"@typescript-eslint/eslint-plugin": "^4.31.1",
|
269
|
+
"@typescript-eslint/parser": "^4.31.1",
|
270
|
+
"@vscode/test-electron": "^1.6.2",
|
271
|
+
"@yao-pkg/pkg": "^6.6.0",
|
272
|
+
"@yao-pkg/pkg-fetch": "^3.5.24",
|
273
|
+
"conventional-changelog-cli": "^2.2.2",
|
274
|
+
"cross-env": "^10.0.0",
|
275
|
+
"eslint": "^7.32.0",
|
276
|
+
"husky": "^9.1.7",
|
277
|
+
"jest": "^29.7.0",
|
278
|
+
"lint-staged": "^16.1.2",
|
279
|
+
"nexe": "^5.0.0-beta.4",
|
280
|
+
"ovsx": "^0.10.5",
|
281
|
+
"ts-jest": "^29.4.0",
|
282
|
+
"ts-node": "^10.9.2",
|
283
|
+
"vsce": "^2.6.4"
|
284
|
+
},
|
285
|
+
"jest": {
|
286
|
+
"preset": "ts-jest",
|
287
|
+
"testEnvironment": "node"
|
288
|
+
}
|
289
|
+
}
|