vigthoria-cli 1.6.27 → 1.6.28
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/commands/chat.js +5 -3
- package/dist/commands/edit.js +14 -1
- package/dist/utils/api.js +1 -1
- package/package.json +1 -1
package/dist/commands/chat.js
CHANGED
|
@@ -1002,13 +1002,15 @@ class ChatCommand {
|
|
|
1002
1002
|
if (toolCalls.length === 0) {
|
|
1003
1003
|
// Phase 5: Quality gate — if the agent tries to conclude on the first
|
|
1004
1004
|
// turn without any discovery, push it to gather evidence first.
|
|
1005
|
-
|
|
1005
|
+
// Applies to diagnostic prompts AND any direct-prompt agent call where
|
|
1006
|
+
// the model failed to invoke tools (prevents truncated output).
|
|
1007
|
+
if (turn === 0 && this.agentToolEvidence.discovery === 0 && (this.isDiagnosticPrompt(prompt) || this.directPromptMode)) {
|
|
1006
1008
|
this.messages.push({
|
|
1007
1009
|
role: 'system',
|
|
1008
1010
|
content: [
|
|
1009
1011
|
'Quality gate: you concluded without using any discovery tools (list_dir, glob, read_file, grep).',
|
|
1010
|
-
'
|
|
1011
|
-
'Use list_dir
|
|
1012
|
+
'You MUST use tools to gather concrete evidence before providing your answer.',
|
|
1013
|
+
'Use list_dir to explore the workspace, then read_file or grep to inspect relevant files.',
|
|
1012
1014
|
].join('\n'),
|
|
1013
1015
|
});
|
|
1014
1016
|
this.directToolContinuationCount += 1;
|
package/dist/commands/edit.js
CHANGED
|
@@ -216,7 +216,20 @@ Return the complete modified file content:`,
|
|
|
216
216
|
const len = lines.length;
|
|
217
217
|
if (len < 4)
|
|
218
218
|
return code;
|
|
219
|
-
//
|
|
219
|
+
// Pass 1: Remove adjacent duplicate non-empty lines (model stutter)
|
|
220
|
+
const deduped = [];
|
|
221
|
+
for (let i = 0; i < lines.length; i++) {
|
|
222
|
+
const trimmed = lines[i].trim();
|
|
223
|
+
const prevTrimmed = deduped.length > 0 ? deduped[deduped.length - 1].trim() : null;
|
|
224
|
+
if (trimmed && trimmed === prevTrimmed) {
|
|
225
|
+
continue; // skip consecutive duplicate
|
|
226
|
+
}
|
|
227
|
+
deduped.push(lines[i]);
|
|
228
|
+
}
|
|
229
|
+
if (deduped.length < lines.length) {
|
|
230
|
+
return deduped.join('\n');
|
|
231
|
+
}
|
|
232
|
+
// Pass 2: Check if the second half is a near-duplicate of the first half
|
|
220
233
|
for (let splitAt = Math.floor(len * 0.4); splitAt <= Math.ceil(len * 0.6); splitAt++) {
|
|
221
234
|
const firstHalf = lines.slice(0, splitAt);
|
|
222
235
|
const secondHalf = lines.slice(splitAt).filter(l => l.trim() !== '');
|
package/dist/utils/api.js
CHANGED
|
@@ -3589,7 +3589,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
3589
3589
|
if (fixType === 'bugs' || fixType === 'logic')
|
|
3590
3590
|
return issue.type === 'logic' || issue.severity === 'error';
|
|
3591
3591
|
if (fixType === 'syntax')
|
|
3592
|
-
return issue.severity === 'error';
|
|
3592
|
+
return issue.type !== 'logic' && issue.severity === 'error';
|
|
3593
3593
|
if (fixType === 'style')
|
|
3594
3594
|
return issue.type === 'style' || issue.type === 'quality';
|
|
3595
3595
|
if (fixType === 'security')
|