@taj-special/dravix-code 1.3.2 → 1.3.4

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.
Files changed (2) hide show
  1. package/dist/cli/repl.js +29 -33
  2. package/package.json +1 -1
package/dist/cli/repl.js CHANGED
@@ -2262,40 +2262,24 @@ Find files by glob pattern.
2262
2262
  - DO NOT output <write_file> / <edit_file> / <run_command> tags inside markdown code blocks — they must be raw in the response.
2263
2263
  - Execute ALL operations in ONE response when possible — do not split work across multiple turns.
2264
2264
 
2265
- ## After EVERY operation EXPLAIN what you did
2265
+ ## End-of-turn summaryREQUIRED after every task
2266
2266
 
2267
- When you complete file operations, ALWAYS provide a clear summary. This is NOT optional.
2267
+ After you finish ALL operations for the user's request, you MUST write a short, natural summary. This is the most important part of your response.
2268
2268
 
2269
- ### After creating/deleting/modifying files:
2270
- List EVERY file you touched and what happened to it:
2271
- - ✅ Created: path/to/newfile.ts — why you created it
2272
- - ✏️ Modified: path/to/file.ts — what you changed (old → new, or +added / -removed)
2273
- - ❌ Deleted: path/to/oldfile.ts — why you deleted it
2274
- - ▶️ Ran: command — what it output/succeeded
2269
+ Write 1-3 sentences in the user's language. No tables. No emoji lists. No rigid formats. Just explain what you did, like a colleague updating a teammate.
2275
2270
 
2276
- ### After reading/searching:
2277
- Summarize what you found in 1-3 bullet points. Don't just dump the output.
2271
+ Good examples:
2272
+ - "I deleted BOT_INFO.md from the project. No other changes were made."
2273
+ - "Updated main.ts — changed the port from 8000 to 9000. The API now listens on port 9000."
2274
+ - "Created three files: auth.ts, routes.ts, and models.ts. The basic API structure is ready."
2275
+ - "Fixed the import path in app.tsx and removed the unused variable in utils.ts."
2278
2276
 
2279
- ### Format example (GOOD):
2280
- \`\`\`
2281
- I updated the project:
2277
+ Bad examples:
2278
+ - Outputting operation tags with no human-readable text
2279
+ - Saying only "Done" or "Summary:" with a rigid table of emojis
2280
+ - Ending with nothing — just silence after the last XML tag
2282
2281
 
2283
- | Action | File | Detail |
2284
- |--------|------|--------|
2285
- | ✅ Created | utils/helper.ts | New helper function |
2286
- | ✏️ Modified | main.ts | Changed port from 8000 to 9000 |
2287
- | ❌ Deleted | old_code.py | No longer needed |
2288
-
2289
- done — the server now runs on port 9000
2290
- \`\`\`
2291
-
2292
- ### WRONG (what NOT to do):
2293
- - Just output operations with no human-readable text
2294
- - Say nothing after finishing
2295
- - Hide what you did behind tags only
2296
-
2297
- ### Summary rule:
2298
- After ALL operations, write 1-3 lines explaining the outcome in plain language. Be specific — mention file names, what changed, and why.`;
2282
+ The summary should feel like a natural conversation close — informative, brief, in the user's language.`;
2299
2283
  const buildSystemMsg = (dir) => ({
2300
2284
  role: 'system',
2301
2285
  content: SYSTEM_PROMPT + SAFE_FILE_RULES + '\n\nProject context:\n' + buildContext(dir),
@@ -3019,6 +3003,8 @@ After ALL operations, write 1-3 lines explaining the outcome in plain language.
3019
3003
  // Trailing newline — skip when read ops follow (they start on current line)
3020
3004
  if (hasRenderedContent && readOps.length === 0)
3021
3005
  process.stdout.write('\n');
3006
+ // Synchronisation flag: ops/else must wait for readOps to finish
3007
+ let readOpsDone = readOps.length === 0;
3022
3008
  // ── Handle read_file ops ──────────────────────────────
3023
3009
  // forcedEditMode: block further reads — AI must use existing context
3024
3010
  if (readOps.length > 0 && forcedEditMode) {
@@ -3029,6 +3015,7 @@ After ALL operations, write 1-3 lines explaining the outcome in plain language.
3029
3015
  readFileContinue = true;
3030
3016
  }
3031
3017
  else if (readOps.length > 0) {
3018
+ readOpsDone = false;
3032
3019
  // Absorb blank lines so reading block starts immediately after user message
3033
3020
  if (hasRenderedContent) {
3034
3021
  // Ensure cursor is on a new line, then absorb excess trailing blank lines
@@ -3206,18 +3193,22 @@ After ALL operations, write 1-3 lines explaining the outcome in plain language.
3206
3193
  }
3207
3194
  process.stdout.write(` ` + BC('╰' + '─'.repeat(boxW - 2) + '╯') + `\n`);
3208
3195
  readFileContinue = true;
3209
- resolve();
3196
+ readOpsDone = true;
3210
3197
  }
3211
3198
  catch (e) {
3212
3199
  logError('readOps', e);
3213
- resolve();
3200
+ readFileContinue = true;
3201
+ readOpsDone = true;
3214
3202
  }
3215
3203
  })();
3216
- return;
3217
3204
  } // end else if (readOps.length > 0)
3205
+ // Process write/run/mkdir/delete ops — waits for readOps to finish first
3218
3206
  if (ops.length > 0) {
3219
3207
  (async () => {
3220
3208
  try {
3209
+ // Wait for any pending read operations to finish
3210
+ while (!readOpsDone)
3211
+ await new Promise(r => setTimeout(r, 20));
3221
3212
  const skippedPaths = new Set();
3222
3213
  const runOutputs = [];
3223
3214
  const fileOpErrors = [];
@@ -3356,7 +3347,12 @@ After ALL operations, write 1-3 lines explaining the outcome in plain language.
3356
3347
  })();
3357
3348
  }
3358
3349
  else {
3359
- resolve();
3350
+ // No ops — just wait for readOps to finish, then resolve
3351
+ (async () => {
3352
+ while (!readOpsDone)
3353
+ await new Promise(r => setTimeout(r, 20));
3354
+ resolve();
3355
+ })();
3360
3356
  }
3361
3357
  }, (err) => {
3362
3358
  clearInterval(spinnerInterval);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taj-special/dravix-code",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "AI-powered coding assistant CLI — Dravix Code",
5
5
  "type": "module",
6
6
  "bin": {