zidane 5.0.2 → 5.0.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.
@@ -4,7 +4,7 @@ import { r as normalizeMcpServers } from "./mcp-Dw-fRPVk.js";
4
4
  import { a as discoverSkills } from "./interpolate-Ck970-61.js";
5
5
  import { n as formatTokenUsage } from "./stats-DZIsGqzu.js";
6
6
  import { n as definePreset } from "./presets-BRFH2qsQ.js";
7
- import { i as anthropic, n as openai, r as cerebras, t as openrouter } from "./providers-CCDvIXGJ.js";
7
+ import { i as anthropic, n as openai, r as cerebras, t as openrouter } from "./providers-BCbdv99U.js";
8
8
  import { spawn } from "node:child_process";
9
9
  import { readdir, stat, writeFile } from "node:fs/promises";
10
10
  import { dirname, join, resolve, sep } from "node:path";
@@ -179,18 +179,37 @@ function modelsForDescriptor(descriptor) {
179
179
  }
180
180
  }
181
181
  /**
182
- * Look up the model's max context window via the descriptor's model source.
183
- * Returns `null` when the model isn't known (custom slugs, providers without
184
- * a registry); callers should hide the context indicator in that case.
182
+ * Resolve a single model's metadata via the descriptor's model source.
183
+ * Mirrors {@link modelsForDescriptor} routing: descriptor's own list wins,
184
+ * pi-ai's registry is the fallback. Returns `null` when the model isn't
185
+ * known.
185
186
  */
186
- function getContextWindow(descriptor, modelId) {
187
- if (descriptor.models) return descriptor.models.find((m) => m.id === modelId)?.contextWindow ?? null;
187
+ function getModelInfo(descriptor, modelId) {
188
+ if (descriptor.models) return descriptor.models.find((m) => m.id === modelId) ?? null;
188
189
  try {
189
- return getModel(piIdOf(descriptor), modelId)?.contextWindow ?? null;
190
+ return getModel(piIdOf(descriptor), modelId) ?? null;
190
191
  } catch {
191
192
  return null;
192
193
  }
193
194
  }
195
+ /**
196
+ * Look up the model's max context window via the descriptor's model source.
197
+ * Returns `null` when the model isn't known (custom slugs, providers without
198
+ * a registry); callers should hide the context indicator in that case.
199
+ */
200
+ function getContextWindow(descriptor, modelId) {
201
+ return getModelInfo(descriptor, modelId)?.contextWindow ?? null;
202
+ }
203
+ /**
204
+ * Whether the given model exposes a reasoning / extended-thinking knob.
205
+ * Drives the TUI's effort picker visibility — the `ctrl+n` shortcut and
206
+ * the bottom-bar `effortName` segment only surface when this is `true`.
207
+ * Returns `false` for unknown models (no registry entry → no advertised
208
+ * capability).
209
+ */
210
+ function modelSupportsReasoning(descriptor, modelId) {
211
+ return getModelInfo(descriptor, modelId)?.reasoning === true;
212
+ }
194
213
  //#endregion
195
214
  //#region src/chat/credentials.ts
196
215
  /** POSIX mode for the credentials file. Ignored on Windows. */
@@ -3582,6 +3601,6 @@ function countNeighbors(turnIds, turnId) {
3582
3601
  };
3583
3602
  }
3584
3603
  //#endregion
3585
- export { BUILTIN_THEMES as $, BUILTIN_AGENTS as $t, readProjects as A, applyInsert as At, cleanTitle as B, removeProviderCredential as Bt, useSafeModeQueue as C, findGitRoot$1 as Ct, isOnSafelist as D, FILES_TRIGGER as Dt, getSafelist as E, uniqueSkillNamesFromReferences as Et, supportsOAuth as F, detectAuth as Ft, shortId as G, cerebrasDescriptor as Gt, ageString as H, writeCredentials as Ht, buildMcpServers as I, applyApiKeyEnv as It, DEFAULT_SETTINGS as J, modelsForDescriptor as Jt, listProjectFiles as K, credKeyOf as Kt, defaultMcpsConfigPaths as L, credentialsPath as Lt, writeProjects as M, findActiveTrigger as Mt, splitPromptSegments as N, mergeReferences as Nt, matchesSafelistEntry as O, createFilesCompletionProvider as Ot, runOAuthLogin as P, useCompletion as Pt, useSettings as Q, BUILD_AGENT as Qt, discoverProjectMcps as R, readCredentials as Rt, useSafeModeActions as S, toolResultText as St, addToSafelist as T, createSkillsCompletionProvider as Tt, compactPath as U, BUILTIN_PROVIDERS as Ut, generateSessionTitle as V, setProviderCredential as Vt, fmtTokens as W, anthropicDescriptor as Wt, SETTINGS_TOGGLES as X, openrouterDescriptor as Xt, SETTINGS_CHOICES as Y, openaiDescriptor as Yt, SettingsProvider as Z, piIdOf as Zt, discoverProjectSkills as _, saveState as _t, ThemeProvider as a, CATPPUCCIN_LATTE as at, writeSessionExport as b, titleFromTurns as bt, useSurfaces as c, ConfigProvider as ct, finalizeStreamingMarkdown as d, createStateStore as dt, DEFAULT_AGENT_ID as en, DEFAULT_THEME as et, finalizeStreamingMarkdownForOwner as f, deriveSessionTitle as ft, defaultSkillScanPaths as g, loadState as gt, buildSkillsConfig as h, listSessionMeta as ht, turnAsText as i, CATPPUCCIN_FRAPPE as it, suggestSafelistEntry as j, collectReferences as jt, projectsFilePath as k, uniqueFilesFromReferences as kt, useSyntaxStyles as l, useConfig as lt, useStreamBuffer as m, lastContextSizeFromTurns as mt, deleteTurnSafely as n, resolveAgentId as nn, resolveTheme as nt, useColors as o, CATPPUCCIN_MACCHIATO as ot, turnContextSize as p, eventsFromTurns as pt, useEnabledToggleSet as q, getContextWindow as qt, truncateTurnsAt as r, singleAgentRegistry as rn, VAPORWAVE_THEME as rt, useSelectStyle as s, CATPPUCCIN_MOCHA as st, countNeighbors as t, PLAN_AGENT as tn, resolveChipColor as tt, useTheme as u, resolveConfig as ut, renderSession as v, selectableTurnIds as vt, IMPLICITLY_SAFE_TOOLS as w, SKILLS_TRIGGER as wt, SafeModeProvider as x, toolCallPreview as xt, resolveSessionExportTarget as y, stripSpawnTokensLine as yt, parseMcpsFile as z, readProviderCredential as zt };
3604
+ export { BUILTIN_THEMES as $, piIdOf as $t, readProjects as A, applyInsert as At, cleanTitle as B, removeProviderCredential as Bt, useSafeModeQueue as C, findGitRoot$1 as Ct, isOnSafelist as D, FILES_TRIGGER as Dt, getSafelist as E, uniqueSkillNamesFromReferences as Et, supportsOAuth as F, detectAuth as Ft, shortId as G, cerebrasDescriptor as Gt, ageString as H, writeCredentials as Ht, buildMcpServers as I, applyApiKeyEnv as It, DEFAULT_SETTINGS as J, getModelInfo as Jt, listProjectFiles as K, credKeyOf as Kt, defaultMcpsConfigPaths as L, credentialsPath as Lt, writeProjects as M, findActiveTrigger as Mt, splitPromptSegments as N, mergeReferences as Nt, matchesSafelistEntry as O, createFilesCompletionProvider as Ot, runOAuthLogin as P, useCompletion as Pt, useSettings as Q, openrouterDescriptor as Qt, discoverProjectMcps as R, readCredentials as Rt, useSafeModeActions as S, toolResultText as St, addToSafelist as T, createSkillsCompletionProvider as Tt, compactPath as U, BUILTIN_PROVIDERS as Ut, generateSessionTitle as V, setProviderCredential as Vt, fmtTokens as W, anthropicDescriptor as Wt, SETTINGS_TOGGLES as X, modelsForDescriptor as Xt, SETTINGS_CHOICES as Y, modelSupportsReasoning as Yt, SettingsProvider as Z, openaiDescriptor as Zt, discoverProjectSkills as _, saveState as _t, ThemeProvider as a, singleAgentRegistry as an, CATPPUCCIN_LATTE as at, writeSessionExport as b, titleFromTurns as bt, useSurfaces as c, ConfigProvider as ct, finalizeStreamingMarkdown as d, createStateStore as dt, BUILD_AGENT as en, DEFAULT_THEME as et, finalizeStreamingMarkdownForOwner as f, deriveSessionTitle as ft, defaultSkillScanPaths as g, loadState as gt, buildSkillsConfig as h, listSessionMeta as ht, turnAsText as i, resolveAgentId as in, CATPPUCCIN_FRAPPE as it, suggestSafelistEntry as j, collectReferences as jt, projectsFilePath as k, uniqueFilesFromReferences as kt, useSyntaxStyles as l, useConfig as lt, useStreamBuffer as m, lastContextSizeFromTurns as mt, deleteTurnSafely as n, DEFAULT_AGENT_ID as nn, resolveTheme as nt, useColors as o, CATPPUCCIN_MACCHIATO as ot, turnContextSize as p, eventsFromTurns as pt, useEnabledToggleSet as q, getContextWindow as qt, truncateTurnsAt as r, PLAN_AGENT as rn, VAPORWAVE_THEME as rt, useSelectStyle as s, CATPPUCCIN_MOCHA as st, countNeighbors as t, BUILTIN_AGENTS as tn, resolveChipColor as tt, useTheme as u, resolveConfig as ut, renderSession as v, selectableTurnIds as vt, IMPLICITLY_SAFE_TOOLS as w, SKILLS_TRIGGER as wt, SafeModeProvider as x, toolCallPreview as xt, resolveSessionExportTarget as y, stripSpawnTokensLine as yt, parseMcpsFile as z, readProviderCredential as zt };
3586
3605
 
3587
- //# sourceMappingURL=turn-operations-5aQu4dJg.js.map
3606
+ //# sourceMappingURL=turn-operations-BF3hMNgo.js.map