@taj-special/dravix-code 1.3.4 → 1.3.5

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 +15 -18
  2. package/package.json +1 -1
package/dist/cli/repl.js CHANGED
@@ -2351,20 +2351,8 @@ The summary should feel like a natural conversation close — informative, brief
2351
2351
  if (readFileContinue) {
2352
2352
  readFileContinue = false;
2353
2353
  readFileTurnCount++;
2354
- // Remind AI of the original user request show first + last line so pasted code
2355
- // doesn't eclipse the actual instruction written at the end.
2356
- const rawUserMsg = lastUserLine.trim();
2357
- const msgLines = rawUserMsg.split('\n').map(l => l.trim()).filter(Boolean);
2358
- let userReminder = '';
2359
- if (msgLines.length > 0) {
2360
- const first = msgLines[0].slice(0, 100);
2361
- const last = msgLines[msgLines.length - 1].slice(0, 150);
2362
- const display = msgLines.length <= 2 ? msgLines.join(' / ').slice(0, 200) : `${first} [...] ${last}`;
2363
- userReminder = `The user's request: "${display}". `;
2364
- }
2365
- const taskInstruction = userReminder
2366
- ? `The user's exact request was: "${rawUserMsg.slice(0, 300)}"\nNow execute THIS request and ONLY this request — nothing else. Do not invent, add, or change anything the user did not ask for. Use <edit_file> with targeted <find>/<replace> — never use <write_file> on existing files. Use the file content above to find the exact text and apply the change.`
2367
- : `Execute the user's request using the file content above. Use <edit_file> for existing files, <write_file> only for new files.`;
2354
+ // Keep auto-continue prompt SHORTlarge prompts time out DeepSeek reasoning model
2355
+ const taskInstruction = `Continue. All necessary file contents are above in context. Complete the task now — do NOT read more files. Output operations with <edit_file> or <run_command> tags.`;
2368
2356
  // Keep using FLASH_MODEL after file reads
2369
2357
  if (readFileTurnCount > 5 && !forcedEditMode) {
2370
2358
  forcedEditMode = true;
@@ -2479,11 +2467,13 @@ The summary should feel like a natural conversation close — informative, brief
2479
2467
  history.splice(1, history.length - 22);
2480
2468
  }
2481
2469
  // ── Auto-inject mentioned file contents ──────────────────────
2482
- // Files 3000 lines: full raw content injected — AI has exact text for <find>, no reads needed.
2470
+ // Reduced from 3000 keeps prompt small enough for DeepSeek reasoning model
2483
2471
  const FILE_PATTERN = /[\w\-.\/\\]+\.\w{2,5}/g;
2484
2472
  const mentioned = [...new Set(line.match(FILE_PATTERN) ?? [])];
2485
2473
  let fileContext = '';
2486
- const FULL_INJECT_LINES = 3000;
2474
+ const FULL_INJECT_LINES = 400;
2475
+ const MAX_INJECT_CHARS = 25000;
2476
+ let injectedChars = 0;
2487
2477
  for (const fname of mentioned) {
2488
2478
  const fullPath = path.resolve(activeCwd, fname);
2489
2479
  if (fs.existsSync(fullPath) && fs.statSync(fullPath).isFile()) {
@@ -2491,8 +2481,15 @@ The summary should feel like a natural conversation close — informative, brief
2491
2481
  const content = fs.readFileSync(fullPath, 'utf-8');
2492
2482
  const fileLines = content.split('\n');
2493
2483
  const lineCount = fileLines.length;
2494
- if (lineCount <= FULL_INJECT_LINES) {
2495
- fileContext += `\n\n[File: ${fname} — ${lineCount} lines — FULL]\n` + content;
2484
+ if (lineCount <= FULL_INJECT_LINES && injectedChars < MAX_INJECT_CHARS) {
2485
+ const toAdd = `\n\n[File: ${fname} — ${lineCount} lines — FULL]\n` + content;
2486
+ if (injectedChars + toAdd.length > MAX_INJECT_CHARS) {
2487
+ fileContext += `\n\n[File: ${fname} — ${lineCount} lines — skipped (prompt limit)]`;
2488
+ }
2489
+ else {
2490
+ fileContext += toAdd;
2491
+ injectedChars += toAdd.length;
2492
+ }
2496
2493
  }
2497
2494
  else {
2498
2495
  fileContext += `\n\n[File: ${fname} — ${lineCount} lines]\n` +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taj-special/dravix-code",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "AI-powered coding assistant CLI — Dravix Code",
5
5
  "type": "module",
6
6
  "bin": {