helixmind 0.6.3 → 0.6.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.
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/chat.ts"],"names":[],"mappings":"AA4FA,UAAU,WAAW;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AA6ND,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA47HrE"}
1
+ {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/chat.ts"],"names":[],"mappings":"AA6FA,UAAU,WAAW;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AA6ND,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA47HrE"}
@@ -4,7 +4,8 @@ import { homedir } from 'node:os';
4
4
  import { join, basename } from 'node:path';
5
5
  import { writeFileSync } from 'node:fs';
6
6
  import { ConfigStore } from '../config/store.js';
7
- import { createProvider } from '../providers/registry.js';
7
+ import { createProvider, registerFreeModel } from '../providers/registry.js';
8
+ import { registerModelContextLength } from '../providers/model-limits.js';
8
9
  import { analyzeProject } from '../context/project.js';
9
10
  import { assembleSystemPrompt } from '../context/assembler.js';
10
11
  import { renderLogo, renderVersion } from '../ui/logo.js';
@@ -231,12 +232,12 @@ const HELP_TEXT = `
231
232
  ${chalk.hex('#00d4ff').bold(' Chat & Interaction')}
232
233
  ${theme.primary('/help'.padEnd(22))} ${theme.dim('Show this help')}
233
234
  ${theme.primary('/clear'.padEnd(22))} ${theme.dim('Clear conversation history')}
234
- ${theme.primary('/model [name]'.padEnd(22))} ${theme.dim('Switch model (interactive or direct: /model gpt-4o)')}
235
- ${theme.primary('/keys'.padEnd(22))} ${theme.dim('Add/remove/update API keys')}
236
- ${theme.primary('/fast [prompt]'.padEnd(22))} ${theme.dim('One fast turn: skip validation and auto-swarm')}
237
- ${theme.primary('/swarm [prompt]'.padEnd(22))} ${theme.dim('Force multi-agent swarm for one request')}
238
- ${theme.primary('/yolo [on|off]'.padEnd(22))} ${theme.dim('Toggle YOLO mode — auto-approve ALL operations')}
239
- ${theme.primary('/skip-permissions'.padEnd(22))} ${theme.dim('Toggle skip-permissions (auto-approve safe ops)')}
235
+ ${theme.primary('/model [name]'.padEnd(22))} ${theme.dim('Switch model (interactive or direct: /model gpt-4o)')}
236
+ ${theme.primary('/keys'.padEnd(22))} ${theme.dim('Add/remove/update API keys')}
237
+ ${theme.primary('/fast [prompt]'.padEnd(22))} ${theme.dim('One fast turn: skip validation and auto-swarm')}
238
+ ${theme.primary('/swarm [prompt]'.padEnd(22))} ${theme.dim('Force multi-agent swarm for one request')}
239
+ ${theme.primary('/yolo [on|off]'.padEnd(22))} ${theme.dim('Toggle YOLO mode — auto-approve ALL operations')}
240
+ ${theme.primary('/skip-permissions'.padEnd(22))} ${theme.dim('Toggle skip-permissions (auto-approve safe ops)')}
240
241
 
241
242
  ${chalk.hex('#00ff88').bold(' Spiral Memory')}
242
243
  ${theme.primary('/spiral'.padEnd(22))} ${theme.dim('Show spiral status (nodes per level)')}
@@ -269,14 +270,14 @@ ${chalk.hex('#00cc66').bold(' Validation Matrix')}
269
270
  ${theme.primary('/validation strict'.padEnd(22))} ${theme.dim('Treat warnings as errors')}
270
271
  ${theme.primary('/validation stats'.padEnd(22))} ${theme.dim('Show validation statistics')}
271
272
 
272
- ${chalk.hex('#8a2be2').bold(' Code & Git')}
273
- ${theme.primary('/undo [n|list]'.padEnd(22))} ${theme.dim('Undo last n file changes (or list history)')}
274
- ${theme.primary('/diff'.padEnd(22))} ${theme.dim('Show all uncommitted git changes')}
275
- ${theme.primary('/git'.padEnd(22))} ${theme.dim('Show git branch & status')}
276
- ${theme.primary('/worktree'.padEnd(22))} ${theme.dim('Show isolated worktree status')}
277
- ${theme.primary('/worktree auto'.padEnd(22))} ${theme.dim('Enable worktrees for risky agent runs')}
278
- ${theme.primary('/project'.padEnd(22))} ${theme.dim('Show detected project info')}
279
- ${theme.primary('/export [dir]'.padEnd(22))} ${theme.dim('Export spiral as ZIP archive')}
273
+ ${chalk.hex('#8a2be2').bold(' Code & Git')}
274
+ ${theme.primary('/undo [n|list]'.padEnd(22))} ${theme.dim('Undo last n file changes (or list history)')}
275
+ ${theme.primary('/diff'.padEnd(22))} ${theme.dim('Show all uncommitted git changes')}
276
+ ${theme.primary('/git'.padEnd(22))} ${theme.dim('Show git branch & status')}
277
+ ${theme.primary('/worktree'.padEnd(22))} ${theme.dim('Show isolated worktree status')}
278
+ ${theme.primary('/worktree auto'.padEnd(22))} ${theme.dim('Enable worktrees for risky agent runs')}
279
+ ${theme.primary('/project'.padEnd(22))} ${theme.dim('Show detected project info')}
280
+ ${theme.primary('/export [dir]'.padEnd(22))} ${theme.dim('Export spiral as ZIP archive')}
280
281
 
281
282
  ${chalk.hex('#6c757d').bold(' Navigation')}
282
283
  ${theme.primary('/exit /quit'.padEnd(22))} ${theme.dim('Exit HelixMind')}
@@ -4362,6 +4363,37 @@ async function handleSlashCommand(input, messages, agentHistory, config, spiralE
4362
4363
  break;
4363
4364
  case '/model': {
4364
4365
  const directModel = parts[1];
4366
+ // /model add <provider> <model> [contextLength] [--free]
4367
+ if (directModel === 'add') {
4368
+ const prov = parts[2];
4369
+ const modelName = parts[3];
4370
+ if (!prov || !modelName) {
4371
+ renderError('Usage: /model add <provider> <model> [contextLength] [--free]');
4372
+ break;
4373
+ }
4374
+ const ctxArg = parts[4] && !parts[4].startsWith('-') ? parseInt(parts[4], 10) : undefined;
4375
+ const isFree = parts.includes('--free');
4376
+ const meta = (ctxArg || isFree) ? { contextLength: ctxArg, free: isFree || undefined } : undefined;
4377
+ store.addModel(prov, modelName, meta);
4378
+ if (ctxArg)
4379
+ registerModelContextLength(modelName, ctxArg);
4380
+ if (isFree)
4381
+ registerFreeModel(modelName);
4382
+ renderInfo(`Model added: ${prov} / ${modelName}${ctxArg ? ` (${(ctxArg / 1000).toFixed(0)}K ctx)` : ''}${isFree ? ' [FREE]' : ''}`);
4383
+ break;
4384
+ }
4385
+ // /model remove <provider> <model>
4386
+ if (directModel === 'remove') {
4387
+ const prov = parts[2];
4388
+ const modelName = parts[3];
4389
+ if (!prov || !modelName) {
4390
+ renderError('Usage: /model remove <provider> <model>');
4391
+ break;
4392
+ }
4393
+ store.removeModel(prov, modelName);
4394
+ renderInfo(`Model removed: ${prov} / ${modelName}`);
4395
+ break;
4396
+ }
4365
4397
  if (directModel) {
4366
4398
  // Check if it looks like an Ollama model (contains ':' or is a known local model pattern)
4367
4399
  const isOllamaModel = directModel.includes(':') || directModel.match(/^(qwen|llama|deepseek|codellama|mistral|phi|gemma|starcoder)/i);