@ashx-j/lunr 0.2.4 → 0.2.7

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 (33) hide show
  1. package/dist/builtin-extensions/ashxj-thinking.d.ts.map +1 -1
  2. package/dist/builtin-extensions/ashxj-thinking.js +12 -11
  3. package/dist/builtin-extensions/ashxj-thinking.js.map +1 -1
  4. package/dist/builtin-extensions/ashxj-tui.d.ts +4 -0
  5. package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
  6. package/dist/builtin-extensions/ashxj-tui.js +53 -15
  7. package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
  8. package/dist/catalog/models.json +1 -1
  9. package/dist/catalog/providers/openrouter.json +1 -1
  10. package/dist/catalog/providers/xai.json +1 -1
  11. package/dist/catalog/publication.json +2 -2
  12. package/dist/core/agent-session.d.ts +4 -1
  13. package/dist/core/agent-session.d.ts.map +1 -1
  14. package/dist/core/agent-session.js +28 -6
  15. package/dist/core/agent-session.js.map +1 -1
  16. package/dist/core/catalog-merge.d.ts +1 -1
  17. package/dist/core/catalog-merge.d.ts.map +1 -1
  18. package/dist/core/catalog-merge.js +2 -1
  19. package/dist/core/catalog-merge.js.map +1 -1
  20. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  21. package/dist/modes/interactive/interactive-mode.js +1 -0
  22. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  23. package/dist/modes/interactive/theme/moon.json +1 -1
  24. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  25. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  26. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  27. package/examples/extensions/gondolin/package-lock.json +2 -2
  28. package/examples/extensions/gondolin/package.json +1 -1
  29. package/examples/extensions/sandbox/package-lock.json +2 -2
  30. package/examples/extensions/sandbox/package.json +1 -1
  31. package/examples/extensions/with-deps/package-lock.json +2 -2
  32. package/examples/extensions/with-deps/package.json +1 -1
  33. package/package.json +4 -4
@@ -73,8 +73,8 @@ function estimateMessagesTokens(messages) {
73
73
  // ============================================================================
74
74
  // Constants
75
75
  // ============================================================================
76
- /** Standard thinking levels */
77
- const THINKING_LEVELS = ["off", "minimal", "low", "medium", "high"];
76
+ /** Standard thinking levels (no-model fallback). Live models use getSupportedThinkingLevels. */
77
+ const THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
78
78
  // ============================================================================
79
79
  // AgentSession Class
80
80
  // ============================================================================
@@ -1405,12 +1405,34 @@ export class AgentSession {
1405
1405
  }
1406
1406
  /**
1407
1407
  * Get available thinking levels for current model.
1408
- * The provider will clamp to what the specific model supports internally.
1408
+ * Uses the registry row when /refresh has a newer copy than the session object.
1409
1409
  */
1410
1410
  getAvailableThinkingLevels() {
1411
- if (!this.model)
1411
+ const model = this.resolvedCatalogModel();
1412
+ if (!model)
1412
1413
  return THINKING_LEVELS;
1413
- return getSupportedThinkingLevels(this.model);
1414
+ return getSupportedThinkingLevels(model);
1415
+ }
1416
+ /** Replace the session model with the current registry copy after a catalog refresh. */
1417
+ refreshModelFromRegistry() {
1418
+ this._refreshCurrentModelFromRegistry();
1419
+ }
1420
+ resolvedCatalogModel() {
1421
+ const current = this.model;
1422
+ if (!current)
1423
+ return undefined;
1424
+ const registry = this._modelRuntime.getModel(current.provider, current.id);
1425
+ if (!registry || registry === current)
1426
+ return current;
1427
+ const thinkingLevelMap = current.thinkingLevelMap || registry.thinkingLevelMap
1428
+ ? { ...current.thinkingLevelMap, ...registry.thinkingLevelMap }
1429
+ : current.thinkingLevelMap;
1430
+ return {
1431
+ ...current,
1432
+ ...registry,
1433
+ compat: { ...current.compat, ...registry.compat },
1434
+ thinkingLevelMap,
1435
+ };
1414
1436
  }
1415
1437
  /**
1416
1438
  * Check if current model supports thinking/reasoning.
@@ -2059,7 +2081,7 @@ export class AgentSession {
2059
2081
  getThinkingLevel: () => this.thinkingLevel,
2060
2082
  setThinkingLevel: (level) => this.setThinkingLevel(level),
2061
2083
  }, {
2062
- getModel: () => this.model,
2084
+ getModel: () => this.resolvedCatalogModel(),
2063
2085
  isIdle: () => this.isIdle,
2064
2086
  isProjectTrusted: () => this.settingsManager.isProjectTrusted(),
2065
2087
  getSignal: () => this.agent.signal,