vigthoria-cli 1.6.49 → 1.6.50
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 +13 -5
- package/package.json +2 -2
package/dist/commands/chat.js
CHANGED
|
@@ -1209,14 +1209,21 @@ class ChatCommand {
|
|
|
1209
1209
|
// tool-failure echoes, or premature resignation (the model gave up
|
|
1210
1210
|
// instead of retrying with list_dir to find the correct paths)
|
|
1211
1211
|
const gate2 = this.directPromptMode && turn < 6 && (isPolicyAck || isFollowUp || isEmptyAfterSanitize || isResignation);
|
|
1212
|
-
|
|
1212
|
+
// Gate 3: Model outputs code blocks as text instead of using write_file.
|
|
1213
|
+
// If the response contains ``` code fences but no write_file was called,
|
|
1214
|
+
// reject and instruct the model to use write_file.
|
|
1215
|
+
const hasCodeBlocks = (sanitized.match(/```/g) || []).length >= 2;
|
|
1216
|
+
const gate3 = hasCodeBlocks && this.agentToolEvidence.mutation === 0 && turn < 6;
|
|
1217
|
+
if (gate1 || gate2 || gate3) {
|
|
1213
1218
|
// Remove the useless response from history
|
|
1214
|
-
if (isPolicyAck || isFollowUp || isEmptyAfterSanitize || isResignation) {
|
|
1219
|
+
if (isPolicyAck || isFollowUp || isEmptyAfterSanitize || isResignation || gate3) {
|
|
1215
1220
|
this.messages.pop();
|
|
1216
1221
|
}
|
|
1217
|
-
const hint =
|
|
1218
|
-
? '
|
|
1219
|
-
:
|
|
1222
|
+
const hint = gate3
|
|
1223
|
+
? 'You output code as text instead of writing files. Use write_file to create each file on disk. Do NOT output code in markdown fences — call write_file for every file.'
|
|
1224
|
+
: isResignation
|
|
1225
|
+
? 'Files were not found at the guessed paths. Use list_dir to discover the correct directory structure, then read_file with the correct paths.'
|
|
1226
|
+
: `Start by running: list_dir on the project root, then read_file on files relevant to: ${prompt}`;
|
|
1220
1227
|
this.messages.push({
|
|
1221
1228
|
role: 'system',
|
|
1222
1229
|
content: [
|
|
@@ -1807,6 +1814,7 @@ class ChatCommand {
|
|
|
1807
1814
|
'Vigthoria CLI agent operating contract.',
|
|
1808
1815
|
`You are operating inside the project root: ${this.currentProjectPath}`,
|
|
1809
1816
|
'CRITICAL: Begin working on the user\'s task IMMEDIATELY. Your very first response MUST contain <tool_call> blocks to gather evidence. Do NOT acknowledge instructions, restate the task, describe your plan, or discuss tool policies. Act, do not talk.',
|
|
1817
|
+
'FILE CREATION RULE: When the user asks you to build, create, or generate files, you MUST use the write_file tool to actually create each file on disk. NEVER output code snippets as markdown text — always write them to files using write_file. If the task requires a new project, create a new directory first, then write all files into it.',
|
|
1810
1818
|
'Stay inside that project unless the user explicitly asks otherwise.',
|
|
1811
1819
|
'Read files before editing or rewriting them.',
|
|
1812
1820
|
'When the user asks to inspect a folder or find the right file, verify with tools before concluding.',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vigthoria-cli",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.50",
|
|
4
4
|
"description": "Vigthoria Coder CLI - AI-powered terminal coding assistant",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -86,4 +86,4 @@
|
|
|
86
86
|
"engines": {
|
|
87
87
|
"node": ">=18.0.0"
|
|
88
88
|
}
|
|
89
|
-
}
|
|
89
|
+
}
|