vigthoria-cli 1.10.50 → 1.10.51

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.
@@ -918,6 +918,30 @@ export class ChatCommand {
918
918
  spinner.text = 'Vigthoria Executor running...';
919
919
  return;
920
920
  }
921
+ if (event.type === 'model_call_start') {
922
+ if (spinner.isSpinning)
923
+ spinner.stop();
924
+ const model = this.sanitizeServerPath(String(event.model || 'model'));
925
+ const iter = event.iteration ? ` iteration ${event.iteration}` : '';
926
+ const msgCount = Number.isFinite(Number(event.message_count)) ? `, ${event.message_count} messages` : '';
927
+ const toolCount = Number.isFinite(Number(event.tool_count)) ? `, ${event.tool_count} tools available` : '';
928
+ process.stderr.write(chalk.cyan(' [Model] ') + `${model}${iter}: thinking${msgCount}${toolCount}\n`);
929
+ spinner.start();
930
+ spinner.text = `Model ${model} is reasoning...`;
931
+ return;
932
+ }
933
+ if (event.type === 'model_call_complete') {
934
+ if (spinner.isSpinning)
935
+ spinner.stop();
936
+ const model = this.sanitizeServerPath(String(event.model || 'model'));
937
+ const toolCalls = Number.isFinite(Number(event.tool_calls)) ? Number(event.tool_calls) : 0;
938
+ const chars = Number.isFinite(Number(event.content_chars)) ? Number(event.content_chars) : 0;
939
+ const finish = event.finish_reason ? `, ${this.sanitizeServerPath(String(event.finish_reason))}` : '';
940
+ process.stderr.write(chalk.cyan(' [Model] ') + `${model}: produced ${toolCalls} tool call${toolCalls === 1 ? '' : 's'}${chars ? `, ${chars} chars` : ''}${finish}\n`);
941
+ spinner.start();
942
+ spinner.text = toolCalls > 0 ? 'Executing model-selected tools...' : 'Processing model response...';
943
+ return;
944
+ }
921
945
  if (event.type === 'executor_error') {
922
946
  if (spinner.isSpinning)
923
947
  spinner.stop();
@@ -2245,7 +2269,13 @@ export class ChatCommand {
2245
2269
  return /^(ja|ja bitte|ja bitte mach das|mach das|bitte mach das|genau|ok|okay|yes|yes please|please do|do it|go ahead|continue|proceed|make it so)$/.test(normalized);
2246
2270
  }
2247
2271
  taskRequiresWorkspaceChanges(prompt) {
2248
- return /\b(build|create|make|implement|complete|fix|repair|edit|modify|write|generate|add|finish|scaffold|game|app|website|html5|frontend|component|feature)\b/i.test(prompt);
2272
+ const text = String(prompt || '').trim();
2273
+ const readOnlyIntent = /\b(analy[sz]e|analyse|analysis|audit|review|inspect|proof|understand|summari[sz]e|scan|read[\s-]?only|where we left|what is|how does|show me|tell me|identify\s+gaps?|gap\s+analysis|production\s+blockers?)\b/i.test(text);
2274
+ const explicitWriteIntent = /\b(build|create|make|implement|complete|fix|repair|edit|modify|write|generate|add|finish|scaffold|develop|update|change|refactor)\b/i.test(text);
2275
+ if (readOnlyIntent && !explicitWriteIntent) {
2276
+ return false;
2277
+ }
2278
+ return explicitWriteIntent && /\b(file|project|game|app|website|html5|frontend|component|feature|code|workspace|repo)\b/i.test(text);
2249
2279
  }
2250
2280
  getPreviousActionablePrompt() {
2251
2281
  if (this.lastActionableUserInput && !this.isConfirmationFollowUp(this.lastActionableUserInput)) {
@@ -2603,8 +2633,7 @@ export class ChatCommand {
2603
2633
  const executorSucceeded = !liveOutcome.executorFailed
2604
2634
  && !liveOutcome.plannerError
2605
2635
  && !liveOutcome.executorError
2606
- && workspaceHasOutput
2607
- && (!requiresWorkspaceChanges || changedFileCount > 0);
2636
+ && (requiresWorkspaceChanges ? (workspaceHasOutput && changedFileCount > 0) : true);
2608
2637
  if (!executorSucceeded && requiresWorkspaceChanges && changedFileCount === 0 && !liveOutcome.executorError) {
2609
2638
  liveOutcome.executorError = 'No workspace files were changed for a build/edit request.';
2610
2639
  }
@@ -2618,7 +2647,7 @@ export class ChatCommand {
2618
2647
  taskDisplay.fail(1, failDetail);
2619
2648
  }
2620
2649
  // ── Self-healing validation ──────────────────────────────────────
2621
- if (this.currentProjectPath && !this.jsonOutput && success && executorSucceeded) {
2650
+ if (this.currentProjectPath && !this.jsonOutput && success && executorSucceeded && requiresWorkspaceChanges) {
2622
2651
  try {
2623
2652
  taskDisplay.start(2, 'validating...');
2624
2653
  const healResult = await this.api.runSelfHealingCycle(executionPrompt, this.currentProjectPath, workspaceContext);
@@ -2651,6 +2680,11 @@ export class ChatCommand {
2651
2680
  selfHealStatus = 'failed';
2652
2681
  }
2653
2682
  }
2683
+ else if (!requiresWorkspaceChanges && executorSucceeded) {
2684
+ taskDisplay.complete(2);
2685
+ taskDisplay.skip(3);
2686
+ selfHealStatus = 'skipped';
2687
+ }
2654
2688
  else {
2655
2689
  taskDisplay.skip(2);
2656
2690
  taskDisplay.skip(3);
package/dist/utils/api.js CHANGED
@@ -1432,6 +1432,15 @@ export class APIClient {
1432
1432
  activeFile: resolvedContext.activeFile || null,
1433
1433
  history: resolvedContext.history || [],
1434
1434
  agentTaskType: resolvedContext.agentTaskType || 'general',
1435
+ rawPrompt: resolvedContext.rawPrompt || resolvedContext.prompt || '',
1436
+ contextualPrompt: resolvedContext.contextualPrompt || '',
1437
+ executionHints: {
1438
+ task_kind: resolvedContext.agentTaskType || 'general',
1439
+ requires_file_changes: resolvedContext.agentTaskType === 'analysis' || resolvedContext.agentTaskType === 'verification'
1440
+ ? false
1441
+ : undefined,
1442
+ classify_from: resolvedContext.rawPrompt || resolvedContext.prompt || '',
1443
+ },
1435
1444
  model: resolvedModel,
1436
1445
  requestedModel,
1437
1446
  requestedModelResolved: resolvedModel,
@@ -1568,6 +1577,15 @@ export class APIClient {
1568
1577
  activeFile: resolvedContext.activeFile || null,
1569
1578
  history: resolvedContext.history || [],
1570
1579
  agentTaskType: resolvedContext.agentTaskType || 'general',
1580
+ rawPrompt: resolvedContext.rawPrompt || resolvedContext.prompt || '',
1581
+ contextualPrompt: resolvedContext.contextualPrompt || '',
1582
+ executionHints: {
1583
+ task_kind: resolvedContext.agentTaskType || 'general',
1584
+ requires_file_changes: resolvedContext.agentTaskType === 'analysis' || resolvedContext.agentTaskType === 'verification'
1585
+ ? false
1586
+ : undefined,
1587
+ classify_from: resolvedContext.rawPrompt || resolvedContext.prompt || '',
1588
+ },
1571
1589
  executionSurface: resolvedContext.executionSurface || 'cli',
1572
1590
  clientSurface: resolvedContext.clientSurface || 'cli',
1573
1591
  localMachineCapable: resolvedContext.localMachineCapable !== false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vigthoria-cli",
3
- "version": "1.10.50",
3
+ "version": "1.10.51",
4
4
  "description": "Vigthoria Coder CLI - AI-powered terminal coding assistant",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",