@hncode/hncode 0.8.2 → 0.8.3

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/src/doctor.js CHANGED
@@ -23,6 +23,7 @@
23
23
  // "fixes" something is a diagnostic nobody can run on a machine they care about. The
24
24
  // only outbound work is an optional reachability probe, which the caller opts into.
25
25
 
26
+ import { uiText } from './i18n.js';
26
27
  import fs from 'node:fs';
27
28
  import os from 'node:os';
28
29
  import path from 'node:path';
@@ -58,7 +59,7 @@ function checkConfig(cfg, files) {
58
59
  'Run /model to choose one, or /provider add <name> <base-url>.'));
59
60
  }
60
61
  if (!cfg.model) {
61
- out.push(check('model', 'error', 'no model selected', 'Run /model.'));
62
+ out.push(check('model', 'error', 'no model selected', uiText('Run /model.')));
62
63
  }
63
64
  if (!cfg.apiKey) {
64
65
  // A local endpoint (ollama, llama.cpp, lmstudio) legitimately has no key.
@@ -196,7 +197,7 @@ function checkMcp(servers, connections) {
196
197
  for (const n of names) {
197
198
  const conn = byName.get(n);
198
199
  if (!conn) out.push(check(`MCP ${n}`, 'warn', 'configured but not started', 'Restart, or check the server command.'));
199
- else if (!conn.ok) out.push(check(`MCP ${n}`, 'error', `failed: ${conn.error}`, 'Fix the command/URL in /mcp-config.'));
200
+ else if (!conn.ok) out.push(check(`MCP ${n}`, 'error', `failed: ${conn.error}`, uiText('Fix the command/URL in /mcp-config.')));
200
201
  else out.push(check(`MCP ${n}`, 'ok', `${conn.toolCount} tool(s)`));
201
202
  }
202
203
  return out;
@@ -517,7 +518,7 @@ export function formatDoctor(results, opts = {}) {
517
518
  if (!n.error && !n.warn) {
518
519
  lines.push('', 'No problems found.');
519
520
  } else {
520
- lines.push('', 'Run /doctor --all to include the passing checks.');
521
+ lines.push('', uiText('Run /doctor --all to include the passing checks.'));
521
522
  }
522
523
  return lines;
523
524
  }