@probelabs/visor 0.1.30 → 0.1.34
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/README.md +116 -5
- package/defaults/.visor.yaml +14 -24
- package/dist/ai-review-service.d.ts +1 -1
- package/dist/ai-review-service.d.ts.map +1 -1
- package/dist/check-execution-engine.d.ts.map +1 -1
- package/dist/defaults/.visor.yaml +14 -24
- package/dist/index.js +435 -102
- package/dist/pr-analyzer.d.ts +2 -0
- package/dist/pr-analyzer.d.ts.map +1 -1
- package/dist/providers/ai-check-provider.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1229,28 +1229,139 @@ When checks return the structured format above:
|
|
|
1229
1229
|
## 🧠 Advanced AI Features
|
|
1230
1230
|
|
|
1231
1231
|
### XML-Formatted Analysis
|
|
1232
|
-
Visor
|
|
1232
|
+
Visor uses structured XML formatting when sending data to AI providers, enabling precise and context-aware analysis for both pull requests and issues.
|
|
1233
|
+
|
|
1234
|
+
#### Pull Request Context
|
|
1235
|
+
For PR events, Visor provides comprehensive code review context:
|
|
1233
1236
|
|
|
1234
1237
|
```xml
|
|
1235
1238
|
<pull_request>
|
|
1236
1239
|
<metadata>
|
|
1237
|
-
<
|
|
1238
|
-
<
|
|
1239
|
-
<
|
|
1240
|
+
<number>123</number> <!-- PR number -->
|
|
1241
|
+
<title>Add user authentication</title> <!-- PR title -->
|
|
1242
|
+
<author>developer</author> <!-- PR author username -->
|
|
1243
|
+
<base_branch>main</base_branch> <!-- Target branch (where changes will be merged) -->
|
|
1244
|
+
<target_branch>feature-auth</target_branch> <!-- Source branch (contains the changes) -->
|
|
1245
|
+
<total_additions>250</total_additions> <!-- Total lines added across all files -->
|
|
1246
|
+
<total_deletions>50</total_deletions> <!-- Total lines removed across all files -->
|
|
1247
|
+
<files_changed_count>3</files_changed_count> <!-- Number of files modified -->
|
|
1240
1248
|
</metadata>
|
|
1249
|
+
|
|
1241
1250
|
<description>
|
|
1242
|
-
|
|
1251
|
+
<!-- PR description/body text provided by the author -->
|
|
1252
|
+
This PR implements JWT-based authentication with refresh token support
|
|
1243
1253
|
</description>
|
|
1254
|
+
|
|
1244
1255
|
<full_diff>
|
|
1256
|
+
<!-- Complete unified diff of all changes (present for all PR analyses) -->
|
|
1245
1257
|
--- src/auth.ts
|
|
1246
1258
|
+++ src/auth.ts
|
|
1247
1259
|
@@ -1,3 +1,10 @@
|
|
1248
1260
|
+import jwt from 'jsonwebtoken';
|
|
1249
1261
|
...
|
|
1250
1262
|
</full_diff>
|
|
1263
|
+
|
|
1264
|
+
<commit_diff>
|
|
1265
|
+
<!-- Only present for incremental analysis (pr_updated events) -->
|
|
1266
|
+
<!-- Contains diff of just the latest commit pushed -->
|
|
1267
|
+
</commit_diff>
|
|
1268
|
+
|
|
1269
|
+
<files_summary>
|
|
1270
|
+
<!-- List of all modified files with change statistics -->
|
|
1271
|
+
<file index="1">
|
|
1272
|
+
<filename>src/auth.ts</filename>
|
|
1273
|
+
<status>modified</status> <!-- added/modified/removed/renamed -->
|
|
1274
|
+
<additions>120</additions> <!-- Lines added in this file -->
|
|
1275
|
+
<deletions>10</deletions> <!-- Lines removed from this file -->
|
|
1276
|
+
</file>
|
|
1277
|
+
</files_summary>
|
|
1278
|
+
|
|
1279
|
+
<!-- Only present for issue_comment events on PRs -->
|
|
1280
|
+
<triggering_comment>
|
|
1281
|
+
<author>reviewer1</author>
|
|
1282
|
+
<created_at>2024-01-16T15:30:00Z</created_at>
|
|
1283
|
+
<body>/review --check security</body>
|
|
1284
|
+
</triggering_comment>
|
|
1285
|
+
|
|
1286
|
+
<!-- Historical comments on the PR (excludes triggering comment) -->
|
|
1287
|
+
<comment_history>
|
|
1288
|
+
<comment index="1">
|
|
1289
|
+
<author>reviewer2</author>
|
|
1290
|
+
<created_at>2024-01-15T11:00:00Z</created_at>
|
|
1291
|
+
<body>Please add unit tests for the authentication logic</body>
|
|
1292
|
+
</comment>
|
|
1293
|
+
<comment index="2">
|
|
1294
|
+
<author>developer</author>
|
|
1295
|
+
<created_at>2024-01-15T14:30:00Z</created_at>
|
|
1296
|
+
<body>Tests added in latest commit</body>
|
|
1297
|
+
</comment>
|
|
1298
|
+
</comment_history>
|
|
1251
1299
|
</pull_request>
|
|
1252
1300
|
```
|
|
1253
1301
|
|
|
1302
|
+
#### Issue Context
|
|
1303
|
+
For issue events, Visor provides issue-specific context for intelligent assistance:
|
|
1304
|
+
|
|
1305
|
+
```xml
|
|
1306
|
+
<issue>
|
|
1307
|
+
<metadata>
|
|
1308
|
+
<number>456</number> <!-- Issue number -->
|
|
1309
|
+
<title>Feature request: Add dark mode</title> <!-- Issue title -->
|
|
1310
|
+
<author>user123</author> <!-- Issue author username -->
|
|
1311
|
+
<state>open</state> <!-- Issue state: open/closed -->
|
|
1312
|
+
<created_at>2024-01-15T10:30:00Z</created_at> <!-- When issue was created -->
|
|
1313
|
+
<updated_at>2024-01-16T14:20:00Z</updated_at> <!-- Last update timestamp -->
|
|
1314
|
+
<comments_count>5</comments_count> <!-- Total number of comments -->
|
|
1315
|
+
</metadata>
|
|
1316
|
+
|
|
1317
|
+
<description>
|
|
1318
|
+
<!-- Issue body/description text provided by the author -->
|
|
1319
|
+
I would like to request a dark mode feature for better accessibility...
|
|
1320
|
+
</description>
|
|
1321
|
+
|
|
1322
|
+
<labels>
|
|
1323
|
+
<!-- GitHub labels applied to categorize the issue -->
|
|
1324
|
+
<label>enhancement</label>
|
|
1325
|
+
<label>good first issue</label>
|
|
1326
|
+
<label>ui/ux</label>
|
|
1327
|
+
</labels>
|
|
1328
|
+
|
|
1329
|
+
<assignees>
|
|
1330
|
+
<!-- Users assigned to work on this issue -->
|
|
1331
|
+
<assignee>developer1</assignee>
|
|
1332
|
+
<assignee>developer2</assignee>
|
|
1333
|
+
</assignees>
|
|
1334
|
+
|
|
1335
|
+
<milestone>
|
|
1336
|
+
<!-- Project milestone this issue is part of (if any) -->
|
|
1337
|
+
<title>v2.0 Release</title>
|
|
1338
|
+
<state>open</state> <!-- Milestone state: open/closed -->
|
|
1339
|
+
<due_on>2024-03-01T00:00:00Z</due_on> <!-- Milestone due date -->
|
|
1340
|
+
</milestone>
|
|
1341
|
+
|
|
1342
|
+
<!-- Only present for issue_comment events -->
|
|
1343
|
+
<triggering_comment>
|
|
1344
|
+
<author>user456</author> <!-- User who posted the triggering comment -->
|
|
1345
|
+
<created_at>2024-01-16T15:30:00Z</created_at> <!-- When comment was posted -->
|
|
1346
|
+
<body>/review security --focus authentication</body> <!-- The comment text -->
|
|
1347
|
+
</triggering_comment>
|
|
1348
|
+
|
|
1349
|
+
<!-- Historical comments on the issue (excludes triggering comment) -->
|
|
1350
|
+
<comment_history>
|
|
1351
|
+
<comment index="1"> <!-- Comments ordered by creation time -->
|
|
1352
|
+
<author>developer1</author>
|
|
1353
|
+
<created_at>2024-01-15T11:00:00Z</created_at>
|
|
1354
|
+
<body>This is a great idea! I'll start working on it.</body>
|
|
1355
|
+
</comment>
|
|
1356
|
+
<comment index="2">
|
|
1357
|
+
<author>user123</author>
|
|
1358
|
+
<created_at>2024-01-15T14:30:00Z</created_at>
|
|
1359
|
+
<body>Thanks! Please consider accessibility standards.</body>
|
|
1360
|
+
</comment>
|
|
1361
|
+
</comment_history>
|
|
1362
|
+
</issue>
|
|
1363
|
+
```
|
|
1364
|
+
|
|
1254
1365
|
### Incremental Commit Analysis
|
|
1255
1366
|
When new commits are pushed to a PR, Visor performs incremental analysis:
|
|
1256
1367
|
- **Full Analysis**: Reviews the entire PR on initial creation
|
package/defaults/.visor.yaml
CHANGED
|
@@ -79,11 +79,7 @@ checks:
|
|
|
79
79
|
|
|
80
80
|
## Files Changed Analysis
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|------|------|--------|---------|--------|
|
|
84
|
-
{% for file in files %}
|
|
85
|
-
| `{{ file.filename }}` | {{ file.filename | split: "." | last | upcase }} | {{ file.status | capitalize }} | +{{ file.additions }}/-{{ file.deletions }} | {% if file.changes > 50 %}High{% elsif file.changes > 20 %}Medium{% else %}Low{% endif %} |
|
|
86
|
-
{% endfor %}
|
|
82
|
+
Analyze the files listed in the `<files_summary>` section, which provides a structured overview of all changes including filenames, status, additions, and deletions.
|
|
87
83
|
|
|
88
84
|
## Architecture & Impact Assessment
|
|
89
85
|
|
|
@@ -117,15 +113,11 @@ checks:
|
|
|
117
113
|
group: review
|
|
118
114
|
schema: code-review
|
|
119
115
|
prompt: |
|
|
120
|
-
Based on our overview discussion, please perform a comprehensive security analysis of the code changes
|
|
116
|
+
Based on our overview discussion, please perform a comprehensive security analysis of the code changes.
|
|
121
117
|
|
|
122
|
-
|
|
123
|
-
{% for file in files %}
|
|
124
|
-
- `{{ file.filename }}` - {{ file.status }}, +{{ file.additions }}/-{{ file.deletions }} ({{ file.changes }} total changes)
|
|
125
|
-
{% endfor %}
|
|
118
|
+
Analyze the files listed in the `<files_summary>` section and focus on the code changes shown in the diff sections.
|
|
126
119
|
|
|
127
|
-
##
|
|
128
|
-
Analyze the code for security vulnerabilities including:
|
|
120
|
+
## Security Analysis Areas
|
|
129
121
|
|
|
130
122
|
**Input Validation & Injection:**
|
|
131
123
|
- SQL injection in database queries
|
|
@@ -162,14 +154,11 @@ checks:
|
|
|
162
154
|
group: review
|
|
163
155
|
schema: code-review
|
|
164
156
|
prompt: |
|
|
165
|
-
Building on our overview and security analysis, now review the code changes for performance issues
|
|
157
|
+
Building on our overview and security analysis, now review the code changes for performance issues.
|
|
166
158
|
|
|
167
|
-
|
|
168
|
-
{% for file in files %}
|
|
169
|
-
- `{{ file.filename }}` ({{ file.changes }} changes, {{ file.status }})
|
|
170
|
-
{% endfor %}
|
|
159
|
+
Focus on the files listed in `<files_summary>` and analyze the code changes shown in the `<full_diff>` or `<commit_diff>` sections.
|
|
171
160
|
|
|
172
|
-
## Analysis Areas
|
|
161
|
+
## Performance Analysis Areas
|
|
173
162
|
**Algorithm & Data Structure Efficiency:**
|
|
174
163
|
- Time complexity analysis (O(n), O(n²), etc.)
|
|
175
164
|
- Space complexity and memory usage
|
|
@@ -204,7 +193,9 @@ checks:
|
|
|
204
193
|
group: review
|
|
205
194
|
schema: code-review
|
|
206
195
|
prompt: |
|
|
207
|
-
Building on our overview, security, and performance discussions, evaluate the code quality and maintainability
|
|
196
|
+
Building on our overview, security, and performance discussions, evaluate the code quality and maintainability.
|
|
197
|
+
|
|
198
|
+
Review the code changes shown in the `<full_diff>` or `<commit_diff>` sections, considering the files listed in `<files_summary>`.
|
|
208
199
|
|
|
209
200
|
## Quality Assessment Areas
|
|
210
201
|
**Code Structure & Design:**
|
|
@@ -278,12 +269,11 @@ checks:
|
|
|
278
269
|
{%- endif %}
|
|
279
270
|
|
|
280
271
|
## Repository Analysis Context
|
|
281
|
-
{%- if pr.title %}
|
|
282
|
-
**
|
|
272
|
+
{%- if event.isPullRequest and pr.title %}
|
|
273
|
+
**PR Context**: {{ pr.title }}
|
|
283
274
|
{%- endif %}
|
|
284
|
-
{%- if
|
|
285
|
-
**
|
|
286
|
-
**Technologies**: {% for ext in utils.filesByExtension %}{{ ext[0] }}{% unless forloop.last %}, {% endunless %}{% endfor %}
|
|
275
|
+
{%- if event.repository %}
|
|
276
|
+
**Repository**: {{ event.repository.fullName }}
|
|
287
277
|
{%- endif %}
|
|
288
278
|
|
|
289
279
|
## Instructions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/ai-review-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAe,MAAM,YAAY,CAAC;AAcxD,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,QAAQ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AAM,EAAE,CAAA;KAAE;IAgBnF;;OAEG;IACG,aAAa,IAAI,OAAO,CAC5B,KAAK,CAAC;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,OAAO,CAAC;QACnB,YAAY,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC,CACH;IAID;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAsDzB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAiCzB;;OAEG;IACH,OAAO,CAAC,cAAc;IAmBtB;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IASzC;;OAEG;IACG,yBAAyB,CAC7B,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,aAAa,EAC5B,MAAM,CAAC,EAAE,OAAO,gBAAgB,EAAE,WAAW,GAC5C,OAAO,CAAC,sBAAsB,EAAE,CAAC;IA8EpC;;OAEG;IACG,mBAAmB,IAAI,OAAO,CAAC;QACnC,eAAe,EAAE,OAAO,CAAC;QACzB,UAAU,EAAE,OAAO,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IAmBF;;OAEG;YACW,sBAAsB;IAiEpC;;OAEG;YACW,4BAA4B;IA4B1C;;OAEG;YACW,+BAA+B;IA2E7C;;OAEG;YACW,6BAA6B;IAyB3C;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IA6E3B;;OAEG;IACH,OAAO,CAAC,mBAAmB;CAa5B"}
|
|
@@ -79,11 +79,7 @@ checks:
|
|
|
79
79
|
|
|
80
80
|
## Files Changed Analysis
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|------|------|--------|---------|--------|
|
|
84
|
-
{% for file in files %}
|
|
85
|
-
| `{{ file.filename }}` | {{ file.filename | split: "." | last | upcase }} | {{ file.status | capitalize }} | +{{ file.additions }}/-{{ file.deletions }} | {% if file.changes > 50 %}High{% elsif file.changes > 20 %}Medium{% else %}Low{% endif %} |
|
|
86
|
-
{% endfor %}
|
|
82
|
+
Analyze the files listed in the `<files_summary>` section, which provides a structured overview of all changes including filenames, status, additions, and deletions.
|
|
87
83
|
|
|
88
84
|
## Architecture & Impact Assessment
|
|
89
85
|
|
|
@@ -117,15 +113,11 @@ checks:
|
|
|
117
113
|
group: review
|
|
118
114
|
schema: code-review
|
|
119
115
|
prompt: |
|
|
120
|
-
Based on our overview discussion, please perform a comprehensive security analysis of the code changes
|
|
116
|
+
Based on our overview discussion, please perform a comprehensive security analysis of the code changes.
|
|
121
117
|
|
|
122
|
-
|
|
123
|
-
{% for file in files %}
|
|
124
|
-
- `{{ file.filename }}` - {{ file.status }}, +{{ file.additions }}/-{{ file.deletions }} ({{ file.changes }} total changes)
|
|
125
|
-
{% endfor %}
|
|
118
|
+
Analyze the files listed in the `<files_summary>` section and focus on the code changes shown in the diff sections.
|
|
126
119
|
|
|
127
|
-
##
|
|
128
|
-
Analyze the code for security vulnerabilities including:
|
|
120
|
+
## Security Analysis Areas
|
|
129
121
|
|
|
130
122
|
**Input Validation & Injection:**
|
|
131
123
|
- SQL injection in database queries
|
|
@@ -162,14 +154,11 @@ checks:
|
|
|
162
154
|
group: review
|
|
163
155
|
schema: code-review
|
|
164
156
|
prompt: |
|
|
165
|
-
Building on our overview and security analysis, now review the code changes for performance issues
|
|
157
|
+
Building on our overview and security analysis, now review the code changes for performance issues.
|
|
166
158
|
|
|
167
|
-
|
|
168
|
-
{% for file in files %}
|
|
169
|
-
- `{{ file.filename }}` ({{ file.changes }} changes, {{ file.status }})
|
|
170
|
-
{% endfor %}
|
|
159
|
+
Focus on the files listed in `<files_summary>` and analyze the code changes shown in the `<full_diff>` or `<commit_diff>` sections.
|
|
171
160
|
|
|
172
|
-
## Analysis Areas
|
|
161
|
+
## Performance Analysis Areas
|
|
173
162
|
**Algorithm & Data Structure Efficiency:**
|
|
174
163
|
- Time complexity analysis (O(n), O(n²), etc.)
|
|
175
164
|
- Space complexity and memory usage
|
|
@@ -204,7 +193,9 @@ checks:
|
|
|
204
193
|
group: review
|
|
205
194
|
schema: code-review
|
|
206
195
|
prompt: |
|
|
207
|
-
Building on our overview, security, and performance discussions, evaluate the code quality and maintainability
|
|
196
|
+
Building on our overview, security, and performance discussions, evaluate the code quality and maintainability.
|
|
197
|
+
|
|
198
|
+
Review the code changes shown in the `<full_diff>` or `<commit_diff>` sections, considering the files listed in `<files_summary>`.
|
|
208
199
|
|
|
209
200
|
## Quality Assessment Areas
|
|
210
201
|
**Code Structure & Design:**
|
|
@@ -278,12 +269,11 @@ checks:
|
|
|
278
269
|
{%- endif %}
|
|
279
270
|
|
|
280
271
|
## Repository Analysis Context
|
|
281
|
-
{%- if pr.title %}
|
|
282
|
-
**
|
|
272
|
+
{%- if event.isPullRequest and pr.title %}
|
|
273
|
+
**PR Context**: {{ pr.title }}
|
|
283
274
|
{%- endif %}
|
|
284
|
-
{%- if
|
|
285
|
-
**
|
|
286
|
-
**Technologies**: {% for ext in utils.filesByExtension %}{{ ext[0] }}{% unless forloop.last %}, {% endunless %}{% endfor %}
|
|
275
|
+
{%- if event.repository %}
|
|
276
|
+
**Repository**: {{ event.repository.fullName }}
|
|
287
277
|
{%- endif %}
|
|
288
278
|
|
|
289
279
|
## Instructions
|
package/dist/index.js
CHANGED
|
@@ -80893,45 +80893,168 @@ class AIReviewService {
|
|
|
80893
80893
|
*/
|
|
80894
80894
|
async buildCustomPrompt(prInfo, customInstructions, _schema) {
|
|
80895
80895
|
const prContext = this.formatPRContext(prInfo);
|
|
80896
|
+
const isIssue = prInfo.isIssue === true;
|
|
80897
|
+
if (isIssue) {
|
|
80898
|
+
// Issue context - no code analysis needed
|
|
80899
|
+
return `<review_request>
|
|
80900
|
+
<instructions>
|
|
80901
|
+
${customInstructions}
|
|
80902
|
+
</instructions>
|
|
80903
|
+
|
|
80904
|
+
<context>
|
|
80905
|
+
${prContext}
|
|
80906
|
+
</context>
|
|
80907
|
+
|
|
80908
|
+
<rules>
|
|
80909
|
+
<rule>Understand the issue context and requirements from the XML data structure</rule>
|
|
80910
|
+
<rule>Provide helpful, actionable guidance based on the issue details</rule>
|
|
80911
|
+
<rule>Be constructive and supportive in your analysis</rule>
|
|
80912
|
+
<rule>Consider project conventions and patterns when making recommendations</rule>
|
|
80913
|
+
<rule>Suggest practical solutions or next steps that address the specific concern</rule>
|
|
80914
|
+
<rule>Focus on addressing the specific concern raised in the issue</rule>
|
|
80915
|
+
<rule>Reference relevant XML elements like metadata, description, labels, assignees when providing context</rule>
|
|
80916
|
+
</rules>
|
|
80917
|
+
</review_request>`;
|
|
80918
|
+
}
|
|
80919
|
+
// PR context - structured XML format
|
|
80896
80920
|
const analysisType = prInfo.isIncremental ? 'INCREMENTAL' : 'FULL';
|
|
80897
|
-
return
|
|
80921
|
+
return `<review_request>
|
|
80922
|
+
<analysis_type>${analysisType}</analysis_type>
|
|
80898
80923
|
|
|
80899
|
-
|
|
80900
|
-
${analysisType === 'INCREMENTAL'
|
|
80901
|
-
? '
|
|
80902
|
-
: '
|
|
80924
|
+
<analysis_focus>
|
|
80925
|
+
${analysisType === 'INCREMENTAL'
|
|
80926
|
+
? 'You are analyzing a NEW COMMIT added to an existing PR. Focus on the changes in the commit_diff section for this specific commit.'
|
|
80927
|
+
: 'You are analyzing the COMPLETE PR. Review all changes in the full_diff section.'}
|
|
80928
|
+
</analysis_focus>
|
|
80903
80929
|
|
|
80904
|
-
|
|
80930
|
+
<instructions>
|
|
80905
80931
|
${customInstructions}
|
|
80932
|
+
</instructions>
|
|
80906
80933
|
|
|
80907
|
-
|
|
80908
|
-
|
|
80934
|
+
<context>
|
|
80909
80935
|
${prContext}
|
|
80910
|
-
|
|
80911
|
-
|
|
80912
|
-
|
|
80913
|
-
|
|
80914
|
-
|
|
80915
|
-
|
|
80916
|
-
|
|
80917
|
-
|
|
80918
|
-
|
|
80919
|
-
|
|
80920
|
-
|
|
80921
|
-
|
|
80922
|
-
|
|
80923
|
-
4. Focus on real issues, not nitpicks
|
|
80924
|
-
5. Provide actionable, specific feedback
|
|
80925
|
-
6. For INCREMENTAL analysis, ONLY review changes in <commit_diff>
|
|
80926
|
-
7. For FULL analysis, review all changes in <full_diff>`;
|
|
80936
|
+
</context>
|
|
80937
|
+
|
|
80938
|
+
<rules>
|
|
80939
|
+
<rule>Only analyze code that appears with + (additions) or - (deletions) in the diff sections</rule>
|
|
80940
|
+
<rule>Ignore unchanged code unless directly relevant to understanding a change</rule>
|
|
80941
|
+
<rule>Line numbers in your response should match actual file line numbers from the diff</rule>
|
|
80942
|
+
<rule>Focus on real issues, not nitpicks or cosmetic concerns</rule>
|
|
80943
|
+
<rule>Provide actionable, specific feedback with clear remediation steps</rule>
|
|
80944
|
+
<rule>For INCREMENTAL analysis, ONLY review changes in commit_diff section</rule>
|
|
80945
|
+
<rule>For FULL analysis, review all changes in full_diff section</rule>
|
|
80946
|
+
<rule>Reference specific XML elements like files_summary, metadata when providing context</rule>
|
|
80947
|
+
</rules>
|
|
80948
|
+
</review_request>`;
|
|
80927
80949
|
}
|
|
80928
80950
|
// REMOVED: Built-in prompts - only use custom prompts from .visor.yaml
|
|
80929
80951
|
// REMOVED: getFocusInstructions - only use custom prompts from .visor.yaml
|
|
80930
80952
|
/**
|
|
80931
|
-
* Format PR context for the AI using XML structure
|
|
80953
|
+
* Format PR or Issue context for the AI using XML structure
|
|
80932
80954
|
*/
|
|
80933
80955
|
formatPRContext(prInfo) {
|
|
80956
|
+
// Check if this is an issue (not a PR)
|
|
80957
|
+
const isIssue = prInfo.isIssue === true;
|
|
80958
|
+
if (isIssue) {
|
|
80959
|
+
// Format as issue context
|
|
80960
|
+
let context = `<issue>
|
|
80961
|
+
<!-- Core issue metadata including identification, status, and timeline information -->
|
|
80962
|
+
<metadata>
|
|
80963
|
+
<number>${prInfo.number}</number>
|
|
80964
|
+
<title>${this.escapeXml(prInfo.title)}</title>
|
|
80965
|
+
<author>${prInfo.author}</author>
|
|
80966
|
+
<state>${prInfo.eventContext?.issue?.state || 'open'}</state>
|
|
80967
|
+
<created_at>${prInfo.eventContext?.issue?.created_at || ''}</created_at>
|
|
80968
|
+
<updated_at>${prInfo.eventContext?.issue?.updated_at || ''}</updated_at>
|
|
80969
|
+
<comments_count>${prInfo.eventContext?.issue?.comments || 0}</comments_count>
|
|
80970
|
+
</metadata>`;
|
|
80971
|
+
// Add issue body/description if available
|
|
80972
|
+
if (prInfo.body) {
|
|
80973
|
+
context += `
|
|
80974
|
+
<!-- Full issue description and body text provided by the issue author -->
|
|
80975
|
+
<description>
|
|
80976
|
+
${this.escapeXml(prInfo.body)}
|
|
80977
|
+
</description>`;
|
|
80978
|
+
}
|
|
80979
|
+
// Add labels if available
|
|
80980
|
+
const labels = prInfo.eventContext?.issue?.labels;
|
|
80981
|
+
if (labels && labels.length > 0) {
|
|
80982
|
+
context += `
|
|
80983
|
+
<!-- Applied labels for issue categorization and organization -->
|
|
80984
|
+
<labels>`;
|
|
80985
|
+
labels.forEach((label) => {
|
|
80986
|
+
context += `
|
|
80987
|
+
<label>${this.escapeXml(label.name || label)}</label>`;
|
|
80988
|
+
});
|
|
80989
|
+
context += `
|
|
80990
|
+
</labels>`;
|
|
80991
|
+
}
|
|
80992
|
+
// Add assignees if available
|
|
80993
|
+
const assignees = prInfo.eventContext?.issue?.assignees;
|
|
80994
|
+
if (assignees && assignees.length > 0) {
|
|
80995
|
+
context += `
|
|
80996
|
+
<!-- Users assigned to work on this issue -->
|
|
80997
|
+
<assignees>`;
|
|
80998
|
+
assignees.forEach((assignee) => {
|
|
80999
|
+
context += `
|
|
81000
|
+
<assignee>${this.escapeXml(assignee.login || assignee)}</assignee>`;
|
|
81001
|
+
});
|
|
81002
|
+
context += `
|
|
81003
|
+
</assignees>`;
|
|
81004
|
+
}
|
|
81005
|
+
// Add milestone if available
|
|
81006
|
+
const milestone = prInfo.eventContext?.issue?.milestone;
|
|
81007
|
+
if (milestone) {
|
|
81008
|
+
context += `
|
|
81009
|
+
<!-- Associated project milestone information -->
|
|
81010
|
+
<milestone>
|
|
81011
|
+
<title>${this.escapeXml(milestone.title || '')}</title>
|
|
81012
|
+
<state>${milestone.state || 'open'}</state>
|
|
81013
|
+
<due_on>${milestone.due_on || ''}</due_on>
|
|
81014
|
+
</milestone>`;
|
|
81015
|
+
}
|
|
81016
|
+
// Add current/triggering comment if this is a comment event
|
|
81017
|
+
const triggeringComment = prInfo.eventContext?.comment;
|
|
81018
|
+
if (triggeringComment) {
|
|
81019
|
+
context += `
|
|
81020
|
+
<!-- The comment that triggered this analysis -->
|
|
81021
|
+
<triggering_comment>
|
|
81022
|
+
<author>${this.escapeXml(triggeringComment.user?.login || 'unknown')}</author>
|
|
81023
|
+
<created_at>${triggeringComment.created_at || ''}</created_at>
|
|
81024
|
+
<body>${this.escapeXml(triggeringComment.body || '')}</body>
|
|
81025
|
+
</triggering_comment>`;
|
|
81026
|
+
}
|
|
81027
|
+
// Add comment history (excluding the current comment if it exists)
|
|
81028
|
+
const issueComments = prInfo.comments;
|
|
81029
|
+
if (issueComments && issueComments.length > 0) {
|
|
81030
|
+
// Filter out the triggering comment from history if present
|
|
81031
|
+
const historicalComments = triggeringComment
|
|
81032
|
+
? issueComments.filter((c) => c.id !== triggeringComment.id)
|
|
81033
|
+
: issueComments;
|
|
81034
|
+
if (historicalComments.length > 0) {
|
|
81035
|
+
context += `
|
|
81036
|
+
<!-- Previous comments in chronological order (excluding triggering comment) -->
|
|
81037
|
+
<comment_history>`;
|
|
81038
|
+
historicalComments.forEach((comment) => {
|
|
81039
|
+
context += `
|
|
81040
|
+
<comment>
|
|
81041
|
+
<author>${this.escapeXml(comment.author || 'unknown')}</author>
|
|
81042
|
+
<created_at>${comment.createdAt || ''}</created_at>
|
|
81043
|
+
<body>${this.escapeXml(comment.body || '')}</body>
|
|
81044
|
+
</comment>`;
|
|
81045
|
+
});
|
|
81046
|
+
context += `
|
|
81047
|
+
</comment_history>`;
|
|
81048
|
+
}
|
|
81049
|
+
}
|
|
81050
|
+
// Close the issue tag
|
|
81051
|
+
context += `
|
|
81052
|
+
</issue>`;
|
|
81053
|
+
return context;
|
|
81054
|
+
}
|
|
81055
|
+
// Original PR context formatting
|
|
80934
81056
|
let context = `<pull_request>
|
|
81057
|
+
<!-- Core pull request metadata including identification, branches, and change statistics -->
|
|
80935
81058
|
<metadata>
|
|
80936
81059
|
<number>${prInfo.number}</number>
|
|
80937
81060
|
<title>${this.escapeXml(prInfo.title)}</title>
|
|
@@ -80945,6 +81068,7 @@ IMPORTANT RULES:
|
|
|
80945
81068
|
// Add PR description if available
|
|
80946
81069
|
if (prInfo.body) {
|
|
80947
81070
|
context += `
|
|
81071
|
+
<!-- Full pull request description provided by the author -->
|
|
80948
81072
|
<description>
|
|
80949
81073
|
${this.escapeXml(prInfo.body)}
|
|
80950
81074
|
</description>`;
|
|
@@ -80952,6 +81076,7 @@ ${this.escapeXml(prInfo.body)}
|
|
|
80952
81076
|
// Add full diff if available (for complete PR review)
|
|
80953
81077
|
if (prInfo.fullDiff) {
|
|
80954
81078
|
context += `
|
|
81079
|
+
<!-- Complete unified diff showing all changes in the pull request -->
|
|
80955
81080
|
<full_diff>
|
|
80956
81081
|
${this.escapeXml(prInfo.fullDiff)}
|
|
80957
81082
|
</full_diff>`;
|
|
@@ -80960,14 +81085,15 @@ ${this.escapeXml(prInfo.fullDiff)}
|
|
|
80960
81085
|
if (prInfo.isIncremental) {
|
|
80961
81086
|
if (prInfo.commitDiff && prInfo.commitDiff.length > 0) {
|
|
80962
81087
|
context += `
|
|
81088
|
+
<!-- Diff of only the latest commit for incremental analysis -->
|
|
80963
81089
|
<commit_diff>
|
|
80964
81090
|
${this.escapeXml(prInfo.commitDiff)}
|
|
80965
81091
|
</commit_diff>`;
|
|
80966
81092
|
}
|
|
80967
81093
|
else {
|
|
80968
81094
|
context += `
|
|
81095
|
+
<!-- Commit diff could not be retrieved - falling back to full diff analysis -->
|
|
80969
81096
|
<commit_diff>
|
|
80970
|
-
<!-- Commit diff could not be retrieved - falling back to full diff analysis -->
|
|
80971
81097
|
${prInfo.fullDiff ? this.escapeXml(prInfo.fullDiff) : ''}
|
|
80972
81098
|
</commit_diff>`;
|
|
80973
81099
|
}
|
|
@@ -80975,10 +81101,11 @@ ${prInfo.fullDiff ? this.escapeXml(prInfo.fullDiff) : ''}
|
|
|
80975
81101
|
// Add file summary for context
|
|
80976
81102
|
if (prInfo.files.length > 0) {
|
|
80977
81103
|
context += `
|
|
81104
|
+
<!-- Summary of all files changed with statistics -->
|
|
80978
81105
|
<files_summary>`;
|
|
80979
|
-
prInfo.files.forEach(
|
|
81106
|
+
prInfo.files.forEach(file => {
|
|
80980
81107
|
context += `
|
|
80981
|
-
<file
|
|
81108
|
+
<file>
|
|
80982
81109
|
<filename>${this.escapeXml(file.filename)}</filename>
|
|
80983
81110
|
<status>${file.status}</status>
|
|
80984
81111
|
<additions>${file.additions}</additions>
|
|
@@ -80988,6 +81115,40 @@ ${prInfo.fullDiff ? this.escapeXml(prInfo.fullDiff) : ''}
|
|
|
80988
81115
|
context += `
|
|
80989
81116
|
</files_summary>`;
|
|
80990
81117
|
}
|
|
81118
|
+
// Add current/triggering comment if this is a comment event
|
|
81119
|
+
const triggeringComment = prInfo.eventContext?.comment;
|
|
81120
|
+
if (triggeringComment) {
|
|
81121
|
+
context += `
|
|
81122
|
+
<!-- The comment that triggered this analysis -->
|
|
81123
|
+
<triggering_comment>
|
|
81124
|
+
<author>${this.escapeXml(triggeringComment.user?.login || 'unknown')}</author>
|
|
81125
|
+
<created_at>${triggeringComment.created_at || ''}</created_at>
|
|
81126
|
+
<body>${this.escapeXml(triggeringComment.body || '')}</body>
|
|
81127
|
+
</triggering_comment>`;
|
|
81128
|
+
}
|
|
81129
|
+
// Add comment history (excluding the current comment if it exists)
|
|
81130
|
+
const prComments = prInfo.comments;
|
|
81131
|
+
if (prComments && prComments.length > 0) {
|
|
81132
|
+
// Filter out the triggering comment from history if present
|
|
81133
|
+
const historicalComments = triggeringComment
|
|
81134
|
+
? prComments.filter((c) => c.id !== triggeringComment.id)
|
|
81135
|
+
: prComments;
|
|
81136
|
+
if (historicalComments.length > 0) {
|
|
81137
|
+
context += `
|
|
81138
|
+
<!-- Previous PR comments in chronological order (excluding triggering comment) -->
|
|
81139
|
+
<comment_history>`;
|
|
81140
|
+
historicalComments.forEach((comment) => {
|
|
81141
|
+
context += `
|
|
81142
|
+
<comment>
|
|
81143
|
+
<author>${this.escapeXml(comment.author || 'unknown')}</author>
|
|
81144
|
+
<created_at>${comment.createdAt || ''}</created_at>
|
|
81145
|
+
<body>${this.escapeXml(comment.body || '')}</body>
|
|
81146
|
+
</comment>`;
|
|
81147
|
+
});
|
|
81148
|
+
context += `
|
|
81149
|
+
</comment_history>`;
|
|
81150
|
+
}
|
|
81151
|
+
}
|
|
80991
81152
|
context += `
|
|
80992
81153
|
</pull_request>`;
|
|
80993
81154
|
return context;
|
|
@@ -81778,6 +81939,7 @@ class CheckExecutionEngine {
|
|
|
81778
81939
|
const providerConfig = {
|
|
81779
81940
|
type: checks[0],
|
|
81780
81941
|
prompt: 'all',
|
|
81942
|
+
eventContext: prInfo.eventContext, // Pass event context for templates
|
|
81781
81943
|
ai: timeout ? { timeout } : undefined,
|
|
81782
81944
|
};
|
|
81783
81945
|
const result = await provider.execute(prInfo, providerConfig);
|
|
@@ -81812,6 +81974,7 @@ class CheckExecutionEngine {
|
|
|
81812
81974
|
type: 'ai',
|
|
81813
81975
|
prompt: focus,
|
|
81814
81976
|
focus: focus,
|
|
81977
|
+
eventContext: prInfo.eventContext, // Pass event context for templates
|
|
81815
81978
|
ai: timeout ? { timeout } : undefined,
|
|
81816
81979
|
// Inherit global AI provider and model settings if config is available
|
|
81817
81980
|
ai_provider: config?.ai_provider,
|
|
@@ -81899,6 +82062,7 @@ class CheckExecutionEngine {
|
|
|
81899
82062
|
focus: checkConfig.focus || this.mapCheckNameToFocus(checkName),
|
|
81900
82063
|
schema: checkConfig.schema,
|
|
81901
82064
|
group: checkConfig.group,
|
|
82065
|
+
eventContext: prInfo.eventContext, // Pass event context for templates
|
|
81902
82066
|
ai: {
|
|
81903
82067
|
timeout: timeout || 600000,
|
|
81904
82068
|
debug: debug,
|
|
@@ -82220,6 +82384,7 @@ class CheckExecutionEngine {
|
|
|
82220
82384
|
schema: checkConfig.schema,
|
|
82221
82385
|
group: checkConfig.group,
|
|
82222
82386
|
checkName: checkName, // Add checkName for sessionID
|
|
82387
|
+
eventContext: prInfo.eventContext, // Pass event context for templates
|
|
82223
82388
|
ai: {
|
|
82224
82389
|
timeout: timeout || 600000,
|
|
82225
82390
|
debug: debug,
|
|
@@ -82428,6 +82593,7 @@ class CheckExecutionEngine {
|
|
|
82428
82593
|
focus: checkConfig.focus || this.mapCheckNameToFocus(checkName),
|
|
82429
82594
|
schema: checkConfig.schema,
|
|
82430
82595
|
group: checkConfig.group,
|
|
82596
|
+
eventContext: prInfo.eventContext, // Pass event context for templates
|
|
82431
82597
|
ai: {
|
|
82432
82598
|
timeout: timeout || 600000,
|
|
82433
82599
|
debug: debug, // Pass debug flag to AI provider
|
|
@@ -82495,6 +82661,7 @@ class CheckExecutionEngine {
|
|
|
82495
82661
|
focus: checkConfig.focus || this.mapCheckNameToFocus(checkName),
|
|
82496
82662
|
schema: checkConfig.schema,
|
|
82497
82663
|
group: checkConfig.group,
|
|
82664
|
+
eventContext: prInfo.eventContext, // Pass event context for templates
|
|
82498
82665
|
ai: {
|
|
82499
82666
|
timeout: timeout || 600000,
|
|
82500
82667
|
...(checkConfig.ai || {}),
|
|
@@ -86340,7 +86507,21 @@ async function handleIssueEvent(octokit, owner, repo, context, inputs, config, c
|
|
|
86340
86507
|
totalAdditions: 0,
|
|
86341
86508
|
totalDeletions: 0,
|
|
86342
86509
|
eventType: mapGitHubEventToTrigger('issues', action),
|
|
86510
|
+
isIssue: true, // Flag to indicate this is an issue, not a PR
|
|
86511
|
+
eventContext: context.event, // Pass the full event context for templates
|
|
86343
86512
|
};
|
|
86513
|
+
// Fetch comment history for issues
|
|
86514
|
+
try {
|
|
86515
|
+
console.log(`💬 Fetching comment history for issue #${issue.number}`);
|
|
86516
|
+
const analyzer = new pr_analyzer_1.PRAnalyzer(octokit);
|
|
86517
|
+
const comments = await analyzer.fetchPRComments(owner, repo, issue.number);
|
|
86518
|
+
prInfo.comments = comments;
|
|
86519
|
+
console.log(`✅ Retrieved ${comments.length} comments for issue`);
|
|
86520
|
+
}
|
|
86521
|
+
catch (error) {
|
|
86522
|
+
console.warn(`⚠️ Could not fetch issue comments: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
86523
|
+
prInfo.comments = [];
|
|
86524
|
+
}
|
|
86344
86525
|
// Run the checks using CheckExecutionEngine
|
|
86345
86526
|
const { CheckExecutionEngine } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(80299)));
|
|
86346
86527
|
const engine = new CheckExecutionEngine();
|
|
@@ -86350,11 +86531,11 @@ async function handleIssueEvent(octokit, owner, repo, context, inputs, config, c
|
|
|
86350
86531
|
inputs.debug === 'true');
|
|
86351
86532
|
// Format and post results as a comment on the issue
|
|
86352
86533
|
if (Object.keys(result).length > 0) {
|
|
86353
|
-
let commentBody =
|
|
86534
|
+
let commentBody = '';
|
|
86535
|
+
// Directly use check content without adding extra headers
|
|
86354
86536
|
for (const checks of Object.values(result)) {
|
|
86355
86537
|
for (const check of checks) {
|
|
86356
86538
|
if (check.content && check.content.trim()) {
|
|
86357
|
-
commentBody += `### ${check.checkName}\n`;
|
|
86358
86539
|
commentBody += `${check.content}\n\n`;
|
|
86359
86540
|
}
|
|
86360
86541
|
}
|
|
@@ -86391,10 +86572,16 @@ async function handleIssueComment(octokit, owner, repo, context, inputs, actionC
|
|
|
86391
86572
|
return;
|
|
86392
86573
|
}
|
|
86393
86574
|
// Prevent recursion: skip if comment is from visor itself
|
|
86394
|
-
|
|
86575
|
+
// Check both comment author and content markers
|
|
86576
|
+
const isVisorBot = comment.user?.login === 'visor[bot]' ||
|
|
86577
|
+
comment.user?.login === 'github-actions[bot]' ||
|
|
86578
|
+
comment.user?.type === 'Bot';
|
|
86579
|
+
const hasVisorMarkers = comment.body &&
|
|
86395
86580
|
(comment.body.includes('<!-- visor-comment-id:') ||
|
|
86396
|
-
comment.body.includes('*Powered by [Visor]')
|
|
86397
|
-
|
|
86581
|
+
comment.body.includes('*Powered by [Visor](https://probelabs.com/visor)') ||
|
|
86582
|
+
comment.body.includes('*Powered by [Visor](https://github.com/probelabs/visor)'));
|
|
86583
|
+
if (isVisorBot || hasVisorMarkers) {
|
|
86584
|
+
console.log(`Skipping visor comment to prevent recursion. Author: ${comment.user?.login}, Type: ${comment.user?.type}, Has markers: ${hasVisorMarkers}`);
|
|
86398
86585
|
return;
|
|
86399
86586
|
}
|
|
86400
86587
|
// Process comments on both issues and PRs
|
|
@@ -86506,6 +86693,8 @@ async function handleIssueComment(octokit, owner, repo, context, inputs, actionC
|
|
|
86506
86693
|
if (isPullRequest) {
|
|
86507
86694
|
// It's a PR comment - fetch the PR diff
|
|
86508
86695
|
prInfo = await analyzer.fetchPRDiff(owner, repo, prNumber, undefined, 'issue_comment');
|
|
86696
|
+
// Add event context for templates and XML generation
|
|
86697
|
+
prInfo.eventContext = context.event;
|
|
86509
86698
|
}
|
|
86510
86699
|
else {
|
|
86511
86700
|
// It's an issue comment - create a minimal PRInfo structure for issue assistant
|
|
@@ -86520,8 +86709,21 @@ async function handleIssueComment(octokit, owner, repo, context, inputs, actionC
|
|
|
86520
86709
|
totalAdditions: 0,
|
|
86521
86710
|
totalDeletions: 0,
|
|
86522
86711
|
fullDiff: '',
|
|
86523
|
-
eventType: 'issue_comment'
|
|
86712
|
+
eventType: 'issue_comment',
|
|
86713
|
+
isIssue: true, // Flag to indicate this is an issue, not a PR
|
|
86714
|
+
eventContext: context.event, // Pass the full event context
|
|
86524
86715
|
};
|
|
86716
|
+
// Fetch comment history for the issue
|
|
86717
|
+
try {
|
|
86718
|
+
console.log(`💬 Fetching comment history for issue #${issue.number}`);
|
|
86719
|
+
const comments = await analyzer.fetchPRComments(owner, repo, issue.number);
|
|
86720
|
+
prInfo.comments = comments;
|
|
86721
|
+
console.log(`✅ Retrieved ${comments.length} comments for issue`);
|
|
86722
|
+
}
|
|
86723
|
+
catch (error) {
|
|
86724
|
+
console.warn(`⚠️ Could not fetch issue comments: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
86725
|
+
prInfo.comments = [];
|
|
86726
|
+
}
|
|
86525
86727
|
}
|
|
86526
86728
|
// Extract common arguments
|
|
86527
86729
|
const focus = command.args?.find(arg => arg.startsWith('--focus='))?.split('=')[1];
|
|
@@ -86601,6 +86803,8 @@ async function handlePullRequestWithConfig(octokit, owner, repo, inputs, config,
|
|
|
86601
86803
|
let prInfo;
|
|
86602
86804
|
try {
|
|
86603
86805
|
prInfo = await analyzer.fetchPRDiff(owner, repo, prNumber, undefined, eventType);
|
|
86806
|
+
// Add event context for templates and XML generation
|
|
86807
|
+
prInfo.eventContext = context.event;
|
|
86604
86808
|
}
|
|
86605
86809
|
catch (error) {
|
|
86606
86810
|
// Handle test scenarios with mock repos
|
|
@@ -87820,6 +88024,17 @@ class PRAnalyzer {
|
|
|
87820
88024
|
fullDiff: this.generateFullDiff(validFiles),
|
|
87821
88025
|
eventType,
|
|
87822
88026
|
};
|
|
88027
|
+
// Fetch comment history for better context
|
|
88028
|
+
try {
|
|
88029
|
+
console.log(`💬 Fetching comment history for PR #${prInfo.number}`);
|
|
88030
|
+
const comments = await this.fetchPRComments(owner, repo, prInfo.number);
|
|
88031
|
+
prInfo.comments = comments;
|
|
88032
|
+
console.log(`✅ Retrieved ${comments.length} comments`);
|
|
88033
|
+
}
|
|
88034
|
+
catch (error) {
|
|
88035
|
+
console.warn(`⚠️ Could not fetch comments: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
88036
|
+
prInfo.comments = [];
|
|
88037
|
+
}
|
|
87823
88038
|
// Add commit diff for incremental analysis
|
|
87824
88039
|
if (commitSha) {
|
|
87825
88040
|
console.log(`🔧 Fetching incremental diff for commit: ${commitSha}`);
|
|
@@ -88132,6 +88347,7 @@ class AICheckProvider extends check_provider_interface_1.CheckProvider {
|
|
|
88132
88347
|
? {
|
|
88133
88348
|
name: eventContext.event_name || 'unknown',
|
|
88134
88349
|
action: eventContext.action,
|
|
88350
|
+
isPullRequest: !prInfo.isIssue, // Set based on whether this is a PR or an issue
|
|
88135
88351
|
// Repository Info
|
|
88136
88352
|
repository: eventContext.repository
|
|
88137
88353
|
? {
|
|
@@ -110270,6 +110486,103 @@ ${decodedContent}
|
|
|
110270
110486
|
};
|
|
110271
110487
|
}
|
|
110272
110488
|
}
|
|
110489
|
+
let proactiveFixesApplied = false;
|
|
110490
|
+
const { diagrams: currentDiagrams } = extractMermaidFromMarkdown(fixedResponse);
|
|
110491
|
+
for (let diagramIndex = currentDiagrams.length - 1; diagramIndex >= 0; diagramIndex--) {
|
|
110492
|
+
const diagram = currentDiagrams[diagramIndex];
|
|
110493
|
+
const originalContent = diagram.content;
|
|
110494
|
+
const lines = originalContent.split("\n");
|
|
110495
|
+
let wasFixed = false;
|
|
110496
|
+
const fixedLines = lines.map((line) => {
|
|
110497
|
+
const trimmedLine = line.trim();
|
|
110498
|
+
let modifiedLine = line;
|
|
110499
|
+
if (trimmedLine.match(/\[[^\]]*\]/)) {
|
|
110500
|
+
modifiedLine = modifiedLine.replace(/\[([^\]]*)\]/g, (match, content) => {
|
|
110501
|
+
if (content.trim().startsWith('"') && content.trim().endsWith('"')) {
|
|
110502
|
+
return match;
|
|
110503
|
+
}
|
|
110504
|
+
const needsQuoting = /[()'"<>&]/.test(content) || // Core problematic characters
|
|
110505
|
+
content.includes("e.g.") || content.includes("i.e.") || content.includes("src/") || content.includes("defaults/") || content.includes(".ts") || content.includes(".js") || content.includes(".yaml") || content.includes(".json") || content.includes(".md") || content.includes(".html") || content.includes(".css");
|
|
110506
|
+
if (needsQuoting) {
|
|
110507
|
+
wasFixed = true;
|
|
110508
|
+
const safeContent = content.replace(/"/g, "'");
|
|
110509
|
+
return `["${safeContent}"]`;
|
|
110510
|
+
}
|
|
110511
|
+
return match;
|
|
110512
|
+
});
|
|
110513
|
+
}
|
|
110514
|
+
if (trimmedLine.match(/\{[^{}]*\}/)) {
|
|
110515
|
+
modifiedLine = modifiedLine.replace(/\{([^{}]*)\}/g, (match, content) => {
|
|
110516
|
+
if (content.trim().startsWith('"') && content.trim().endsWith('"')) {
|
|
110517
|
+
return match;
|
|
110518
|
+
}
|
|
110519
|
+
const needsQuoting = /[()'"<>&]/.test(content) || // Core problematic characters
|
|
110520
|
+
content.includes("e.g.") || content.includes("i.e.") || content.includes("src/") || content.includes("defaults/") || content.includes(".ts") || content.includes(".js") || content.includes(".yaml") || content.includes(".json") || content.includes(".md") || content.includes(".html") || content.includes(".css");
|
|
110521
|
+
if (needsQuoting) {
|
|
110522
|
+
wasFixed = true;
|
|
110523
|
+
const safeContent = content.replace(/"/g, "'");
|
|
110524
|
+
return `{"${safeContent}"}`;
|
|
110525
|
+
}
|
|
110526
|
+
return match;
|
|
110527
|
+
});
|
|
110528
|
+
}
|
|
110529
|
+
return modifiedLine;
|
|
110530
|
+
});
|
|
110531
|
+
if (wasFixed) {
|
|
110532
|
+
const fixedContent = fixedLines.join("\n");
|
|
110533
|
+
const attributesStr = diagram.attributes ? ` ${diagram.attributes}` : "";
|
|
110534
|
+
const newCodeBlock = `\`\`\`mermaid${attributesStr}
|
|
110535
|
+
${fixedContent}
|
|
110536
|
+
\`\`\``;
|
|
110537
|
+
fixedResponse = fixedResponse.slice(0, diagram.startIndex) + newCodeBlock + fixedResponse.slice(diagram.endIndex);
|
|
110538
|
+
fixingResults.push({
|
|
110539
|
+
diagramIndex,
|
|
110540
|
+
wasFixed: true,
|
|
110541
|
+
originalContent,
|
|
110542
|
+
fixedContent,
|
|
110543
|
+
originalError: "Proactive node label quoting",
|
|
110544
|
+
fixMethod: "node_label_quote_wrapping",
|
|
110545
|
+
fixedWithProactiveQuoting: true
|
|
110546
|
+
});
|
|
110547
|
+
proactiveFixesApplied = true;
|
|
110548
|
+
if (debug) {
|
|
110549
|
+
console.log(`[DEBUG] Mermaid validation: Proactively fixed diagram ${diagramIndex + 1} with node label quoting`);
|
|
110550
|
+
console.log(`[DEBUG] Mermaid validation: Applied automatic quoting to special characters`);
|
|
110551
|
+
}
|
|
110552
|
+
}
|
|
110553
|
+
}
|
|
110554
|
+
if (proactiveFixesApplied) {
|
|
110555
|
+
const revalidation = await validateMermaidResponse(fixedResponse);
|
|
110556
|
+
if (revalidation.isValid) {
|
|
110557
|
+
const totalTime2 = Date.now() - startTime;
|
|
110558
|
+
if (debug) {
|
|
110559
|
+
console.log(`[DEBUG] Mermaid validation: All diagrams fixed with proactive quoting in ${totalTime2}ms, no AI needed`);
|
|
110560
|
+
console.log(`[DEBUG] Mermaid validation: Applied ${fixingResults.length} proactive fixes`);
|
|
110561
|
+
}
|
|
110562
|
+
if (tracer) {
|
|
110563
|
+
tracer.recordMermaidValidationEvent("proactive_fix_completed", {
|
|
110564
|
+
"mermaid_validation.success": true,
|
|
110565
|
+
"mermaid_validation.fix_method": "node_label_quote_wrapping",
|
|
110566
|
+
"mermaid_validation.diagrams_fixed": fixingResults.length,
|
|
110567
|
+
"mermaid_validation.duration_ms": totalTime2
|
|
110568
|
+
});
|
|
110569
|
+
}
|
|
110570
|
+
return {
|
|
110571
|
+
...revalidation,
|
|
110572
|
+
wasFixed: true,
|
|
110573
|
+
originalResponse: response,
|
|
110574
|
+
fixedResponse,
|
|
110575
|
+
fixingResults,
|
|
110576
|
+
performanceMetrics: {
|
|
110577
|
+
totalTimeMs: totalTime2,
|
|
110578
|
+
aiFixingTimeMs: 0,
|
|
110579
|
+
finalValidationTimeMs: 0,
|
|
110580
|
+
diagramsProcessed: fixingResults.length,
|
|
110581
|
+
diagramsFixed: fixingResults.length
|
|
110582
|
+
}
|
|
110583
|
+
};
|
|
110584
|
+
}
|
|
110585
|
+
}
|
|
110273
110586
|
let subgraphFixesApplied = false;
|
|
110274
110587
|
const { diagrams: postHtmlDiagrams } = extractMermaidFromMarkdown(fixedResponse);
|
|
110275
110588
|
const postHtmlValidation = await validateMermaidResponse(fixedResponse);
|
|
@@ -110363,16 +110676,21 @@ ${fixedContent}
|
|
|
110363
110676
|
const postSubgraphValidation = await validateMermaidResponse(fixedResponse);
|
|
110364
110677
|
const stillInvalidAfterSubgraph = postSubgraphValidation.diagrams.map((result, index) => ({ ...result, originalIndex: index })).filter((result) => !result.isValid).reverse();
|
|
110365
110678
|
for (const invalidDiagram of stillInvalidAfterSubgraph) {
|
|
110366
|
-
if (invalidDiagram.error && (invalidDiagram.error.includes("Parentheses in node label") || invalidDiagram.error.includes("Complex expression in diamond node"))) {
|
|
110679
|
+
if (invalidDiagram.error && (invalidDiagram.error.includes("Parentheses in node label") || invalidDiagram.error.includes("Complex expression in diamond node") || invalidDiagram.error.includes("Single quotes in node label"))) {
|
|
110367
110680
|
const originalContent = invalidDiagram.content;
|
|
110368
110681
|
const lines = originalContent.split("\n");
|
|
110369
110682
|
let wasFixed = false;
|
|
110370
110683
|
const fixedLines = lines.map((line) => {
|
|
110371
110684
|
const trimmedLine = line.trim();
|
|
110372
110685
|
let modifiedLine = line;
|
|
110373
|
-
if (trimmedLine.match(/\[[^\]
|
|
110374
|
-
modifiedLine = modifiedLine.replace(/\[([^\]
|
|
110375
|
-
if (
|
|
110686
|
+
if (trimmedLine.match(/\[[^\]]*\]/)) {
|
|
110687
|
+
modifiedLine = modifiedLine.replace(/\[([^\]]*)\]/g, (match, content) => {
|
|
110688
|
+
if (content.trim().startsWith('"') && content.trim().endsWith('"')) {
|
|
110689
|
+
return match;
|
|
110690
|
+
}
|
|
110691
|
+
const needsQuoting = /[()'"<>&]/.test(content) || // Core problematic characters
|
|
110692
|
+
content.includes("e.g.") || content.includes("i.e.") || content.includes("src/") || content.includes("defaults/") || content.includes(".ts") || content.includes(".js") || content.includes(".yaml") || content.includes(".json");
|
|
110693
|
+
if (needsQuoting) {
|
|
110376
110694
|
wasFixed = true;
|
|
110377
110695
|
const safeContent = content.replace(/"/g, "'");
|
|
110378
110696
|
return `["${safeContent}"]`;
|
|
@@ -110380,9 +110698,14 @@ ${fixedContent}
|
|
|
110380
110698
|
return match;
|
|
110381
110699
|
});
|
|
110382
110700
|
}
|
|
110383
|
-
if (trimmedLine.match(/\{[^{}
|
|
110384
|
-
modifiedLine = modifiedLine.replace(/\{([^{}
|
|
110385
|
-
if (
|
|
110701
|
+
if (trimmedLine.match(/\{[^{}]*\}/)) {
|
|
110702
|
+
modifiedLine = modifiedLine.replace(/\{([^{}]*)\}/g, (match, content) => {
|
|
110703
|
+
if (content.trim().startsWith('"') && content.trim().endsWith('"')) {
|
|
110704
|
+
return match;
|
|
110705
|
+
}
|
|
110706
|
+
const needsQuoting = /[()'"<>&]/.test(content) || // Core problematic characters
|
|
110707
|
+
content.includes("e.g.") || content.includes("i.e.") || content.includes("src/") || content.includes("defaults/") || content.includes(".ts") || content.includes(".js") || content.includes(".yaml") || content.includes(".json");
|
|
110708
|
+
if (needsQuoting) {
|
|
110386
110709
|
wasFixed = true;
|
|
110387
110710
|
const safeContent = content.replace(/"/g, "'");
|
|
110388
110711
|
return `{"${safeContent}"}`;
|
|
@@ -110816,6 +111139,7 @@ var init_ProbeAgent = __esm({
|
|
|
110816
111139
|
* @param {boolean} [options.debug] - Enable debug mode
|
|
110817
111140
|
* @param {boolean} [options.outline] - Enable outline-xml format for search results
|
|
110818
111141
|
* @param {number} [options.maxResponseTokens] - Maximum tokens for AI responses
|
|
111142
|
+
* @param {boolean} [options.disableMermaidValidation=false] - Disable automatic mermaid diagram validation and fixing
|
|
110819
111143
|
*/
|
|
110820
111144
|
constructor(options = {}) {
|
|
110821
111145
|
this.sessionId = options.sessionId || (0, import_crypto5.randomUUID)();
|
|
@@ -110827,6 +111151,7 @@ var init_ProbeAgent = __esm({
|
|
|
110827
111151
|
this.tracer = options.tracer || null;
|
|
110828
111152
|
this.outline = !!options.outline;
|
|
110829
111153
|
this.maxResponseTokens = options.maxResponseTokens || parseInt(process.env.MAX_RESPONSE_TOKENS || "0", 10) || null;
|
|
111154
|
+
this.disableMermaidValidation = !!options.disableMermaidValidation;
|
|
110830
111155
|
this.allowedFolders = options.path ? [options.path] : [process.cwd()];
|
|
110831
111156
|
this.clientApiProvider = options.provider || null;
|
|
110832
111157
|
this.clientApiKey = null;
|
|
@@ -111520,56 +111845,60 @@ Convert your previous response content into actual JSON data that follows this s
|
|
|
111520
111845
|
_schemaFormatted: true
|
|
111521
111846
|
});
|
|
111522
111847
|
finalResult = cleanSchemaResponse(finalResult);
|
|
111523
|
-
|
|
111524
|
-
|
|
111525
|
-
console.log(`[DEBUG] Mermaid validation: Starting enhanced mermaid validation...`);
|
|
111526
|
-
}
|
|
111527
|
-
if (this.tracer) {
|
|
111528
|
-
this.tracer.recordMermaidValidationEvent("schema_processing_started", {
|
|
111529
|
-
"mermaid_validation.context": "schema_processing",
|
|
111530
|
-
"mermaid_validation.response_length": finalResult.length
|
|
111531
|
-
});
|
|
111532
|
-
}
|
|
111533
|
-
const mermaidValidation = await validateAndFixMermaidResponse(finalResult, {
|
|
111534
|
-
debug: this.debug,
|
|
111535
|
-
path: this.allowedFolders[0],
|
|
111536
|
-
provider: this.clientApiProvider,
|
|
111537
|
-
model: this.model,
|
|
111538
|
-
tracer: this.tracer
|
|
111539
|
-
});
|
|
111540
|
-
if (mermaidValidation.wasFixed) {
|
|
111541
|
-
finalResult = mermaidValidation.fixedResponse;
|
|
111848
|
+
if (!this.disableMermaidValidation) {
|
|
111849
|
+
try {
|
|
111542
111850
|
if (this.debug) {
|
|
111543
|
-
console.log(`[DEBUG] Mermaid validation:
|
|
111544
|
-
|
|
111545
|
-
|
|
111546
|
-
|
|
111547
|
-
|
|
111851
|
+
console.log(`[DEBUG] Mermaid validation: Starting enhanced mermaid validation...`);
|
|
111852
|
+
}
|
|
111853
|
+
if (this.tracer) {
|
|
111854
|
+
this.tracer.recordMermaidValidationEvent("schema_processing_started", {
|
|
111855
|
+
"mermaid_validation.context": "schema_processing",
|
|
111856
|
+
"mermaid_validation.response_length": finalResult.length
|
|
111857
|
+
});
|
|
111858
|
+
}
|
|
111859
|
+
const mermaidValidation = await validateAndFixMermaidResponse(finalResult, {
|
|
111860
|
+
debug: this.debug,
|
|
111861
|
+
path: this.allowedFolders[0],
|
|
111862
|
+
provider: this.clientApiProvider,
|
|
111863
|
+
model: this.model,
|
|
111864
|
+
tracer: this.tracer
|
|
111865
|
+
});
|
|
111866
|
+
if (mermaidValidation.wasFixed) {
|
|
111867
|
+
finalResult = mermaidValidation.fixedResponse;
|
|
111868
|
+
if (this.debug) {
|
|
111869
|
+
console.log(`[DEBUG] Mermaid validation: Diagrams successfully fixed`);
|
|
111870
|
+
if (mermaidValidation.performanceMetrics) {
|
|
111871
|
+
const metrics = mermaidValidation.performanceMetrics;
|
|
111872
|
+
console.log(`[DEBUG] Mermaid validation: Performance - total: ${metrics.totalTimeMs}ms, AI fixing: ${metrics.aiFixingTimeMs}ms`);
|
|
111873
|
+
console.log(`[DEBUG] Mermaid validation: Results - ${metrics.diagramsFixed}/${metrics.diagramsProcessed} diagrams fixed`);
|
|
111874
|
+
}
|
|
111875
|
+
if (mermaidValidation.fixingResults) {
|
|
111876
|
+
mermaidValidation.fixingResults.forEach((fixResult, index) => {
|
|
111877
|
+
if (fixResult.wasFixed) {
|
|
111878
|
+
const method = fixResult.fixedWithHtmlDecoding ? "HTML entity decoding" : "AI correction";
|
|
111879
|
+
const time = fixResult.aiFixingTimeMs ? ` in ${fixResult.aiFixingTimeMs}ms` : "";
|
|
111880
|
+
console.log(`[DEBUG] Mermaid validation: Fixed diagram ${fixResult.diagramIndex + 1} with ${method}${time}`);
|
|
111881
|
+
console.log(`[DEBUG] Mermaid validation: Original error: ${fixResult.originalError}`);
|
|
111882
|
+
} else {
|
|
111883
|
+
console.log(`[DEBUG] Mermaid validation: Failed to fix diagram ${fixResult.diagramIndex + 1}: ${fixResult.fixingError}`);
|
|
111884
|
+
}
|
|
111885
|
+
});
|
|
111886
|
+
}
|
|
111548
111887
|
}
|
|
111549
|
-
|
|
111550
|
-
|
|
111551
|
-
|
|
111552
|
-
|
|
111553
|
-
const time = fixResult.aiFixingTimeMs ? ` in ${fixResult.aiFixingTimeMs}ms` : "";
|
|
111554
|
-
console.log(`[DEBUG] Mermaid validation: Fixed diagram ${fixResult.diagramIndex + 1} with ${method}${time}`);
|
|
111555
|
-
console.log(`[DEBUG] Mermaid validation: Original error: ${fixResult.originalError}`);
|
|
111556
|
-
} else {
|
|
111557
|
-
console.log(`[DEBUG] Mermaid validation: Failed to fix diagram ${fixResult.diagramIndex + 1}: ${fixResult.fixingError}`);
|
|
111558
|
-
}
|
|
111559
|
-
});
|
|
111888
|
+
} else if (this.debug) {
|
|
111889
|
+
console.log(`[DEBUG] Mermaid validation: No fixes needed or fixes unsuccessful`);
|
|
111890
|
+
if (mermaidValidation.diagrams?.length > 0) {
|
|
111891
|
+
console.log(`[DEBUG] Mermaid validation: Found ${mermaidValidation.diagrams.length} diagrams, all valid: ${mermaidValidation.isValid}`);
|
|
111560
111892
|
}
|
|
111561
111893
|
}
|
|
111562
|
-
}
|
|
111563
|
-
|
|
111564
|
-
|
|
111565
|
-
console.log(`[DEBUG] Mermaid validation:
|
|
111894
|
+
} catch (error) {
|
|
111895
|
+
if (this.debug) {
|
|
111896
|
+
console.log(`[DEBUG] Mermaid validation: Process failed with error: ${error.message}`);
|
|
111897
|
+
console.log(`[DEBUG] Mermaid validation: Stack trace: ${error.stack}`);
|
|
111566
111898
|
}
|
|
111567
111899
|
}
|
|
111568
|
-
}
|
|
111569
|
-
|
|
111570
|
-
console.log(`[DEBUG] Mermaid validation: Process failed with error: ${error.message}`);
|
|
111571
|
-
console.log(`[DEBUG] Mermaid validation: Stack trace: ${error.stack}`);
|
|
111572
|
-
}
|
|
111900
|
+
} else if (this.debug) {
|
|
111901
|
+
console.log(`[DEBUG] Mermaid validation: Skipped due to disableMermaidValidation option`);
|
|
111573
111902
|
}
|
|
111574
111903
|
if (isJsonSchema(options.schema)) {
|
|
111575
111904
|
if (this.debug) {
|
|
@@ -111674,26 +112003,30 @@ Convert your previous response content into actual JSON data that follows this s
|
|
|
111674
112003
|
} else if (completionAttempted && options.schema) {
|
|
111675
112004
|
try {
|
|
111676
112005
|
finalResult = cleanSchemaResponse(finalResult);
|
|
111677
|
-
if (this.
|
|
111678
|
-
console.log(`[DEBUG] Mermaid validation: Validating attempt_completion result...`);
|
|
111679
|
-
}
|
|
111680
|
-
const mermaidValidation = await validateAndFixMermaidResponse(finalResult, {
|
|
111681
|
-
debug: this.debug,
|
|
111682
|
-
path: this.allowedFolders[0],
|
|
111683
|
-
provider: this.clientApiProvider,
|
|
111684
|
-
model: this.model,
|
|
111685
|
-
tracer: this.tracer
|
|
111686
|
-
});
|
|
111687
|
-
if (mermaidValidation.wasFixed) {
|
|
111688
|
-
finalResult = mermaidValidation.fixedResponse;
|
|
112006
|
+
if (!this.disableMermaidValidation) {
|
|
111689
112007
|
if (this.debug) {
|
|
111690
|
-
console.log(`[DEBUG] Mermaid validation: attempt_completion
|
|
111691
|
-
|
|
111692
|
-
|
|
112008
|
+
console.log(`[DEBUG] Mermaid validation: Validating attempt_completion result...`);
|
|
112009
|
+
}
|
|
112010
|
+
const mermaidValidation = await validateAndFixMermaidResponse(finalResult, {
|
|
112011
|
+
debug: this.debug,
|
|
112012
|
+
path: this.allowedFolders[0],
|
|
112013
|
+
provider: this.clientApiProvider,
|
|
112014
|
+
model: this.model,
|
|
112015
|
+
tracer: this.tracer
|
|
112016
|
+
});
|
|
112017
|
+
if (mermaidValidation.wasFixed) {
|
|
112018
|
+
finalResult = mermaidValidation.fixedResponse;
|
|
112019
|
+
if (this.debug) {
|
|
112020
|
+
console.log(`[DEBUG] Mermaid validation: attempt_completion diagrams fixed`);
|
|
112021
|
+
if (mermaidValidation.performanceMetrics) {
|
|
112022
|
+
console.log(`[DEBUG] Mermaid validation: Fixed in ${mermaidValidation.performanceMetrics.totalTimeMs}ms`);
|
|
112023
|
+
}
|
|
111693
112024
|
}
|
|
112025
|
+
} else if (this.debug) {
|
|
112026
|
+
console.log(`[DEBUG] Mermaid validation: attempt_completion result validation completed (no fixes needed)`);
|
|
111694
112027
|
}
|
|
111695
112028
|
} else if (this.debug) {
|
|
111696
|
-
console.log(`[DEBUG] Mermaid validation: attempt_completion result
|
|
112029
|
+
console.log(`[DEBUG] Mermaid validation: Skipped for attempt_completion result due to disableMermaidValidation option`);
|
|
111697
112030
|
}
|
|
111698
112031
|
if (isJsonSchema(options.schema)) {
|
|
111699
112032
|
if (this.debug) {
|
package/dist/pr-analyzer.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/pr-analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;CACtD;AAED,MAAM,WAAW,MAAM;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;CACtD;AAED,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IAC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,EAAE,YAAY,CAAC;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAQD,qBAAa,UAAU;IAEnB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,UAAU;gBADV,OAAO,EAAE,OAAO,EAChB,UAAU,GAAE,MAAU;IAGhC;;OAEG;IACG,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAwBtF;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAOlB,WAAW,CACf,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,OAAO,gBAAgB,EAAE,YAAY,GAChD,OAAO,CAAC,MAAM,CAAC;IAkHZ,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;;;;;;YAkBrD,SAAS;IAwCvB,OAAO,CAAC,gBAAgB;CAkBzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/ai-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO5C;;GAEG;AACH,qBAAa,eAAgB,SAAQ,aAAa;IAChD,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,YAAY,CAAS;;IAQ7B,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIlB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAoCvD;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAiB7B;;OAEG;YACW,aAAa;IAmB3B;;OAEG;YACW,UAAU;IAsExB;;OAEG;YACW,kBAAkB;IA0ChC;;OAEG;YACW,oBAAoB;
|
|
1
|
+
{"version":3,"file":"ai-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/ai-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO5C;;GAEG;AACH,qBAAa,eAAgB,SAAQ,aAAa;IAChD,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,YAAY,CAAS;;IAQ7B,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIlB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAoCvD;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAiB7B;;OAEG;YACW,aAAa;IAmB3B;;OAEG;YACW,UAAU;IAsExB;;OAEG;YACW,kBAAkB;IA0ChC;;OAEG;YACW,oBAAoB;IA+J5B,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,EAC/C,WAAW,CAAC,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,GACjE,OAAO,CAAC,aAAa,CAAC;YAiBX,iBAAiB;IAmH/B,sBAAsB,IAAI,MAAM,EAAE;IAiB5B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IASrC,eAAe,IAAI,MAAM,EAAE;CAO5B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@probelabs/visor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.34",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"bin": {
|
|
6
6
|
"visor": "./dist/index.js"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@octokit/auth-app": "^8.1.0",
|
|
67
67
|
"@octokit/core": "^7.0.3",
|
|
68
68
|
"@octokit/rest": "^22.0.0",
|
|
69
|
-
"@probelabs/probe": "^0.6.0-
|
|
69
|
+
"@probelabs/probe": "^0.6.0-rc86",
|
|
70
70
|
"@types/commander": "^2.12.0",
|
|
71
71
|
"@types/uuid": "^10.0.0",
|
|
72
72
|
"cli-table3": "^0.6.5",
|