plugin-git-manager 1.2.12 → 1.2.13
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/dist/client/900.ec1fa7f16eb8cce6.js +10 -0
- package/dist/client/index.js +1 -1
- package/dist/client-v2/900.7a5e80bf21feda66.js +10 -0
- package/dist/client-v2/index.js +1 -1
- package/dist/externalVersion.js +7 -7
- package/dist/locale/en-US.json +28 -1
- package/dist/locale/vi-VN.json +30 -1
- package/dist/server/actions/git-actions.js +5 -3
- package/dist/server/actions/review.js +40 -3
- package/dist/server/ai-tools.js +30 -0
- package/dist/server/collections/gitCodeReviews.js +8 -1
- package/dist/server/plugin.js +17 -10
- package/package.json +1 -1
- package/src/client/components/FileExplorer.tsx +63 -11
- package/src/client/components/ReviewFlows.tsx +33 -11
- package/src/client/components/ReviewHistory.tsx +45 -9
- package/src/client/components/RunReviewButton.tsx +436 -375
- package/src/client/promptTemplates.ts +31 -0
- package/src/locale/en-US.json +28 -1
- package/src/locale/vi-VN.json +30 -1
- package/src/server/actions/git-actions.ts +432 -430
- package/src/server/actions/review.ts +51 -7
- package/src/server/ai-tools.ts +32 -4
- package/src/server/collections/gitCodeReviews.ts +7 -0
- package/src/server/plugin.ts +250 -242
- package/dist/client/878.3e7b8b27c157996c.js +0 -10
- package/dist/client-v2/878.295f09c9d77ea6d8.js +0 -10
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface ReviewPromptTemplate {
|
|
2
|
+
key: 'application' | 'workflow-config';
|
|
3
|
+
label: string;
|
|
4
|
+
text: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const REVIEW_PROMPT_TEMPLATES: ReviewPromptTemplate[] = [
|
|
8
|
+
{
|
|
9
|
+
key: 'application',
|
|
10
|
+
label: 'Application code (C#, .NET, Java, JS/TS…)',
|
|
11
|
+
text: `Please review the code changes with a focus on:
|
|
12
|
+
1. Best Practices & Style:
|
|
13
|
+
- C#/VB.NET: Follow standard naming conventions (PascalCase for methods/properties, camelCase for fields). Ensure proper use of async/await (avoid .Result/.Wait()). Use LINQ efficiently.
|
|
14
|
+
- Java: Follow standard naming conventions. Check null-safety (Optional, null checks). Prefer try-with-resources for closeable resources and use streams/collections idiomatically.
|
|
15
|
+
- JS/TS: Use strict equality (===), prefer const/let. Ensure TypeScript types are explicit and avoid 'any'.
|
|
16
|
+
2. Performance: Watch out for N+1 queries, unnecessary loops, and memory leaks.
|
|
17
|
+
3. Security: Identify potential SQL injections, XSS vulnerabilities, and improper data validation.
|
|
18
|
+
4. Maintainability: Check for readability, SOLID principles, and DRY. Ensure meaningful naming.
|
|
19
|
+
5. Error Handling: Verify that exceptions are properly caught, handled, and logged.`,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
key: 'workflow-config',
|
|
23
|
+
label: 'Workflow / Config (XML, XAML, YAML, JSON…)',
|
|
24
|
+
text: `Please review the workflow/configuration files (XML, XAML, YAML, JSON, ...) with a focus on:
|
|
25
|
+
1. Structure & Validity: Well-formed syntax, correct schema/namespace usage, no duplicate or conflicting keys, consistent indentation and encoding.
|
|
26
|
+
2. Workflow Logic: Unreachable or dead steps, missing error handling / retry / timeout settings, incorrect transitions or dependencies between steps, infinite loops.
|
|
27
|
+
3. Security: Hardcoded credentials, secrets, tokens or connection strings; insecure endpoints (http instead of https); overly broad permissions.
|
|
28
|
+
4. Environment & Portability: Hardcoded environment-specific values (paths, hosts, ports) that should be parameterized; missing default values.
|
|
29
|
+
5. Maintainability: Meaningful naming for steps/variables, duplicated blocks that should be shared, obsolete or unused entries.`,
|
|
30
|
+
},
|
|
31
|
+
];
|
package/src/locale/en-US.json
CHANGED
|
@@ -193,5 +193,32 @@
|
|
|
193
193
|
"Write (Clone, Pull, Push, Review)": "Write (Clone, Pull, Push, Review)",
|
|
194
194
|
"Configure access permissions for each repository for the role {{roleName}}": "Configure access permissions for each repository for the role {{roleName}}",
|
|
195
195
|
"Failed to load repository permissions": "Failed to load repository permissions",
|
|
196
|
-
"Failed to update permissions": "Failed to update permissions"
|
|
196
|
+
"Failed to update permissions": "Failed to update permissions",
|
|
197
|
+
"Code Review": "Code Review",
|
|
198
|
+
"Run code review": "Run code review",
|
|
199
|
+
"Start Review": "Start Review",
|
|
200
|
+
"Review started": "Review started",
|
|
201
|
+
"Review Flow": "Review Flow",
|
|
202
|
+
"Please select a review flow": "Please select a review flow",
|
|
203
|
+
"Select a review flow": "Select a review flow",
|
|
204
|
+
"Create a review flow in the Review Flows tab first": "Create a review flow in the Review Flows tab first",
|
|
205
|
+
"No enabled flow found for this repository": "No enabled flow found for this repository",
|
|
206
|
+
"global": "global",
|
|
207
|
+
"Extra instructions (optional)": "Extra instructions (optional)",
|
|
208
|
+
"e.g. Focus on security issues in authentication": "e.g. Focus on security issues in authentication",
|
|
209
|
+
"AI plugin is not available": "AI plugin is not available",
|
|
210
|
+
"View in Review History tab": "View in Review History tab",
|
|
211
|
+
"Please switch to the \"Review History\" tab to see the details.": "Please switch to the \"Review History\" tab to see the details.",
|
|
212
|
+
"Prompt template": "Prompt template",
|
|
213
|
+
"Load a default prompt by code type": "Load a default prompt by code type",
|
|
214
|
+
"Selecting a template replaces the instructions text": "Selecting a template replaces the instructions text",
|
|
215
|
+
"Selecting a template replaces the extra instructions text": "Selecting a template replaces the extra instructions text",
|
|
216
|
+
"Application code (C#, .NET, Java, JS/TS…)": "Application code (C#, .NET, Java, JS/TS…)",
|
|
217
|
+
"Workflow / Config (XML, XAML, YAML, JSON…)": "Workflow / Config (XML, XAML, YAML, JSON…)",
|
|
218
|
+
"Folder": "Folder",
|
|
219
|
+
"Entire repository": "Entire repository",
|
|
220
|
+
"MR": "MR",
|
|
221
|
+
"COMMIT": "Commit",
|
|
222
|
+
"BRANCH": "Branch",
|
|
223
|
+
"FOLDER": "Folder"
|
|
197
224
|
}
|
package/src/locale/vi-VN.json
CHANGED
|
@@ -186,5 +186,34 @@
|
|
|
186
186
|
"Write (Clone, Pull, Push, Review)": "Ghi (Sao chép, Kéo về, Đẩy lên, Đánh giá)",
|
|
187
187
|
"Configure access permissions for each repository for the role {{roleName}}": "Cấu hình quyền truy cập cho từng kho mã nguồn đối với vai trò {{roleName}}",
|
|
188
188
|
"Failed to load repository permissions": "Không thể tải phân quyền kho mã nguồn",
|
|
189
|
-
"Failed to update permissions": "Cập nhật phân quyền thất bại"
|
|
189
|
+
"Failed to update permissions": "Cập nhật phân quyền thất bại",
|
|
190
|
+
"AI employee not found": "Không tìm thấy AI employee",
|
|
191
|
+
"Failed to open AI chat": "Mở AI chat thất bại",
|
|
192
|
+
"Code Review": "Đánh giá code",
|
|
193
|
+
"Run code review": "Chạy đánh giá code",
|
|
194
|
+
"Start Review": "Bắt đầu đánh giá",
|
|
195
|
+
"Review started": "Đã bắt đầu đánh giá",
|
|
196
|
+
"Review Flow": "Luồng đánh giá",
|
|
197
|
+
"Please select a review flow": "Vui lòng chọn luồng đánh giá",
|
|
198
|
+
"Select a review flow": "Chọn luồng đánh giá",
|
|
199
|
+
"Create a review flow in the Review Flows tab first": "Hãy tạo luồng đánh giá ở tab Luồng đánh giá trước",
|
|
200
|
+
"No enabled flow found for this repository": "Không tìm thấy luồng nào được bật cho kho này",
|
|
201
|
+
"global": "toàn cục",
|
|
202
|
+
"Extra instructions (optional)": "Hướng dẫn bổ sung (tùy chọn)",
|
|
203
|
+
"e.g. Focus on security issues in authentication": "ví dụ: Tập trung vào lỗi bảo mật trong phần xác thực",
|
|
204
|
+
"AI plugin is not available": "Plugin AI chưa sẵn sàng",
|
|
205
|
+
"View in Review History tab": "Xem trong tab Lịch sử đánh giá",
|
|
206
|
+
"Please switch to the \"Review History\" tab to see the details.": "Vui lòng chuyển sang tab \"Lịch sử đánh giá\" để xem chi tiết.",
|
|
207
|
+
"Prompt template": "Mẫu prompt",
|
|
208
|
+
"Load a default prompt by code type": "Nạp prompt mặc định theo loại code",
|
|
209
|
+
"Selecting a template replaces the instructions text": "Chọn mẫu sẽ thay thế nội dung hướng dẫn",
|
|
210
|
+
"Selecting a template replaces the extra instructions text": "Chọn mẫu sẽ thay thế nội dung hướng dẫn bổ sung",
|
|
211
|
+
"Application code (C#, .NET, Java, JS/TS…)": "Code ứng dụng (C#, .NET, Java, JS/TS…)",
|
|
212
|
+
"Workflow / Config (XML, XAML, YAML, JSON…)": "Workflow / Cấu hình (XML, XAML, YAML, JSON…)",
|
|
213
|
+
"Folder": "Thư mục",
|
|
214
|
+
"Entire repository": "Toàn bộ kho",
|
|
215
|
+
"MR": "MR",
|
|
216
|
+
"COMMIT": "Commit",
|
|
217
|
+
"BRANCH": "Nhánh",
|
|
218
|
+
"FOLDER": "Thư mục"
|
|
190
219
|
}
|