@cofy-x/dsh-console 0.1.0-alpha.3 → 0.1.0-alpha.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.
@@ -849,7 +849,7 @@ function getSettingsSchema() {
849
849
  function isPlainObject(item) {
850
850
  return !!item && typeof item === "object" && !Array.isArray(item);
851
851
  }
852
- function mergeRecursively(target, source, getMergeStrategyForPath2, path16 = []) {
852
+ function mergeRecursively(target, source, getMergeStrategyForPath2, path15 = []) {
853
853
  for (const key of Object.keys(source)) {
854
854
  if (key === "__proto__") {
855
855
  continue;
@@ -858,7 +858,7 @@ function mergeRecursively(target, source, getMergeStrategyForPath2, path16 = [])
858
858
  if (srcValue === void 0) {
859
859
  continue;
860
860
  }
861
- const newPath = [...path16, key];
861
+ const newPath = [...path15, key];
862
862
  const objValue = target[key];
863
863
  const mergeStrategy = getMergeStrategyForPath2(newPath);
864
864
  if (mergeStrategy === "shallow_merge" /* SHALLOW_MERGE */ && objValue && srcValue) {
@@ -1189,11 +1189,11 @@ function formatValidationError(error, filePath) {
1189
1189
  const MAX_ERRORS_TO_DISPLAY = 5;
1190
1190
  const displayedIssues = error.issues.slice(0, MAX_ERRORS_TO_DISPLAY);
1191
1191
  for (const issue of displayedIssues) {
1192
- const path16 = issue.path.reduce(
1192
+ const path15 = issue.path.reduce(
1193
1193
  (acc, curr) => typeof curr === "number" ? `${acc}[${curr}]` : `${acc ? acc + "." : ""}${curr}`,
1194
1194
  ""
1195
1195
  );
1196
- lines.push(`Error in: ${path16 || "(root)"}`);
1196
+ lines.push(`Error in: ${path15 || "(root)"}`);
1197
1197
  lines.push(` ${issue.message}`);
1198
1198
  if (issue.code === "invalid_type") {
1199
1199
  const expected = issue.expected;
@@ -1275,11 +1275,11 @@ function resolveEnvVarsInObjectInternal(obj, visited, customEnv) {
1275
1275
  var USER_SETTINGS_PATH = Storage.getGlobalSettingsPath();
1276
1276
  var USER_SETTINGS_DIR = path.dirname(USER_SETTINGS_PATH);
1277
1277
  var DEFAULT_EXCLUDED_ENV_VARS = ["DEBUG", "DEBUG_MODE"];
1278
- function getMergeStrategyForPath(path16) {
1278
+ function getMergeStrategyForPath(path15) {
1279
1279
  let current = void 0;
1280
1280
  let currentSchema = getSettingsSchema();
1281
1281
  let parent = void 0;
1282
- for (const key of path16) {
1282
+ for (const key of path15) {
1283
1283
  if (!currentSchema || !currentSchema[key]) {
1284
1284
  if (parent?.additionalProperties?.mergeStrategy) {
1285
1285
  return parent.additionalProperties.mergeStrategy;
@@ -1337,8 +1337,8 @@ function mergeSettings(system, systemDefaults, user, workspace, isTrusted) {
1337
1337
  system
1338
1338
  );
1339
1339
  }
1340
- function setNestedProperty(obj, path16, value) {
1341
- const keys = path16.split(".");
1340
+ function setNestedProperty(obj, path15, value) {
1341
+ const keys = path15.split(".");
1342
1342
  const lastKey = keys.pop();
1343
1343
  if (!lastKey) return;
1344
1344
  let current = obj;
@@ -4587,7 +4587,7 @@ var ToolResultDisplay = ({
4587
4587
  ] });
4588
4588
  case "search-paths":
4589
4589
  return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
4590
- resultDisplay2.paths.map((path16) => /* @__PURE__ */ jsx18(Text15, { children: path16 }, path16)),
4590
+ resultDisplay2.paths.map((path15) => /* @__PURE__ */ jsx18(Text15, { children: path15 }, path15)),
4591
4591
  resultDisplay2.truncated && /* @__PURE__ */ jsxs15(Text15, { dimColor: true, children: [
4592
4592
  "Showing ",
4593
4593
  String(resultDisplay2.paths.length),
@@ -6039,7 +6039,7 @@ import { Box as Box25 } from "ink";
6039
6039
  import { Box as Box21, Text as Text20 } from "ink";
6040
6040
 
6041
6041
  // src/generated/git-commit.ts
6042
- var GIT_COMMIT_INFO = "9ea1647";
6042
+ var GIT_COMMIT_INFO = "1318436";
6043
6043
 
6044
6044
  // src/ui/components/dialogs/about-box.tsx
6045
6045
  import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
@@ -6180,24 +6180,81 @@ var getStatusColor = (value, thresholds, options = {}) => {
6180
6180
  // src/ui/state/session-stats.ts
6181
6181
  var computeSessionStats = (metrics) => {
6182
6182
  const { models, tools } = metrics;
6183
+ const totalUncachedInputTokens = Object.values(models).reduce(
6184
+ (acc, model) => acc + model.tokens.inputTokens,
6185
+ 0
6186
+ );
6183
6187
  const totalCacheReadTokens = Object.values(models).reduce(
6184
6188
  (acc, model) => acc + model.tokens.cacheReadTokens,
6185
6189
  0
6186
6190
  );
6191
+ const totalCacheWriteTokens = Object.values(models).reduce(
6192
+ (acc, model) => acc + model.tokens.cacheWriteTokens,
6193
+ 0
6194
+ );
6187
6195
  const totalPromptTokens = Object.values(models).reduce(
6188
6196
  (acc, model) => acc + model.tokens.inputTokens + model.tokens.cacheReadTokens + model.tokens.cacheWriteTokens,
6189
6197
  0
6190
6198
  );
6199
+ const totalOutputTokens = Object.values(models).reduce(
6200
+ (acc, model) => acc + model.tokens.outputTokens,
6201
+ 0
6202
+ );
6203
+ const totalReasoningTokens = Object.values(models).reduce(
6204
+ (acc, model) => acc + model.tokens.reasoningTokens,
6205
+ 0
6206
+ );
6207
+ const totalSessionTokens = Object.values(models).reduce(
6208
+ (acc, model) => acc + model.tokens.totalTokens,
6209
+ 0
6210
+ );
6191
6211
  const cacheEfficiency = totalPromptTokens > 0 ? totalCacheReadTokens / totalPromptTokens * 100 : 0;
6192
6212
  const successRate = tools.totalCalls > 0 ? tools.totalSuccess / tools.totalCalls * 100 : 0;
6193
6213
  return {
6194
6214
  cacheEfficiency,
6195
6215
  successRate,
6216
+ totalUncachedInputTokens,
6196
6217
  totalCacheReadTokens,
6197
- totalPromptTokens
6218
+ totalCacheWriteTokens,
6219
+ totalPromptTokens,
6220
+ totalOutputTokens,
6221
+ totalReasoningTokens,
6222
+ totalSessionTokens
6198
6223
  };
6199
6224
  };
6200
6225
 
6226
+ // src/ui/hooks/terminal/use-terminal-size.ts
6227
+ import { useEffect as useEffect11, useState as useState9 } from "react";
6228
+ function useTerminalSize() {
6229
+ const [size, setSize] = useState9({
6230
+ columns: process.stdout.columns || 60,
6231
+ rows: process.stdout.rows || 20
6232
+ });
6233
+ useEffect11(() => {
6234
+ function updateSize() {
6235
+ setSize({
6236
+ columns: process.stdout.columns || 60,
6237
+ rows: process.stdout.rows || 20
6238
+ });
6239
+ }
6240
+ process.stdout.on("resize", updateSize);
6241
+ return () => {
6242
+ process.stdout.off("resize", updateSize);
6243
+ };
6244
+ }, []);
6245
+ return size;
6246
+ }
6247
+
6248
+ // src/ui/utils/format-token-count.ts
6249
+ function formatTokenCount(tokens) {
6250
+ if (tokens < 1e3) return String(tokens);
6251
+ const divisor = tokens < 1e6 ? 1e3 : 1e6;
6252
+ const suffix = divisor === 1e3 ? "k" : "m";
6253
+ const value = tokens / divisor;
6254
+ const fractionDigits = value < 100 && !Number.isInteger(value) ? 1 : 0;
6255
+ return `${value.toFixed(fractionDigits)}${suffix}`;
6256
+ }
6257
+
6201
6258
  // src/ui/components/stats/stats-display.tsx
6202
6259
  import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
6203
6260
  var StatRow = ({
@@ -6207,56 +6264,86 @@ var StatRow = ({
6207
6264
  /* @__PURE__ */ jsx30(Box22, { width: 22, children: /* @__PURE__ */ jsx30(Text22, { color: theme.text.link, children: title }) }),
6208
6265
  children
6209
6266
  ] });
6210
- var ModelUsageTable = ({ models, cacheEfficiency, totalCacheReadTokens }) => {
6267
+ var ModelUsageTable = ({ models, compact }) => {
6211
6268
  const rows = Object.entries(models);
6212
6269
  if (rows.length === 0) return null;
6213
- const cacheColor = getStatusColor(cacheEfficiency, {
6214
- green: CACHE_EFFICIENCY_HIGH,
6215
- yellow: CACHE_EFFICIENCY_MEDIUM
6216
- });
6270
+ if (compact) {
6271
+ return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", marginTop: 1, children: [
6272
+ /* @__PURE__ */ jsx30(Box22, { marginBottom: 1, children: /* @__PURE__ */ jsx30(Text22, { bold: true, color: theme.text.accent, children: "Model Usage" }) }),
6273
+ rows.map(([name2, metrics], index) => {
6274
+ const promptTokens = metrics.tokens.inputTokens + metrics.tokens.cacheReadTokens + metrics.tokens.cacheWriteTokens;
6275
+ const totalTokens = metrics.tokens.totalTokens;
6276
+ return /* @__PURE__ */ jsxs22(
6277
+ Box22,
6278
+ {
6279
+ flexDirection: "column",
6280
+ marginTop: index === 0 ? 0 : 1,
6281
+ children: [
6282
+ /* @__PURE__ */ jsx30(Text22, { bold: true, color: theme.text.primary, wrap: "wrap", children: name2 }),
6283
+ /* @__PURE__ */ jsx30(StatRow, { title: "Requests:", children: /* @__PURE__ */ jsx30(Text22, { children: metrics.requests }) }),
6284
+ /* @__PURE__ */ jsx30(StatRow, { title: "Input:", children: /* @__PURE__ */ jsx30(Text22, { children: metrics.tokens.inputTokens.toLocaleString() }) }),
6285
+ /* @__PURE__ */ jsx30(StatRow, { title: "Cache Read:", children: /* @__PURE__ */ jsx30(Text22, { children: metrics.tokens.cacheReadTokens.toLocaleString() }) }),
6286
+ /* @__PURE__ */ jsx30(StatRow, { title: "Cache Write:", children: /* @__PURE__ */ jsx30(Text22, { children: metrics.tokens.cacheWriteTokens.toLocaleString() }) }),
6287
+ /* @__PURE__ */ jsx30(StatRow, { title: "Prompt Total:", children: /* @__PURE__ */ jsx30(Text22, { children: promptTokens.toLocaleString() }) }),
6288
+ /* @__PURE__ */ jsx30(StatRow, { title: "Output:", children: /* @__PURE__ */ jsx30(Text22, { children: metrics.tokens.outputTokens.toLocaleString() }) }),
6289
+ /* @__PURE__ */ jsx30(StatRow, { title: "Reasoning:", children: /* @__PURE__ */ jsx30(Text22, { color: theme.text.accent, children: metrics.tokens.reasoningTokens.toLocaleString() }) }),
6290
+ /* @__PURE__ */ jsx30(StatRow, { title: "Total:", children: /* @__PURE__ */ jsx30(Text22, { bold: true, children: totalTokens.toLocaleString() }) })
6291
+ ]
6292
+ },
6293
+ name2
6294
+ );
6295
+ }),
6296
+ /* @__PURE__ */ jsx30(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text22, { color: theme.text.secondary, children: "Reasoning tokens are included in Output." }) })
6297
+ ] });
6298
+ }
6217
6299
  return /* @__PURE__ */ jsxs22(Box22, { flexDirection: "column", marginTop: 1, children: [
6218
- /* @__PURE__ */ jsx30(Text22, { bold: true, color: theme.text.primary, children: "Model Usage" }),
6300
+ /* @__PURE__ */ jsx30(Box22, { marginBottom: 1, children: /* @__PURE__ */ jsx30(Text22, { bold: true, color: theme.text.accent, children: "Model Usage" }) }),
6219
6301
  /* @__PURE__ */ jsxs22(Box22, { children: [
6220
- /* @__PURE__ */ jsx30(Box22, { width: 25, children: /* @__PURE__ */ jsx30(Text22, { bold: true, children: "Model" }) }),
6221
- /* @__PURE__ */ jsx30(Box22, { width: 7, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { bold: true, children: "Reqs" }) }),
6222
- /* @__PURE__ */ jsx30(Box22, { width: 12, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { bold: true, children: "Input" }) }),
6223
- /* @__PURE__ */ jsx30(Box22, { width: 15, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { bold: true, children: "Cache R/W" }) }),
6224
- /* @__PURE__ */ jsx30(Box22, { width: 12, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { bold: true, children: "Output" }) }),
6225
- /* @__PURE__ */ jsx30(Box22, { width: 12, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { bold: true, children: "Reasoning" }) })
6302
+ /* @__PURE__ */ jsx30(Box22, { width: 23, children: /* @__PURE__ */ jsx30(Text22, { bold: true, color: theme.text.link, children: "Model" }) }),
6303
+ /* @__PURE__ */ jsx30(Box22, { width: 9, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { bold: true, color: theme.text.link, children: "Requests" }) }),
6304
+ /* @__PURE__ */ jsx30(Box22, { width: 10, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { bold: true, color: theme.text.link, children: "Input" }) }),
6305
+ /* @__PURE__ */ jsx30(Box22, { width: 12, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { bold: true, color: theme.text.link, children: "Cache Read" }) }),
6306
+ /* @__PURE__ */ jsx30(Box22, { width: 13, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { bold: true, color: theme.text.link, children: "Cache Write" }) }),
6307
+ /* @__PURE__ */ jsx30(Box22, { width: 10, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { bold: true, color: theme.text.link, children: "Prompt" }) }),
6308
+ /* @__PURE__ */ jsx30(Box22, { width: 10, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { bold: true, color: theme.text.link, children: "Output" }) }),
6309
+ /* @__PURE__ */ jsx30(Box22, { width: 11, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { bold: true, color: theme.text.link, children: "Reasoning" }) }),
6310
+ /* @__PURE__ */ jsx30(Box22, { width: 10, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { bold: true, color: theme.text.link, children: "Total" }) })
6226
6311
  ] }),
6227
- rows.map(([name2, metrics]) => /* @__PURE__ */ jsxs22(Box22, { children: [
6228
- /* @__PURE__ */ jsx30(Box22, { width: 25, children: /* @__PURE__ */ jsx30(Text22, { wrap: "truncate-end", children: name2 }) }),
6229
- /* @__PURE__ */ jsx30(Box22, { width: 7, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { children: metrics.requests }) }),
6230
- /* @__PURE__ */ jsx30(Box22, { width: 12, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { children: metrics.tokens.inputTokens.toLocaleString() }) }),
6231
- /* @__PURE__ */ jsx30(Box22, { width: 15, justifyContent: "flex-end", children: /* @__PURE__ */ jsxs22(Text22, { children: [
6232
- metrics.tokens.cacheReadTokens.toLocaleString(),
6233
- " / ",
6234
- metrics.tokens.cacheWriteTokens.toLocaleString()
6235
- ] }) }),
6236
- /* @__PURE__ */ jsx30(Box22, { width: 12, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { children: metrics.tokens.outputTokens.toLocaleString() }) }),
6237
- /* @__PURE__ */ jsx30(Box22, { width: 12, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { children: metrics.tokens.reasoningTokens.toLocaleString() }) })
6238
- ] }, name2)),
6239
- totalCacheReadTokens > 0 && /* @__PURE__ */ jsx30(Box22, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text22, { color: theme.text.secondary, children: [
6240
- "Cache reads: ",
6241
- totalCacheReadTokens.toLocaleString(),
6242
- " tokens (",
6243
- " ",
6244
- /* @__PURE__ */ jsxs22(Text22, { color: cacheColor, children: [
6245
- cacheEfficiency.toFixed(1),
6246
- "%"
6247
- ] }),
6248
- " of prompt tokens)"
6249
- ] }) })
6312
+ rows.map(([name2, metrics]) => {
6313
+ const promptTokens = metrics.tokens.inputTokens + metrics.tokens.cacheReadTokens + metrics.tokens.cacheWriteTokens;
6314
+ const totalTokens = metrics.tokens.totalTokens;
6315
+ return /* @__PURE__ */ jsxs22(Box22, { children: [
6316
+ /* @__PURE__ */ jsx30(Box22, { width: 23, children: /* @__PURE__ */ jsx30(Text22, { bold: true, color: theme.text.primary, wrap: "truncate-end", children: name2 }) }),
6317
+ /* @__PURE__ */ jsx30(Box22, { width: 9, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { children: metrics.requests }) }),
6318
+ /* @__PURE__ */ jsx30(Box22, { width: 10, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { children: metrics.tokens.inputTokens.toLocaleString() }) }),
6319
+ /* @__PURE__ */ jsx30(Box22, { width: 12, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { children: metrics.tokens.cacheReadTokens.toLocaleString() }) }),
6320
+ /* @__PURE__ */ jsx30(Box22, { width: 13, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { children: metrics.tokens.cacheWriteTokens.toLocaleString() }) }),
6321
+ /* @__PURE__ */ jsx30(Box22, { width: 10, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { children: promptTokens.toLocaleString() }) }),
6322
+ /* @__PURE__ */ jsx30(Box22, { width: 10, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { children: metrics.tokens.outputTokens.toLocaleString() }) }),
6323
+ /* @__PURE__ */ jsx30(Box22, { width: 11, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { color: theme.text.accent, children: metrics.tokens.reasoningTokens.toLocaleString() }) }),
6324
+ /* @__PURE__ */ jsx30(Box22, { width: 10, justifyContent: "flex-end", children: /* @__PURE__ */ jsx30(Text22, { bold: true, children: totalTokens.toLocaleString() }) })
6325
+ ] }, name2);
6326
+ }),
6327
+ /* @__PURE__ */ jsx30(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text22, { color: theme.text.secondary, children: "Reasoning tokens are included in Output." }) })
6250
6328
  ] });
6251
6329
  };
6252
6330
  var StatsDisplay = ({ duration, title }) => {
6253
6331
  const { stats } = useSessionStats();
6332
+ const { columns } = useTerminalSize();
6254
6333
  const { models, tools } = stats.metrics;
6255
6334
  const computed = computeSessionStats(stats.metrics);
6256
6335
  const successColor = getStatusColor(computed.successRate, {
6257
6336
  green: TOOL_SUCCESS_RATE_HIGH,
6258
6337
  yellow: TOOL_SUCCESS_RATE_MEDIUM
6259
6338
  });
6339
+ const cacheColor = getStatusColor(computed.cacheEfficiency, {
6340
+ green: CACHE_EFFICIENCY_HIGH,
6341
+ yellow: CACHE_EFFICIENCY_MEDIUM
6342
+ });
6343
+ const validContextWindow = stats.contextWindow !== void 0 && stats.contextWindow > 0 ? stats.contextWindow : void 0;
6344
+ const showLatestPrompt = stats.lastPromptTokenCount > 0 || validContextWindow !== void 0;
6345
+ const contextPercent = validContextWindow === void 0 ? void 0 : Math.round(stats.lastPromptTokenCount / validContextWindow * 100);
6346
+ const latestPrompt = `${formatTokenCount(stats.lastPromptTokenCount)}/${validContextWindow === void 0 ? "?" : formatTokenCount(validContextWindow)}${contextPercent === void 0 ? "" : ` (${contextPercent}%)`}`;
6260
6347
  return /* @__PURE__ */ jsxs22(
6261
6348
  Box22,
6262
6349
  {
@@ -6271,6 +6358,24 @@ var StatsDisplay = ({ duration, title }) => {
6271
6358
  /* @__PURE__ */ jsx30(Box22, { height: 1 }),
6272
6359
  /* @__PURE__ */ jsx30(StatRow, { title: "Session ID:", children: /* @__PURE__ */ jsx30(Text22, { children: stats.sessionId }) }),
6273
6360
  /* @__PURE__ */ jsx30(StatRow, { title: "Wall Time:", children: /* @__PURE__ */ jsx30(Text22, { children: duration }) }),
6361
+ showLatestPrompt && /* @__PURE__ */ jsx30(StatRow, { title: "Latest Prompt:", children: /* @__PURE__ */ jsx30(Text22, { children: latestPrompt }) }),
6362
+ /* @__PURE__ */ jsx30(StatRow, { title: "Session Tokens:", children: /* @__PURE__ */ jsxs22(Text22, { children: [
6363
+ computed.totalSessionTokens.toLocaleString(),
6364
+ " total (",
6365
+ computed.totalPromptTokens.toLocaleString(),
6366
+ " prompt / ",
6367
+ computed.totalOutputTokens.toLocaleString(),
6368
+ " output)"
6369
+ ] }) }),
6370
+ computed.totalCacheReadTokens > 0 && /* @__PURE__ */ jsx30(StatRow, { title: "Cache Read:", children: /* @__PURE__ */ jsxs22(Text22, { children: [
6371
+ computed.totalCacheReadTokens.toLocaleString(),
6372
+ " (",
6373
+ /* @__PURE__ */ jsxs22(Text22, { color: cacheColor, children: [
6374
+ computed.cacheEfficiency.toFixed(1),
6375
+ "%"
6376
+ ] }),
6377
+ " of prompt tokens)"
6378
+ ] }) }),
6274
6379
  /* @__PURE__ */ jsx30(StatRow, { title: "Tool Calls:", children: /* @__PURE__ */ jsxs22(Text22, { children: [
6275
6380
  tools.totalCalls,
6276
6381
  " (",
@@ -6293,8 +6398,7 @@ var StatsDisplay = ({ duration, title }) => {
6293
6398
  ModelUsageTable,
6294
6399
  {
6295
6400
  models,
6296
- cacheEfficiency: computed.cacheEfficiency,
6297
- totalCacheReadTokens: computed.totalCacheReadTokens
6401
+ compact: columns < 120
6298
6402
  }
6299
6403
  )
6300
6404
  ]
@@ -6536,28 +6640,6 @@ var HistoryItemDisplay = ({
6536
6640
  );
6537
6641
  };
6538
6642
 
6539
- // src/ui/hooks/terminal/use-terminal-size.ts
6540
- import { useEffect as useEffect11, useState as useState9 } from "react";
6541
- function useTerminalSize() {
6542
- const [size, setSize] = useState9({
6543
- columns: process.stdout.columns || 60,
6544
- rows: process.stdout.rows || 20
6545
- });
6546
- useEffect11(() => {
6547
- function updateSize() {
6548
- setSize({
6549
- columns: process.stdout.columns || 60,
6550
- rows: process.stdout.rows || 20
6551
- });
6552
- }
6553
- process.stdout.on("resize", updateSize);
6554
- return () => {
6555
- process.stdout.off("resize", updateSize);
6556
- };
6557
- }, []);
6558
- return size;
6559
- }
6560
-
6561
6643
  // src/ui/components/indicators/quitting-display.tsx
6562
6644
  import { jsx as jsx35 } from "react/jsx-runtime";
6563
6645
  var QuittingDisplay = () => {
@@ -6580,7 +6662,7 @@ var QuittingDisplay = () => {
6580
6662
  };
6581
6663
 
6582
6664
  // src/ui/components/layout/screen-reader-app-layout.tsx
6583
- import { Box as Box63 } from "ink";
6665
+ import { Box as Box64 } from "ink";
6584
6666
 
6585
6667
  // src/ui/components/indicators/notifications.tsx
6586
6668
  import { Box as Box27, Text as Text25, useIsScreenReaderEnabled as useIsScreenReaderEnabled3 } from "ink";
@@ -9102,8 +9184,8 @@ function requiresRestart(key) {
9102
9184
  function getDefaultValue(key) {
9103
9185
  return getFlattenedSchema()[key]?.default;
9104
9186
  }
9105
- function getNestedValue(obj, path16) {
9106
- const [first, ...rest] = path16;
9187
+ function getNestedValue(obj, path15) {
9188
+ const [first, ...rest] = path15;
9107
9189
  if (!first || !(first in obj)) {
9108
9190
  return void 0;
9109
9191
  }
@@ -9121,12 +9203,12 @@ function getEffectiveValue(key, settings, mergedSettings) {
9121
9203
  if (!definition) {
9122
9204
  return void 0;
9123
9205
  }
9124
- const path16 = key.split(".");
9125
- let value = getNestedValue(settings, path16);
9206
+ const path15 = key.split(".");
9207
+ let value = getNestedValue(settings, path15);
9126
9208
  if (value !== void 0) {
9127
9209
  return value;
9128
9210
  }
9129
- value = getNestedValue(mergedSettings, path16);
9211
+ value = getNestedValue(mergedSettings, path15);
9130
9212
  if (value !== void 0) {
9131
9213
  return value;
9132
9214
  }
@@ -9136,12 +9218,12 @@ function getDialogSettingKeys() {
9136
9218
  return Object.values(getFlattenedSchema()).filter((definition) => definition.showInDialog !== false).map((definition) => definition.key);
9137
9219
  }
9138
9220
  function settingExistsInScope(key, scopeSettings) {
9139
- const path16 = key.split(".");
9140
- const value = getNestedValue(scopeSettings, path16);
9221
+ const path15 = key.split(".");
9222
+ const value = getNestedValue(scopeSettings, path15);
9141
9223
  return value !== void 0;
9142
9224
  }
9143
- function setNestedValue(obj, path16, value) {
9144
- const [first, ...rest] = path16;
9225
+ function setNestedValue(obj, path15, value) {
9226
+ const [first, ...rest] = path15;
9145
9227
  if (!first) {
9146
9228
  return obj;
9147
9229
  }
@@ -9156,15 +9238,15 @@ function setNestedValue(obj, path16, value) {
9156
9238
  return obj;
9157
9239
  }
9158
9240
  function setPendingSettingValue(key, value, pendingSettings) {
9159
- const path16 = key.split(".");
9241
+ const path15 = key.split(".");
9160
9242
  const newSettings = JSON.parse(JSON.stringify(pendingSettings));
9161
- setNestedValue(newSettings, path16, value);
9243
+ setNestedValue(newSettings, path15, value);
9162
9244
  return newSettings;
9163
9245
  }
9164
9246
  function setPendingSettingValueAny(key, value, pendingSettings) {
9165
- const path16 = key.split(".");
9247
+ const path15 = key.split(".");
9166
9248
  const newSettings = structuredClone(pendingSettings);
9167
- setNestedValue(newSettings, path16, value);
9249
+ setNestedValue(newSettings, path15, value);
9168
9250
  return newSettings;
9169
9251
  }
9170
9252
  function hasRestartRequiredSettings(modifiedSettings) {
@@ -9175,10 +9257,10 @@ function getRestartRequiredFromModified(modifiedSettings) {
9175
9257
  }
9176
9258
  function saveModifiedSettings(modifiedSettings, pendingSettings, loadedSettings, scope) {
9177
9259
  modifiedSettings.forEach((settingKey) => {
9178
- const path16 = settingKey.split(".");
9260
+ const path15 = settingKey.split(".");
9179
9261
  const value = getNestedValue(
9180
9262
  pendingSettings,
9181
- path16
9263
+ path15
9182
9264
  );
9183
9265
  if (value === void 0) {
9184
9266
  return;
@@ -14051,7 +14133,7 @@ var DialogManager = ({ terminalWidth }) => {
14051
14133
 
14052
14134
  // src/ui/components/input/composer.tsx
14053
14135
  import { useState as useState33 } from "react";
14054
- import { Box as Box57, useIsScreenReaderEnabled as useIsScreenReaderEnabled4 } from "ink";
14136
+ import { Box as Box58, useIsScreenReaderEnabled as useIsScreenReaderEnabled4 } from "ink";
14055
14137
 
14056
14138
  // src/ui/components/indicators/loading-indicator.tsx
14057
14139
  import { Box as Box45, Text as Text38 } from "ink";
@@ -16858,7 +16940,7 @@ var InputPrompt = ({
16858
16940
  };
16859
16941
 
16860
16942
  // src/ui/components/layout/footer.tsx
16861
- import { Box as Box53, Text as Text48 } from "ink";
16943
+ import { Box as Box54, Text as Text49 } from "ink";
16862
16944
 
16863
16945
  // src/ui/components/layout/console-summary-display.tsx
16864
16946
  import { Box as Box51, Text as Text45 } from "ink";
@@ -17091,8 +17173,33 @@ var DebugProfiler = ({ compact = false }) => {
17091
17173
  ] }, forceRefresh);
17092
17174
  };
17093
17175
 
17094
- // src/ui/components/layout/footer.tsx
17176
+ // src/ui/components/stats/context-usage-display.tsx
17177
+ import { Box as Box53, Text as Text48 } from "ink";
17095
17178
  import { jsx as jsx68, jsxs as jsxs52 } from "react/jsx-runtime";
17179
+ var WARNING_PERCENT = 70;
17180
+ var ERROR_PERCENT = 85;
17181
+ function ContextUsageDisplay({
17182
+ promptTokens,
17183
+ contextWindow: contextWindow2,
17184
+ compact = false
17185
+ }) {
17186
+ const validContextWindow = contextWindow2 !== void 0 && contextWindow2 > 0 ? contextWindow2 : void 0;
17187
+ if (promptTokens === 0 && validContextWindow === void 0) return null;
17188
+ const percent = validContextWindow === void 0 ? void 0 : promptTokens / validContextWindow * 100;
17189
+ const color = percent !== void 0 && percent >= ERROR_PERCENT ? theme.status.error : percent !== void 0 && percent >= WARNING_PERCENT ? theme.status.warning : theme.text.secondary;
17190
+ const percentage = compact || percent === void 0 ? "" : ` (${Math.round(percent)}%)`;
17191
+ const usage = `${formatTokenCount(promptTokens)}/${validContextWindow === void 0 ? "?" : formatTokenCount(validContextWindow)}`;
17192
+ return /* @__PURE__ */ jsxs52(Box53, { children: [
17193
+ /* @__PURE__ */ jsx68(Text48, { color: theme.text.secondary, children: " | " }),
17194
+ /* @__PURE__ */ jsxs52(Text48, { color, children: [
17195
+ usage,
17196
+ percentage
17197
+ ] })
17198
+ ] });
17199
+ }
17200
+
17201
+ // src/ui/components/layout/footer.tsx
17202
+ import { jsx as jsx69, jsxs as jsxs53 } from "react/jsx-runtime";
17096
17203
  var isDevelopment = process.env["NODE_ENV"] === "development";
17097
17204
  var Footer = () => {
17098
17205
  const uiState = useUIState();
@@ -17128,8 +17235,8 @@ var Footer = () => {
17128
17235
  const justifyContent = hideCWD && hideModelInfo ? "center" : "space-between";
17129
17236
  const displayVimMode = vimEnabled ? vimMode : void 0;
17130
17237
  const showRenderDiagnostics = debugMode || isDevelopment;
17131
- return /* @__PURE__ */ jsxs52(
17132
- Box53,
17238
+ return /* @__PURE__ */ jsxs53(
17239
+ Box54,
17133
17240
  {
17134
17241
  justifyContent,
17135
17242
  width: terminalWidth,
@@ -17137,47 +17244,59 @@ var Footer = () => {
17137
17244
  alignItems: "center",
17138
17245
  paddingX: 1,
17139
17246
  children: [
17140
- (displayVimMode || !hideCWD) && /* @__PURE__ */ jsxs52(Box53, { children: [
17141
- displayVimMode && /* @__PURE__ */ jsxs52(Text48, { color: theme.text.secondary, children: [
17247
+ (displayVimMode || !hideCWD) && /* @__PURE__ */ jsxs53(Box54, { children: [
17248
+ displayVimMode && /* @__PURE__ */ jsxs53(Text49, { color: theme.text.secondary, children: [
17142
17249
  "[",
17143
17250
  displayVimMode,
17144
17251
  "] "
17145
17252
  ] }),
17146
- !hideCWD && (nightly ? /* @__PURE__ */ jsxs52(ThemedGradient, { children: [
17253
+ !hideCWD && (nightly ? /* @__PURE__ */ jsxs53(ThemedGradient, { children: [
17147
17254
  displayPath,
17148
- branchName && /* @__PURE__ */ jsxs52(Text48, { children: [
17255
+ branchName && /* @__PURE__ */ jsxs53(Text49, { children: [
17149
17256
  " (",
17150
17257
  branchName,
17151
17258
  "*)"
17152
17259
  ] })
17153
- ] }) : /* @__PURE__ */ jsxs52(Text48, { color: theme.text.link, children: [
17260
+ ] }) : /* @__PURE__ */ jsxs53(Text49, { color: theme.text.link, children: [
17154
17261
  displayPath,
17155
- branchName && /* @__PURE__ */ jsxs52(Text48, { color: theme.text.secondary, children: [
17262
+ branchName && /* @__PURE__ */ jsxs53(Text49, { color: theme.text.secondary, children: [
17156
17263
  " (",
17157
17264
  branchName,
17158
17265
  "*)"
17159
17266
  ] })
17160
17267
  ] })),
17161
- debugMode && /* @__PURE__ */ jsx68(Text48, { color: theme.status.error, children: " " + (debugMessage || "--debug") })
17268
+ debugMode && /* @__PURE__ */ jsx69(Text49, { color: theme.status.error, children: " " + (debugMessage || "--debug") })
17162
17269
  ] }),
17163
- showRenderDiagnostics && /* @__PURE__ */ jsx68(
17164
- Box53,
17270
+ showRenderDiagnostics && /* @__PURE__ */ jsx69(
17271
+ Box54,
17165
17272
  {
17166
17273
  flexGrow: 1,
17167
17274
  flexShrink: 1,
17168
17275
  justifyContent: "center",
17169
17276
  marginX: terminalWidth >= 120 ? 1 : 0,
17170
- children: /* @__PURE__ */ jsx68(DebugProfiler, { compact: terminalWidth < 120 })
17277
+ children: /* @__PURE__ */ jsx69(DebugProfiler, { compact: terminalWidth < 120 })
17171
17278
  }
17172
17279
  ),
17173
- !hideModelInfo && /* @__PURE__ */ jsxs52(Box53, { alignItems: "center", justifyContent: "flex-end", children: [
17174
- /* @__PURE__ */ jsxs52(Box53, { alignItems: "center", justifyContent: "flex-end", children: [
17175
- /* @__PURE__ */ jsx68(Text48, { color: theme.text.accent, children: model }),
17176
- showMemoryUsage && /* @__PURE__ */ jsx68(MemoryUsageDisplay, {})
17280
+ !hideModelInfo && /* @__PURE__ */ jsxs53(Box54, { alignItems: "center", justifyContent: "flex-end", children: [
17281
+ /* @__PURE__ */ jsxs53(Box54, { alignItems: "center", justifyContent: "flex-end", children: [
17282
+ /* @__PURE__ */ jsx69(Text49, { color: theme.text.accent, children: model }),
17283
+ uiState.currentReasoningEffort && /* @__PURE__ */ jsxs53(Text49, { color: theme.text.link, children: [
17284
+ " ",
17285
+ uiState.currentReasoningEffort
17286
+ ] }),
17287
+ /* @__PURE__ */ jsx69(
17288
+ ContextUsageDisplay,
17289
+ {
17290
+ promptTokens: uiState.sessionStats.lastPromptTokenCount,
17291
+ contextWindow: uiState.sessionStats.contextWindow,
17292
+ compact: terminalWidth < 100
17293
+ }
17294
+ ),
17295
+ showMemoryUsage && /* @__PURE__ */ jsx69(MemoryUsageDisplay, {})
17177
17296
  ] }),
17178
- /* @__PURE__ */ jsx68(Box53, { alignItems: "center", children: !showErrorDetails && errorCount > 0 && /* @__PURE__ */ jsxs52(Box53, { paddingLeft: 1, flexDirection: "row", children: [
17179
- /* @__PURE__ */ jsx68(Text48, { color: theme.ui.comment, children: "| " }),
17180
- /* @__PURE__ */ jsx68(ConsoleSummaryDisplay, { errorCount })
17297
+ /* @__PURE__ */ jsx69(Box54, { alignItems: "center", children: !showErrorDetails && errorCount > 0 && /* @__PURE__ */ jsxs53(Box54, { paddingLeft: 1, flexDirection: "row", children: [
17298
+ /* @__PURE__ */ jsx69(Text49, { color: theme.ui.comment, children: "| " }),
17299
+ /* @__PURE__ */ jsx69(ConsoleSummaryDisplay, { errorCount })
17181
17300
  ] }) })
17182
17301
  ] })
17183
17302
  ]
@@ -17186,8 +17305,8 @@ var Footer = () => {
17186
17305
  };
17187
17306
 
17188
17307
  // src/ui/components/indicators/queued-message-display.tsx
17189
- import { Box as Box54, Text as Text49 } from "ink";
17190
- import { jsx as jsx69, jsxs as jsxs53 } from "react/jsx-runtime";
17308
+ import { Box as Box55, Text as Text50 } from "ink";
17309
+ import { jsx as jsx70, jsxs as jsxs54 } from "react/jsx-runtime";
17191
17310
  var MAX_DISPLAYED_QUEUED_MESSAGES = 3;
17192
17311
  var QueuedMessageDisplay = ({
17193
17312
  messageQueue
@@ -17195,13 +17314,13 @@ var QueuedMessageDisplay = ({
17195
17314
  if (messageQueue.length === 0) {
17196
17315
  return null;
17197
17316
  }
17198
- return /* @__PURE__ */ jsxs53(Box54, { flexDirection: "column", marginTop: 1, children: [
17199
- /* @__PURE__ */ jsx69(Box54, { paddingLeft: 2, children: /* @__PURE__ */ jsx69(Text49, { dimColor: true, children: "Queued (press \u2191 to edit):" }) }),
17317
+ return /* @__PURE__ */ jsxs54(Box55, { flexDirection: "column", marginTop: 1, children: [
17318
+ /* @__PURE__ */ jsx70(Box55, { paddingLeft: 2, children: /* @__PURE__ */ jsx70(Text50, { dimColor: true, children: "Queued (press \u2191 to edit):" }) }),
17200
17319
  messageQueue.slice(0, MAX_DISPLAYED_QUEUED_MESSAGES).map((message, index) => {
17201
17320
  const preview2 = message.replace(/\s+/g, " ");
17202
- return /* @__PURE__ */ jsx69(Box54, { paddingLeft: 4, width: "100%", children: /* @__PURE__ */ jsx69(Text49, { dimColor: true, wrap: "truncate", children: preview2 }) }, index);
17321
+ return /* @__PURE__ */ jsx70(Box55, { paddingLeft: 4, width: "100%", children: /* @__PURE__ */ jsx70(Text50, { dimColor: true, wrap: "truncate", children: preview2 }) }, index);
17203
17322
  }),
17204
- messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ jsx69(Box54, { paddingLeft: 4, children: /* @__PURE__ */ jsxs53(Text49, { dimColor: true, children: [
17323
+ messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ jsx70(Box55, { paddingLeft: 4, children: /* @__PURE__ */ jsxs54(Text50, { dimColor: true, children: [
17205
17324
  "... (+",
17206
17325
  messageQueue.length - MAX_DISPLAYED_QUEUED_MESSAGES,
17207
17326
  " more)"
@@ -17210,20 +17329,20 @@ var QueuedMessageDisplay = ({
17210
17329
  };
17211
17330
 
17212
17331
  // src/ui/components/help/command-init-display.tsx
17213
- import { Box as Box55, Text as Text50 } from "ink";
17214
- import { jsx as jsx70, jsxs as jsxs54 } from "react/jsx-runtime";
17332
+ import { Box as Box56, Text as Text51 } from "ink";
17333
+ import { jsx as jsx71, jsxs as jsxs55 } from "react/jsx-runtime";
17215
17334
  var CommandInitDisplay = ({
17216
17335
  message = "Loading commands..."
17217
- }) => /* @__PURE__ */ jsx70(Box55, { marginTop: 1, children: /* @__PURE__ */ jsxs54(Text50, { children: [
17218
- /* @__PURE__ */ jsx70(AgentSpinner, {}),
17336
+ }) => /* @__PURE__ */ jsx71(Box56, { marginTop: 1, children: /* @__PURE__ */ jsxs55(Text51, { children: [
17337
+ /* @__PURE__ */ jsx71(AgentSpinner, {}),
17219
17338
  " ",
17220
- /* @__PURE__ */ jsx70(Text50, { color: theme.text.primary, children: message })
17339
+ /* @__PURE__ */ jsx71(Text51, { color: theme.text.primary, children: message })
17221
17340
  ] }) });
17222
17341
 
17223
17342
  // src/ui/components/messages/todo.tsx
17224
- import { Box as Box56, Text as Text51 } from "ink";
17343
+ import { Box as Box57, Text as Text52 } from "ink";
17225
17344
  import { useMemo as useMemo21 } from "react";
17226
- import { jsx as jsx71, jsxs as jsxs55 } from "react/jsx-runtime";
17345
+ import { jsx as jsx72, jsxs as jsxs56 } from "react/jsx-runtime";
17227
17346
  var TodoTitleDisplay = ({ todos }) => {
17228
17347
  const score = useMemo21(() => {
17229
17348
  let total = 0;
@@ -17238,9 +17357,9 @@ var TodoTitleDisplay = ({ todos }) => {
17238
17357
  }
17239
17358
  return `${completed}/${total} completed`;
17240
17359
  }, [todos]);
17241
- return /* @__PURE__ */ jsxs55(Box56, { flexDirection: "row", columnGap: 2, height: 1, children: [
17242
- /* @__PURE__ */ jsx71(Text51, { color: theme.text.primary, bold: true, "aria-label": "Todo list", children: "Todo" }),
17243
- /* @__PURE__ */ jsxs55(Text51, { color: theme.text.secondary, children: [
17360
+ return /* @__PURE__ */ jsxs56(Box57, { flexDirection: "row", columnGap: 2, height: 1, children: [
17361
+ /* @__PURE__ */ jsx72(Text52, { color: theme.text.primary, bold: true, "aria-label": "Todo list", children: "Todo" }),
17362
+ /* @__PURE__ */ jsxs56(Text52, { color: theme.text.secondary, children: [
17244
17363
  score,
17245
17364
  " (ctrl+t to toggle)"
17246
17365
  ] })
@@ -17249,14 +17368,14 @@ var TodoTitleDisplay = ({ todos }) => {
17249
17368
  var TodoStatusDisplay = ({ status }) => {
17250
17369
  switch (status) {
17251
17370
  case "completed":
17252
- return /* @__PURE__ */ jsx71(Text51, { color: theme.status.success, "aria-label": "Completed", children: "\u2713" });
17371
+ return /* @__PURE__ */ jsx72(Text52, { color: theme.status.success, "aria-label": "Completed", children: "\u2713" });
17253
17372
  case "in_progress":
17254
- return /* @__PURE__ */ jsx71(Text51, { color: theme.text.accent, "aria-label": "In Progress", children: "\xBB" });
17373
+ return /* @__PURE__ */ jsx72(Text52, { color: theme.text.accent, "aria-label": "In Progress", children: "\xBB" });
17255
17374
  case "pending":
17256
- return /* @__PURE__ */ jsx71(Text51, { color: theme.text.secondary, "aria-label": "Pending", children: "\u2610" });
17375
+ return /* @__PURE__ */ jsx72(Text52, { color: theme.text.secondary, "aria-label": "Pending", children: "\u2610" });
17257
17376
  case "cancelled":
17258
17377
  default:
17259
- return /* @__PURE__ */ jsx71(Text51, { color: theme.status.error, "aria-label": "Cancelled", children: "\u2717" });
17378
+ return /* @__PURE__ */ jsx72(Text52, { color: theme.status.error, "aria-label": "Cancelled", children: "\u2717" });
17260
17379
  }
17261
17380
  };
17262
17381
  var TodoItemDisplay = ({ todo, wrap, role: ariaRole }) => {
@@ -17272,9 +17391,9 @@ var TodoItemDisplay = ({ todo, wrap, role: ariaRole }) => {
17272
17391
  }
17273
17392
  })();
17274
17393
  const strikethrough = todo.status === "cancelled";
17275
- return /* @__PURE__ */ jsxs55(Box56, { flexDirection: "row", columnGap: 1, "aria-role": ariaRole, children: [
17276
- /* @__PURE__ */ jsx71(TodoStatusDisplay, { status: todo.status }),
17277
- /* @__PURE__ */ jsx71(Box56, { flexShrink: 1, children: /* @__PURE__ */ jsx71(Text51, { color: textColor, wrap, strikethrough, children: todo.description }) })
17394
+ return /* @__PURE__ */ jsxs56(Box57, { flexDirection: "row", columnGap: 1, "aria-role": ariaRole, children: [
17395
+ /* @__PURE__ */ jsx72(TodoStatusDisplay, { status: todo.status }),
17396
+ /* @__PURE__ */ jsx72(Box57, { flexShrink: 1, children: /* @__PURE__ */ jsx72(Text52, { color: textColor, wrap, strikethrough, children: todo.description }) })
17278
17397
  ] });
17279
17398
  };
17280
17399
  var TodoTray = () => {
@@ -17295,8 +17414,8 @@ var TodoTray = () => {
17295
17414
  if (todos === null || !todos.todos || todos.todos.length === 0 || !uiState.showFullTodos && !hasActiveTodos) {
17296
17415
  return null;
17297
17416
  }
17298
- return /* @__PURE__ */ jsx71(
17299
- Box56,
17417
+ return /* @__PURE__ */ jsx72(
17418
+ Box57,
17300
17419
  {
17301
17420
  borderStyle: "single",
17302
17421
  borderBottom: false,
@@ -17305,47 +17424,47 @@ var TodoTray = () => {
17305
17424
  borderColor: theme.border.default,
17306
17425
  paddingLeft: 1,
17307
17426
  paddingRight: 1,
17308
- children: uiState.showFullTodos ? /* @__PURE__ */ jsxs55(Box56, { flexDirection: "column", rowGap: 1, children: [
17309
- /* @__PURE__ */ jsx71(TodoTitleDisplay, { todos }),
17310
- /* @__PURE__ */ jsx71(TodoListDisplay, { todos })
17311
- ] }) : /* @__PURE__ */ jsxs55(Box56, { flexDirection: "row", columnGap: 1, height: 1, children: [
17312
- /* @__PURE__ */ jsx71(Box56, { flexShrink: 0, flexGrow: 0, children: /* @__PURE__ */ jsx71(TodoTitleDisplay, { todos }) }),
17313
- inProgress && /* @__PURE__ */ jsx71(Box56, { flexShrink: 1, flexGrow: 1, children: /* @__PURE__ */ jsx71(TodoItemDisplay, { todo: inProgress, wrap: "truncate" }) })
17427
+ children: uiState.showFullTodos ? /* @__PURE__ */ jsxs56(Box57, { flexDirection: "column", rowGap: 1, children: [
17428
+ /* @__PURE__ */ jsx72(TodoTitleDisplay, { todos }),
17429
+ /* @__PURE__ */ jsx72(TodoListDisplay, { todos })
17430
+ ] }) : /* @__PURE__ */ jsxs56(Box57, { flexDirection: "row", columnGap: 1, height: 1, children: [
17431
+ /* @__PURE__ */ jsx72(Box57, { flexShrink: 0, flexGrow: 0, children: /* @__PURE__ */ jsx72(TodoTitleDisplay, { todos }) }),
17432
+ inProgress && /* @__PURE__ */ jsx72(Box57, { flexShrink: 1, flexGrow: 1, children: /* @__PURE__ */ jsx72(TodoItemDisplay, { todo: inProgress, wrap: "truncate" }) })
17314
17433
  ] })
17315
17434
  }
17316
17435
  );
17317
17436
  };
17318
- var TodoListDisplay = ({ todos }) => /* @__PURE__ */ jsx71(Box56, { flexDirection: "column", "aria-role": "list", children: todos.todos.map((todo, index) => /* @__PURE__ */ jsx71(TodoItemDisplay, { todo, role: "listitem" }, index)) });
17437
+ var TodoListDisplay = ({ todos }) => /* @__PURE__ */ jsx72(Box57, { flexDirection: "column", "aria-role": "list", children: todos.todos.map((todo, index) => /* @__PURE__ */ jsx72(TodoItemDisplay, { todo, role: "listitem" }, index)) });
17319
17438
 
17320
17439
  // src/ui/components/layout/status-display.tsx
17321
- import { Text as Text52 } from "ink";
17322
- import { jsx as jsx72 } from "react/jsx-runtime";
17440
+ import { Text as Text53 } from "ink";
17441
+ import { jsx as jsx73 } from "react/jsx-runtime";
17323
17442
  var StatusDisplay = () => {
17324
17443
  const uiState = useUIState();
17325
17444
  if (process.env["DSH_CONSOLE_SYSTEM_MD"]) {
17326
- return /* @__PURE__ */ jsx72(Text52, { color: theme.status.error, children: "|\u2310\u25A0_\u25A0|" });
17445
+ return /* @__PURE__ */ jsx73(Text53, { color: theme.status.error, children: "|\u2310\u25A0_\u25A0|" });
17327
17446
  }
17328
17447
  if (uiState.ctrlCPressedOnce) {
17329
- return /* @__PURE__ */ jsx72(Text52, { color: theme.status.warning, children: "Press Ctrl+C again to exit." });
17448
+ return /* @__PURE__ */ jsx73(Text53, { color: theme.status.warning, children: "Press Ctrl+C again to exit." });
17330
17449
  }
17331
17450
  if (uiState.warningMessage) {
17332
- return /* @__PURE__ */ jsx72(Text52, { color: theme.status.warning, children: uiState.warningMessage });
17451
+ return /* @__PURE__ */ jsx73(Text53, { color: theme.status.warning, children: uiState.warningMessage });
17333
17452
  }
17334
17453
  if (uiState.ctrlDPressedOnce) {
17335
- return /* @__PURE__ */ jsx72(Text52, { color: theme.status.warning, children: "Press Ctrl+D again to exit." });
17454
+ return /* @__PURE__ */ jsx73(Text53, { color: theme.status.warning, children: "Press Ctrl+D again to exit." });
17336
17455
  }
17337
17456
  if (uiState.showEscapePrompt) {
17338
17457
  if (uiState.buffer.text.length === 0) return null;
17339
- return /* @__PURE__ */ jsx72(Text52, { color: theme.text.secondary, children: "Press Esc again to clear prompt." });
17458
+ return /* @__PURE__ */ jsx73(Text53, { color: theme.text.secondary, children: "Press Esc again to clear prompt." });
17340
17459
  }
17341
17460
  if (uiState.queueErrorMessage) {
17342
- return /* @__PURE__ */ jsx72(Text52, { color: theme.status.error, children: uiState.queueErrorMessage });
17461
+ return /* @__PURE__ */ jsx73(Text53, { color: theme.status.error, children: uiState.queueErrorMessage });
17343
17462
  }
17344
17463
  return null;
17345
17464
  };
17346
17465
 
17347
17466
  // src/ui/components/input/composer.tsx
17348
- import { jsx as jsx73, jsxs as jsxs56 } from "react/jsx-runtime";
17467
+ import { jsx as jsx74, jsxs as jsxs57 } from "react/jsx-runtime";
17349
17468
  var Composer = ({ isFocused = true }) => {
17350
17469
  const config = useConfig();
17351
17470
  const settings = useSettings();
@@ -17359,26 +17478,26 @@ var Composer = ({ isFocused = true }) => {
17359
17478
  const [, setSuggestionsVisible] = useState33(false);
17360
17479
  const isAlternateBuffer = useAlternateBuffer();
17361
17480
  const suggestionsPosition = isAlternateBuffer ? "above" : "below";
17362
- return /* @__PURE__ */ jsxs56(
17363
- Box57,
17481
+ return /* @__PURE__ */ jsxs57(
17482
+ Box58,
17364
17483
  {
17365
17484
  flexDirection: "column",
17366
17485
  width: uiState.terminalWidth,
17367
17486
  flexGrow: 0,
17368
17487
  flexShrink: 0,
17369
17488
  children: [
17370
- !uiState.embeddedShellFocused && /* @__PURE__ */ jsx73(
17489
+ !uiState.embeddedShellFocused && /* @__PURE__ */ jsx74(
17371
17490
  LoadingIndicator,
17372
17491
  {
17373
17492
  currentLoadingPhrase: config.getAccessibility()?.enableLoadingPhrases === false ? void 0 : uiState.currentLoadingPhrase,
17374
17493
  elapsedTime: uiState.elapsedTime
17375
17494
  }
17376
17495
  ),
17377
- !uiState.slashCommands && /* @__PURE__ */ jsx73(CommandInitDisplay, {}),
17378
- /* @__PURE__ */ jsx73(QueuedMessageDisplay, { messageQueue: uiState.messageQueue }),
17379
- /* @__PURE__ */ jsx73(TodoTray, {}),
17380
- /* @__PURE__ */ jsxs56(
17381
- Box57,
17496
+ !uiState.slashCommands && /* @__PURE__ */ jsx74(CommandInitDisplay, {}),
17497
+ /* @__PURE__ */ jsx74(QueuedMessageDisplay, { messageQueue: uiState.messageQueue }),
17498
+ /* @__PURE__ */ jsx74(TodoTray, {}),
17499
+ /* @__PURE__ */ jsxs57(
17500
+ Box58,
17382
17501
  {
17383
17502
  marginTop: 1,
17384
17503
  justifyContent: "space-between",
@@ -17386,16 +17505,16 @@ var Composer = ({ isFocused = true }) => {
17386
17505
  flexDirection: isNarrow ? "column" : "row",
17387
17506
  alignItems: isNarrow ? "flex-start" : "center",
17388
17507
  children: [
17389
- /* @__PURE__ */ jsx73(Box57, { marginRight: 1, children: /* @__PURE__ */ jsx73(StatusDisplay, {}) }),
17390
- /* @__PURE__ */ jsxs56(Box57, { paddingTop: isNarrow ? 1 : 0, children: [
17391
- uiState.shellModeActive && /* @__PURE__ */ jsx73(ShellModeIndicator, {}),
17392
- !uiState.renderMarkdown && /* @__PURE__ */ jsx73(RawMarkdownIndicator, {})
17508
+ /* @__PURE__ */ jsx74(Box58, { marginRight: 1, children: /* @__PURE__ */ jsx74(StatusDisplay, {}) }),
17509
+ /* @__PURE__ */ jsxs57(Box58, { paddingTop: isNarrow ? 1 : 0, children: [
17510
+ uiState.shellModeActive && /* @__PURE__ */ jsx74(ShellModeIndicator, {}),
17511
+ !uiState.renderMarkdown && /* @__PURE__ */ jsx74(RawMarkdownIndicator, {})
17393
17512
  ] })
17394
17513
  ]
17395
17514
  }
17396
17515
  ),
17397
- uiState.showErrorDetails && /* @__PURE__ */ jsx73(OverflowProvider, { children: /* @__PURE__ */ jsxs56(Box57, { flexDirection: "column", children: [
17398
- /* @__PURE__ */ jsx73(
17516
+ uiState.showErrorDetails && /* @__PURE__ */ jsx74(OverflowProvider, { children: /* @__PURE__ */ jsxs57(Box58, { flexDirection: "column", children: [
17517
+ /* @__PURE__ */ jsx74(
17399
17518
  DetailedMessagesDisplay,
17400
17519
  {
17401
17520
  messages: uiState.filteredConsoleMessages,
@@ -17404,9 +17523,9 @@ var Composer = ({ isFocused = true }) => {
17404
17523
  hasFocus: uiState.showErrorDetails
17405
17524
  }
17406
17525
  ),
17407
- /* @__PURE__ */ jsx73(ShowMoreLines, { constrainHeight: uiState.constrainHeight })
17526
+ /* @__PURE__ */ jsx74(ShowMoreLines, { constrainHeight: uiState.constrainHeight })
17408
17527
  ] }) }),
17409
- uiState.isInputActive && /* @__PURE__ */ jsx73(
17528
+ uiState.isInputActive && /* @__PURE__ */ jsx74(
17410
17529
  InputPrompt,
17411
17530
  {
17412
17531
  buffer: uiState.buffer,
@@ -17433,20 +17552,20 @@ var Composer = ({ isFocused = true }) => {
17433
17552
  onSuggestionsVisibilityChange: setSuggestionsVisible
17434
17553
  }
17435
17554
  ),
17436
- !settings.merged.ui.hideFooter && !isScreenReaderEnabled && /* @__PURE__ */ jsx73(Footer, {})
17555
+ !settings.merged.ui.hideFooter && !isScreenReaderEnabled && /* @__PURE__ */ jsx74(Footer, {})
17437
17556
  ]
17438
17557
  }
17439
17558
  );
17440
17559
  };
17441
17560
 
17442
17561
  // src/ui/components/dialogs/exit-warning.tsx
17443
- import { Box as Box58, Text as Text53 } from "ink";
17444
- import { Fragment as Fragment13, jsx as jsx74, jsxs as jsxs57 } from "react/jsx-runtime";
17562
+ import { Box as Box59, Text as Text54 } from "ink";
17563
+ import { Fragment as Fragment13, jsx as jsx75, jsxs as jsxs58 } from "react/jsx-runtime";
17445
17564
  var ExitWarning = () => {
17446
17565
  const uiState = useUIState();
17447
- return /* @__PURE__ */ jsxs57(Fragment13, { children: [
17448
- uiState.dialogsVisible && uiState.ctrlCPressedOnce && /* @__PURE__ */ jsx74(Box58, { marginTop: 1, children: /* @__PURE__ */ jsx74(Text53, { color: theme.status.warning, children: "Press Ctrl+C again to exit." }) }),
17449
- uiState.dialogsVisible && uiState.ctrlDPressedOnce && /* @__PURE__ */ jsx74(Box58, { marginTop: 1, children: /* @__PURE__ */ jsx74(Text53, { color: theme.status.warning, children: "Press Ctrl+D again to exit." }) })
17566
+ return /* @__PURE__ */ jsxs58(Fragment13, { children: [
17567
+ uiState.dialogsVisible && uiState.ctrlCPressedOnce && /* @__PURE__ */ jsx75(Box59, { marginTop: 1, children: /* @__PURE__ */ jsx75(Text54, { color: theme.status.warning, children: "Press Ctrl+C again to exit." }) }),
17568
+ uiState.dialogsVisible && uiState.ctrlDPressedOnce && /* @__PURE__ */ jsx75(Box59, { marginTop: 1, children: /* @__PURE__ */ jsx75(Text54, { color: theme.status.warning, children: "Press Ctrl+D again to exit." }) })
17450
17569
  ] });
17451
17570
  };
17452
17571
 
@@ -17475,7 +17594,7 @@ import {
17475
17594
  useMemo as useMemo22,
17476
17595
  useSyncExternalStore
17477
17596
  } from "react";
17478
- import { jsx as jsx75 } from "react/jsx-runtime";
17597
+ import { jsx as jsx76 } from "react/jsx-runtime";
17479
17598
  var ApprovalContext = createContext12(
17480
17599
  void 0
17481
17600
  );
@@ -17486,7 +17605,7 @@ var ApprovalRuntimeProvider = ({ runtime, children }) => {
17486
17605
  runtime.getSnapshot
17487
17606
  );
17488
17607
  const value = useMemo22(() => ({ runtime, snapshot }), [runtime, snapshot]);
17489
- return /* @__PURE__ */ jsx75(ApprovalContext.Provider, { value, children });
17608
+ return /* @__PURE__ */ jsx76(ApprovalContext.Provider, { value, children });
17490
17609
  };
17491
17610
  function useApprovalRuntime() {
17492
17611
  const value = useContext13(ApprovalContext);
@@ -17505,7 +17624,7 @@ import {
17505
17624
  useMemo as useMemo23,
17506
17625
  useSyncExternalStore as useSyncExternalStore2
17507
17626
  } from "react";
17508
- import { jsx as jsx76 } from "react/jsx-runtime";
17627
+ import { jsx as jsx77 } from "react/jsx-runtime";
17509
17628
  var UserQuestionContext = createContext13(void 0);
17510
17629
  var UserQuestionRuntimeProvider = ({ runtime, children }) => {
17511
17630
  const snapshot = useSyncExternalStore2(
@@ -17514,7 +17633,7 @@ var UserQuestionRuntimeProvider = ({ runtime, children }) => {
17514
17633
  runtime.getSnapshot
17515
17634
  );
17516
17635
  const value = useMemo23(() => ({ runtime, snapshot }), [runtime, snapshot]);
17517
- return /* @__PURE__ */ jsx76(UserQuestionContext.Provider, { value, children });
17636
+ return /* @__PURE__ */ jsx77(UserQuestionContext.Provider, { value, children });
17518
17637
  };
17519
17638
  function useUserQuestionRuntime() {
17520
17639
  const value = useContext14(UserQuestionContext);
@@ -17527,12 +17646,12 @@ function useUserQuestionRuntime() {
17527
17646
  }
17528
17647
 
17529
17648
  // src/ui/components/dialogs/tool-confirmation-queue.tsx
17530
- import { Box as Box60, Text as Text55 } from "ink";
17649
+ import { Box as Box61, Text as Text56 } from "ink";
17531
17650
 
17532
17651
  // src/ui/components/messages/tool-confirmation-message.tsx
17533
- import { Box as Box59, Text as Text54 } from "ink";
17652
+ import { Box as Box60, Text as Text55 } from "ink";
17534
17653
  import { useMemo as useMemo24 } from "react";
17535
- import { jsx as jsx77, jsxs as jsxs58 } from "react/jsx-runtime";
17654
+ import { jsx as jsx78, jsxs as jsxs59 } from "react/jsx-runtime";
17536
17655
  var ToolConfirmationMessage = ({ request, respond, isFocused }) => {
17537
17656
  useKeypress(
17538
17657
  (key) => {
@@ -17553,14 +17672,14 @@ var ToolConfirmationMessage = ({ request, respond, isFocused }) => {
17553
17672
  ],
17554
17673
  []
17555
17674
  );
17556
- return /* @__PURE__ */ jsxs58(Box59, { flexDirection: "column", paddingBottom: 1, children: [
17557
- request.reason !== void 0 && /* @__PURE__ */ jsx77(Box59, { marginBottom: 1, children: /* @__PURE__ */ jsx77(Text54, { color: theme.text.secondary, children: request.reason }) }),
17558
- /* @__PURE__ */ jsx77(Box59, { marginBottom: 1, children: /* @__PURE__ */ jsxs58(Text54, { color: theme.text.primary, children: [
17675
+ return /* @__PURE__ */ jsxs59(Box60, { flexDirection: "column", paddingBottom: 1, children: [
17676
+ request.reason !== void 0 && /* @__PURE__ */ jsx78(Box60, { marginBottom: 1, children: /* @__PURE__ */ jsx78(Text55, { color: theme.text.secondary, children: request.reason }) }),
17677
+ /* @__PURE__ */ jsx78(Box60, { marginBottom: 1, children: /* @__PURE__ */ jsxs59(Text55, { color: theme.text.primary, children: [
17559
17678
  "Allow ",
17560
- /* @__PURE__ */ jsx77(Text54, { bold: true, children: request.toolName }),
17679
+ /* @__PURE__ */ jsx78(Text55, { bold: true, children: request.toolName }),
17561
17680
  " to continue?"
17562
17681
  ] }) }),
17563
- /* @__PURE__ */ jsx77(
17682
+ /* @__PURE__ */ jsx78(
17564
17683
  RadioButtonSelect,
17565
17684
  {
17566
17685
  items: options,
@@ -17568,14 +17687,14 @@ var ToolConfirmationMessage = ({ request, respond, isFocused }) => {
17568
17687
  isFocused
17569
17688
  }
17570
17689
  ),
17571
- /* @__PURE__ */ jsx77(Text54, { color: theme.text.secondary, children: "Esc cancels this request" })
17690
+ /* @__PURE__ */ jsx78(Text55, { color: theme.text.secondary, children: "Esc cancels this request" })
17572
17691
  ] });
17573
17692
  };
17574
17693
 
17575
17694
  // src/ui/components/dialogs/tool-confirmation-queue.tsx
17576
- import { jsx as jsx78, jsxs as jsxs59 } from "react/jsx-runtime";
17577
- var ToolConfirmationQueue = ({ request, index, total, terminalWidth, respond }) => /* @__PURE__ */ jsxs59(
17578
- Box60,
17695
+ import { jsx as jsx79, jsxs as jsxs60 } from "react/jsx-runtime";
17696
+ var ToolConfirmationQueue = ({ request, index, total, terminalWidth, respond }) => /* @__PURE__ */ jsxs60(
17697
+ Box61,
17579
17698
  {
17580
17699
  flexDirection: "column",
17581
17700
  borderStyle: "round",
@@ -17584,22 +17703,22 @@ var ToolConfirmationQueue = ({ request, index, total, terminalWidth, respond })
17584
17703
  width: terminalWidth,
17585
17704
  flexShrink: 0,
17586
17705
  children: [
17587
- /* @__PURE__ */ jsxs59(Box60, { marginBottom: 1, justifyContent: "space-between", children: [
17588
- /* @__PURE__ */ jsx78(Text55, { color: theme.status.warning, bold: true, children: "Action Required" }),
17589
- /* @__PURE__ */ jsxs59(Text55, { color: theme.text.secondary, children: [
17706
+ /* @__PURE__ */ jsxs60(Box61, { marginBottom: 1, justifyContent: "space-between", children: [
17707
+ /* @__PURE__ */ jsx79(Text56, { color: theme.status.warning, bold: true, children: "Action Required" }),
17708
+ /* @__PURE__ */ jsxs60(Text56, { color: theme.text.secondary, children: [
17590
17709
  index,
17591
17710
  " of ",
17592
17711
  total
17593
17712
  ] })
17594
17713
  ] }),
17595
- /* @__PURE__ */ jsxs59(Box60, { marginBottom: 1, flexDirection: "column", children: [
17596
- /* @__PURE__ */ jsx78(Text55, { color: theme.text.primary, bold: true, children: request.toolName }),
17597
- request.callId !== void 0 && /* @__PURE__ */ jsxs59(Text55, { color: theme.text.secondary, children: [
17714
+ /* @__PURE__ */ jsxs60(Box61, { marginBottom: 1, flexDirection: "column", children: [
17715
+ /* @__PURE__ */ jsx79(Text56, { color: theme.text.primary, bold: true, children: request.toolName }),
17716
+ request.callId !== void 0 && /* @__PURE__ */ jsxs60(Text56, { color: theme.text.secondary, children: [
17598
17717
  "Call ",
17599
17718
  request.callId
17600
17719
  ] })
17601
17720
  ] }),
17602
- /* @__PURE__ */ jsx78(
17721
+ /* @__PURE__ */ jsx79(
17603
17722
  ToolConfirmationMessage,
17604
17723
  {
17605
17724
  request,
@@ -17623,12 +17742,12 @@ import {
17623
17742
  useReducer as useReducer4,
17624
17743
  useContext as useContext15
17625
17744
  } from "react";
17626
- import { Box as Box62, Text as Text57, useStdout as useStdout3 } from "ink";
17745
+ import { Box as Box63, Text as Text58, useStdout as useStdout3 } from "ink";
17627
17746
 
17628
17747
  // src/ui/components/layout/tab-header.tsx
17629
17748
  import React15 from "react";
17630
- import { Text as Text56, Box as Box61 } from "ink";
17631
- import { jsx as jsx79, jsxs as jsxs60 } from "react/jsx-runtime";
17749
+ import { Text as Text57, Box as Box62 } from "ink";
17750
+ import { jsx as jsx80, jsxs as jsxs61 } from "react/jsx-runtime";
17632
17751
  function TabHeader({
17633
17752
  tabs,
17634
17753
  currentIndex,
@@ -17648,16 +17767,16 @@ function TabHeader({
17648
17767
  if (tab.isSpecial) return "\u2261";
17649
17768
  return isCompleted ? "\u2713" : "\u25A1";
17650
17769
  };
17651
- return /* @__PURE__ */ jsxs60(Box61, { flexDirection: "row", marginBottom: 1, children: [
17652
- showArrows && /* @__PURE__ */ jsx79(Text56, { color: theme.text.secondary, children: "\u2190 " }),
17653
- tabs.map((tab, i) => /* @__PURE__ */ jsxs60(React15.Fragment, { children: [
17654
- i > 0 && /* @__PURE__ */ jsx79(Text56, { color: theme.text.secondary, children: " \u2502 " }),
17655
- showStatusIcons && /* @__PURE__ */ jsxs60(Text56, { color: theme.text.secondary, children: [
17770
+ return /* @__PURE__ */ jsxs61(Box62, { flexDirection: "row", marginBottom: 1, children: [
17771
+ showArrows && /* @__PURE__ */ jsx80(Text57, { color: theme.text.secondary, children: "\u2190 " }),
17772
+ tabs.map((tab, i) => /* @__PURE__ */ jsxs61(React15.Fragment, { children: [
17773
+ i > 0 && /* @__PURE__ */ jsx80(Text57, { color: theme.text.secondary, children: " \u2502 " }),
17774
+ showStatusIcons && /* @__PURE__ */ jsxs61(Text57, { color: theme.text.secondary, children: [
17656
17775
  getStatusIcon(tab, i),
17657
17776
  " "
17658
17777
  ] }),
17659
- /* @__PURE__ */ jsx79(
17660
- Text56,
17778
+ /* @__PURE__ */ jsx80(
17779
+ Text57,
17661
17780
  {
17662
17781
  color: i === currentIndex ? theme.text.accent : theme.text.secondary,
17663
17782
  bold: i === currentIndex,
@@ -17665,12 +17784,12 @@ function TabHeader({
17665
17784
  }
17666
17785
  )
17667
17786
  ] }, tab.key)),
17668
- showArrows && /* @__PURE__ */ jsx79(Text56, { color: theme.text.secondary, children: " \u2192" })
17787
+ showArrows && /* @__PURE__ */ jsx80(Text57, { color: theme.text.secondary, children: " \u2192" })
17669
17788
  ] });
17670
17789
  }
17671
17790
 
17672
17791
  // src/ui/components/dialogs/ask-user-dialog.tsx
17673
- import { jsx as jsx80, jsxs as jsxs61 } from "react/jsx-runtime";
17792
+ import { jsx as jsx81, jsxs as jsxs62 } from "react/jsx-runtime";
17674
17793
  var initialState2 = {
17675
17794
  currentQuestionIndex: 0,
17676
17795
  answers: {},
@@ -17784,8 +17903,8 @@ var ReviewView = ({
17784
17903
  },
17785
17904
  { isActive: true }
17786
17905
  );
17787
- return /* @__PURE__ */ jsxs61(
17788
- Box62,
17906
+ return /* @__PURE__ */ jsxs62(
17907
+ Box63,
17789
17908
  {
17790
17909
  flexDirection: "column",
17791
17910
  borderStyle: "round",
@@ -17793,19 +17912,19 @@ var ReviewView = ({
17793
17912
  borderColor: theme.border.default,
17794
17913
  children: [
17795
17914
  progressHeader,
17796
- /* @__PURE__ */ jsx80(Box62, { marginBottom: 1, children: /* @__PURE__ */ jsx80(Text57, { bold: true, color: theme.text.primary, children: "Review your answers:" }) }),
17797
- hasUnanswered && /* @__PURE__ */ jsx80(Box62, { marginBottom: 1, children: /* @__PURE__ */ jsxs61(Text57, { color: theme.status.warning, children: [
17915
+ /* @__PURE__ */ jsx81(Box63, { marginBottom: 1, children: /* @__PURE__ */ jsx81(Text58, { bold: true, color: theme.text.primary, children: "Review your answers:" }) }),
17916
+ hasUnanswered && /* @__PURE__ */ jsx81(Box63, { marginBottom: 1, children: /* @__PURE__ */ jsxs62(Text58, { color: theme.status.warning, children: [
17798
17917
  "\u26A0 You have ",
17799
17918
  unansweredCount,
17800
17919
  " unanswered question",
17801
17920
  unansweredCount > 1 ? "s" : ""
17802
17921
  ] }) }),
17803
- questions.map((q, i) => /* @__PURE__ */ jsxs61(Box62, { marginBottom: 0, children: [
17804
- /* @__PURE__ */ jsx80(Text57, { color: theme.text.secondary, children: q.header }),
17805
- /* @__PURE__ */ jsx80(Text57, { color: theme.text.secondary, children: " \u2192 " }),
17806
- /* @__PURE__ */ jsx80(Text57, { color: answers[i] ? theme.text.primary : theme.status.warning, children: (answers[i] ? formatAnswerForReview(q, answers[i]) : void 0) || "(not answered)" })
17922
+ questions.map((q, i) => /* @__PURE__ */ jsxs62(Box63, { marginBottom: 0, children: [
17923
+ /* @__PURE__ */ jsx81(Text58, { color: theme.text.secondary, children: q.header }),
17924
+ /* @__PURE__ */ jsx81(Text58, { color: theme.text.secondary, children: " \u2192 " }),
17925
+ /* @__PURE__ */ jsx81(Text58, { color: answers[i] ? theme.text.primary : theme.status.warning, children: (answers[i] ? formatAnswerForReview(q, answers[i]) : void 0) || "(not answered)" })
17807
17926
  ] }, i)),
17808
- /* @__PURE__ */ jsx80(Box62, { marginTop: 1, children: /* @__PURE__ */ jsx80(Text57, { color: theme.text.secondary, children: "Enter to submit \xB7 Tab/Shift+Tab to edit answers \xB7 Esc to cancel" }) })
17927
+ /* @__PURE__ */ jsx81(Box63, { marginTop: 1, children: /* @__PURE__ */ jsx81(Text58, { color: theme.text.secondary, children: "Enter to submit \xB7 Tab/Shift+Tab to edit answers \xB7 Esc to cancel" }) })
17809
17928
  ]
17810
17929
  }
17811
17930
  );
@@ -17870,8 +17989,8 @@ var TextQuestionView = ({
17870
17989
  };
17871
17990
  }, [onEditingCustomOption]);
17872
17991
  const placeholder = question.placeholder || "Enter your response";
17873
- return /* @__PURE__ */ jsxs61(
17874
- Box62,
17992
+ return /* @__PURE__ */ jsxs62(
17993
+ Box63,
17875
17994
  {
17876
17995
  flexDirection: "column",
17877
17996
  borderStyle: "round",
@@ -17879,11 +17998,11 @@ var TextQuestionView = ({
17879
17998
  borderColor: theme.border.default,
17880
17999
  children: [
17881
18000
  progressHeader,
17882
- /* @__PURE__ */ jsx80(Box62, { marginBottom: 1, children: /* @__PURE__ */ jsx80(Text57, { bold: true, color: theme.text.primary, children: question.question }) }),
17883
- question.detail && /* @__PURE__ */ jsx80(Box62, { marginBottom: 1, children: /* @__PURE__ */ jsx80(Text57, { color: theme.text.secondary, children: question.detail }) }),
17884
- /* @__PURE__ */ jsxs61(Box62, { flexDirection: "row", marginBottom: 1, children: [
17885
- /* @__PURE__ */ jsx80(Text57, { color: theme.text.accent, children: "> " }),
17886
- /* @__PURE__ */ jsx80(
18001
+ /* @__PURE__ */ jsx81(Box63, { marginBottom: 1, children: /* @__PURE__ */ jsx81(Text58, { bold: true, color: theme.text.primary, children: question.question }) }),
18002
+ question.detail && /* @__PURE__ */ jsx81(Box63, { marginBottom: 1, children: /* @__PURE__ */ jsx81(Text58, { color: theme.text.secondary, children: question.detail }) }),
18003
+ /* @__PURE__ */ jsxs62(Box63, { flexDirection: "row", marginBottom: 1, children: [
18004
+ /* @__PURE__ */ jsx81(Text58, { color: theme.text.accent, children: "> " }),
18005
+ /* @__PURE__ */ jsx81(
17887
18006
  TextInput,
17888
18007
  {
17889
18008
  buffer,
@@ -18178,8 +18297,8 @@ var ChoiceQuestionView = ({
18178
18297
  });
18179
18298
  }
18180
18299
  }, [customOptionText, isCustomOptionSelected, question.multiSelect]);
18181
- return /* @__PURE__ */ jsxs61(
18182
- Box62,
18300
+ return /* @__PURE__ */ jsxs62(
18301
+ Box63,
18183
18302
  {
18184
18303
  flexDirection: "column",
18185
18304
  borderStyle: "round",
@@ -18187,13 +18306,13 @@ var ChoiceQuestionView = ({
18187
18306
  borderColor: theme.border.default,
18188
18307
  children: [
18189
18308
  progressHeader,
18190
- /* @__PURE__ */ jsx80(Box62, { marginBottom: 1, children: /* @__PURE__ */ jsx80(Text57, { bold: true, color: theme.text.primary, children: question.question }) }),
18191
- question.detail && /* @__PURE__ */ jsx80(Box62, { marginBottom: 1, children: /* @__PURE__ */ jsx80(Text57, { color: theme.text.secondary, children: question.detail }) }),
18192
- question.multiSelect && /* @__PURE__ */ jsxs61(Text57, { color: theme.text.secondary, italic: true, children: [
18309
+ /* @__PURE__ */ jsx81(Box63, { marginBottom: 1, children: /* @__PURE__ */ jsx81(Text58, { bold: true, color: theme.text.primary, children: question.question }) }),
18310
+ question.detail && /* @__PURE__ */ jsx81(Box63, { marginBottom: 1, children: /* @__PURE__ */ jsx81(Text58, { color: theme.text.secondary, children: question.detail }) }),
18311
+ question.multiSelect && /* @__PURE__ */ jsxs62(Text58, { color: theme.text.secondary, italic: true, children: [
18193
18312
  " ",
18194
18313
  "(Select all that apply)"
18195
18314
  ] }),
18196
- /* @__PURE__ */ jsx80(
18315
+ /* @__PURE__ */ jsx81(
18197
18316
  BaseSelectionList,
18198
18317
  {
18199
18318
  items: selectionItems,
@@ -18206,9 +18325,9 @@ var ChoiceQuestionView = ({
18206
18325
  const showCheck = question.multiSelect && (optionItem.type === "option" || optionItem.type === "other");
18207
18326
  if (optionItem.type === "other") {
18208
18327
  const placeholder = "Enter a custom value";
18209
- return /* @__PURE__ */ jsxs61(Box62, { flexDirection: "row", children: [
18210
- showCheck && /* @__PURE__ */ jsxs61(
18211
- Text57,
18328
+ return /* @__PURE__ */ jsxs62(Box63, { flexDirection: "row", children: [
18329
+ showCheck && /* @__PURE__ */ jsxs62(
18330
+ Text58,
18212
18331
  {
18213
18332
  color: isChecked ? theme.text.accent : theme.text.secondary,
18214
18333
  children: [
@@ -18218,8 +18337,8 @@ var ChoiceQuestionView = ({
18218
18337
  ]
18219
18338
  }
18220
18339
  ),
18221
- /* @__PURE__ */ jsx80(Text57, { color: theme.text.primary, children: " " }),
18222
- /* @__PURE__ */ jsx80(
18340
+ /* @__PURE__ */ jsx81(Text58, { color: theme.text.primary, children: " " }),
18341
+ /* @__PURE__ */ jsx81(
18223
18342
  TextInput,
18224
18343
  {
18225
18344
  buffer: customBuffer,
@@ -18228,14 +18347,14 @@ var ChoiceQuestionView = ({
18228
18347
  onSubmit: () => handleSelect(optionItem)
18229
18348
  }
18230
18349
  ),
18231
- isChecked && !question.multiSelect && /* @__PURE__ */ jsx80(Text57, { color: theme.status.success, children: " \u2713" })
18350
+ isChecked && !question.multiSelect && /* @__PURE__ */ jsx81(Text58, { color: theme.status.success, children: " \u2713" })
18232
18351
  ] });
18233
18352
  }
18234
18353
  const labelColor = isChecked && !question.multiSelect ? theme.status.success : context.isSelected ? context.titleColor : theme.text.primary;
18235
- return /* @__PURE__ */ jsxs61(Box62, { flexDirection: "column", children: [
18236
- /* @__PURE__ */ jsxs61(Box62, { flexDirection: "row", children: [
18237
- showCheck && /* @__PURE__ */ jsxs61(
18238
- Text57,
18354
+ return /* @__PURE__ */ jsxs62(Box63, { flexDirection: "column", children: [
18355
+ /* @__PURE__ */ jsxs62(Box63, { flexDirection: "row", children: [
18356
+ showCheck && /* @__PURE__ */ jsxs62(
18357
+ Text58,
18239
18358
  {
18240
18359
  color: isChecked ? theme.text.accent : theme.text.secondary,
18241
18360
  children: [
@@ -18245,13 +18364,13 @@ var ChoiceQuestionView = ({
18245
18364
  ]
18246
18365
  }
18247
18366
  ),
18248
- /* @__PURE__ */ jsxs61(Text57, { color: labelColor, bold: optionItem.type === "done", children: [
18367
+ /* @__PURE__ */ jsxs62(Text58, { color: labelColor, bold: optionItem.type === "done", children: [
18249
18368
  " ",
18250
18369
  optionItem.label
18251
18370
  ] }),
18252
- isChecked && !question.multiSelect && /* @__PURE__ */ jsx80(Text57, { color: theme.status.success, children: " \u2713" })
18371
+ isChecked && !question.multiSelect && /* @__PURE__ */ jsx81(Text58, { color: theme.status.success, children: " \u2713" })
18253
18372
  ] }),
18254
- optionItem.description && /* @__PURE__ */ jsxs61(Text57, { color: theme.text.secondary, wrap: "wrap", children: [
18373
+ optionItem.description && /* @__PURE__ */ jsxs62(Text58, { color: theme.text.secondary, wrap: "wrap", children: [
18255
18374
  " ",
18256
18375
  optionItem.description
18257
18376
  ] })
@@ -18431,7 +18550,7 @@ var AskUserDialog = ({
18431
18550
  }
18432
18551
  return questionTabs;
18433
18552
  }, [questions]);
18434
- const progressHeader = questions.length > 1 ? /* @__PURE__ */ jsx80(
18553
+ const progressHeader = questions.length > 1 ? /* @__PURE__ */ jsx81(
18435
18554
  TabHeader,
18436
18555
  {
18437
18556
  tabs,
@@ -18440,7 +18559,7 @@ var AskUserDialog = ({
18440
18559
  }
18441
18560
  ) : null;
18442
18561
  if (isOnReviewTab) {
18443
- return /* @__PURE__ */ jsx80(
18562
+ return /* @__PURE__ */ jsx81(
18444
18563
  ReviewView,
18445
18564
  {
18446
18565
  questions,
@@ -18451,9 +18570,9 @@ var AskUserDialog = ({
18451
18570
  );
18452
18571
  }
18453
18572
  if (!currentQuestion) return null;
18454
- const keyboardHints = /* @__PURE__ */ jsx80(Box62, { marginTop: 1, children: /* @__PURE__ */ jsx80(Text57, { color: theme.text.secondary, children: currentQuestion.type === "text" || isEditingCustomOption ? questions.length > 1 ? "Enter to submit \xB7 Tab/Shift+Tab to switch questions \xB7 Esc to cancel" : "Enter to submit \xB7 Esc to cancel" : questions.length > 1 ? "Enter to select \xB7 \u2190/\u2192 to switch questions \xB7 Esc to cancel" : "Enter to select \xB7 \u2191/\u2193 to navigate \xB7 Esc to cancel" }) });
18573
+ const keyboardHints = /* @__PURE__ */ jsx81(Box63, { marginTop: 1, children: /* @__PURE__ */ jsx81(Text58, { color: theme.text.secondary, children: currentQuestion.type === "text" || isEditingCustomOption ? questions.length > 1 ? "Enter to submit \xB7 Tab/Shift+Tab to switch questions \xB7 Esc to cancel" : "Enter to submit \xB7 Esc to cancel" : questions.length > 1 ? "Enter to select \xB7 \u2190/\u2192 to switch questions \xB7 Esc to cancel" : "Enter to select \xB7 \u2191/\u2193 to navigate \xB7 Esc to cancel" }) });
18455
18574
  if (currentQuestion.type === "text") {
18456
- return /* @__PURE__ */ jsx80(
18575
+ return /* @__PURE__ */ jsx81(
18457
18576
  TextQuestionView,
18458
18577
  {
18459
18578
  question: currentQuestion,
@@ -18468,7 +18587,7 @@ var AskUserDialog = ({
18468
18587
  currentQuestionIndex
18469
18588
  );
18470
18589
  }
18471
- return /* @__PURE__ */ jsx80(
18590
+ return /* @__PURE__ */ jsx81(
18472
18591
  ChoiceQuestionView,
18473
18592
  {
18474
18593
  question: effectiveQuestion,
@@ -18485,7 +18604,7 @@ var AskUserDialog = ({
18485
18604
  };
18486
18605
 
18487
18606
  // src/ui/components/dialogs/user-question-queue.tsx
18488
- import { jsx as jsx81 } from "react/jsx-runtime";
18607
+ import { jsx as jsx82 } from "react/jsx-runtime";
18489
18608
  var UserQuestionQueue = () => {
18490
18609
  const { runtime, snapshot } = useUserQuestionRuntime();
18491
18610
  const request = snapshot.pending[0];
@@ -18508,7 +18627,7 @@ var UserQuestionQueue = () => {
18508
18627
  [request]
18509
18628
  );
18510
18629
  if (request === void 0) return null;
18511
- return /* @__PURE__ */ jsx81(
18630
+ return /* @__PURE__ */ jsx82(
18512
18631
  AskUserDialog,
18513
18632
  {
18514
18633
  questions: [...questions],
@@ -18531,7 +18650,7 @@ var UserQuestionQueue = () => {
18531
18650
  };
18532
18651
 
18533
18652
  // src/ui/components/layout/screen-reader-app-layout.tsx
18534
- import { jsx as jsx82, jsxs as jsxs62 } from "react/jsx-runtime";
18653
+ import { jsx as jsx83, jsxs as jsxs63 } from "react/jsx-runtime";
18535
18654
  var ScreenReaderAppLayout = () => {
18536
18655
  const uiState = useUIState();
18537
18656
  const { rootUiRef, terminalHeight } = uiState;
@@ -18540,18 +18659,18 @@ var ScreenReaderAppLayout = () => {
18540
18659
  const { snapshot: userQuestionSnapshot } = useUserQuestionRuntime();
18541
18660
  const pendingUserQuestion = userQuestionSnapshot.pending[0];
18542
18661
  useFlickerDetector(rootUiRef, terminalHeight);
18543
- return /* @__PURE__ */ jsxs62(
18544
- Box63,
18662
+ return /* @__PURE__ */ jsxs63(
18663
+ Box64,
18545
18664
  {
18546
18665
  flexDirection: "column",
18547
18666
  width: "90%",
18548
18667
  height: "100%",
18549
18668
  ref: uiState.rootUiRef,
18550
18669
  children: [
18551
- /* @__PURE__ */ jsx82(Notifications, {}),
18552
- /* @__PURE__ */ jsx82(Footer, {}),
18553
- /* @__PURE__ */ jsx82(Box63, { flexGrow: 1, overflow: "hidden", children: /* @__PURE__ */ jsx82(MainContent, {}) }),
18554
- pendingApproval !== void 0 ? /* @__PURE__ */ jsx82(
18670
+ /* @__PURE__ */ jsx83(Notifications, {}),
18671
+ /* @__PURE__ */ jsx83(Footer, {}),
18672
+ /* @__PURE__ */ jsx83(Box64, { flexGrow: 1, overflow: "hidden", children: /* @__PURE__ */ jsx83(MainContent, {}) }),
18673
+ pendingApproval !== void 0 ? /* @__PURE__ */ jsx83(
18555
18674
  ToolConfirmationQueue,
18556
18675
  {
18557
18676
  request: pendingApproval,
@@ -18560,34 +18679,34 @@ var ScreenReaderAppLayout = () => {
18560
18679
  terminalWidth: uiState.terminalWidth,
18561
18680
  respond: (response) => approvalRuntime.respond(pendingApproval.id, response)
18562
18681
  }
18563
- ) : pendingUserQuestion !== void 0 ? /* @__PURE__ */ jsx82(UserQuestionQueue, {}) : uiState.dialogsVisible ? /* @__PURE__ */ jsx82(
18682
+ ) : pendingUserQuestion !== void 0 ? /* @__PURE__ */ jsx83(UserQuestionQueue, {}) : uiState.dialogsVisible ? /* @__PURE__ */ jsx83(
18564
18683
  DialogManager,
18565
18684
  {
18566
18685
  terminalWidth: uiState.terminalWidth
18567
18686
  }
18568
- ) : /* @__PURE__ */ jsx82(Composer, {}),
18569
- /* @__PURE__ */ jsx82(ExitWarning, {})
18687
+ ) : /* @__PURE__ */ jsx83(Composer, {}),
18688
+ /* @__PURE__ */ jsx83(ExitWarning, {})
18570
18689
  ]
18571
18690
  }
18572
18691
  );
18573
18692
  };
18574
18693
 
18575
18694
  // src/ui/components/layout/default-app-layout.tsx
18576
- import { Box as Box65 } from "ink";
18695
+ import { Box as Box66 } from "ink";
18577
18696
 
18578
18697
  // src/ui/components/dialogs/copy-mode-warning.tsx
18579
- import { Box as Box64, Text as Text58 } from "ink";
18580
- import { jsx as jsx83 } from "react/jsx-runtime";
18698
+ import { Box as Box65, Text as Text59 } from "ink";
18699
+ import { jsx as jsx84 } from "react/jsx-runtime";
18581
18700
  var CopyModeWarning = () => {
18582
18701
  const { copyModeEnabled } = useUIState();
18583
18702
  if (!copyModeEnabled) {
18584
18703
  return null;
18585
18704
  }
18586
- return /* @__PURE__ */ jsx83(Box64, { children: /* @__PURE__ */ jsx83(Text58, { color: theme.status.warning, children: "In Copy Mode. Press any key to exit." }) });
18705
+ return /* @__PURE__ */ jsx84(Box65, { children: /* @__PURE__ */ jsx84(Text59, { color: theme.status.warning, children: "In Copy Mode. Press any key to exit." }) });
18587
18706
  };
18588
18707
 
18589
18708
  // src/ui/components/layout/default-app-layout.tsx
18590
- import { Fragment as Fragment14, jsx as jsx84, jsxs as jsxs63 } from "react/jsx-runtime";
18709
+ import { Fragment as Fragment14, jsx as jsx85, jsxs as jsxs64 } from "react/jsx-runtime";
18591
18710
  var DefaultAppLayout = () => {
18592
18711
  const uiState = useUIState();
18593
18712
  const isAlternateBuffer = useAlternateBuffer();
@@ -18597,8 +18716,8 @@ var DefaultAppLayout = () => {
18597
18716
  const pendingUserQuestion = userQuestionSnapshot.pending[0];
18598
18717
  const { rootUiRef, terminalHeight } = uiState;
18599
18718
  useFlickerDetector(rootUiRef, terminalHeight);
18600
- return /* @__PURE__ */ jsxs63(
18601
- Box65,
18719
+ return /* @__PURE__ */ jsxs64(
18720
+ Box66,
18602
18721
  {
18603
18722
  flexDirection: "column",
18604
18723
  width: uiState.terminalWidth,
@@ -18609,9 +18728,9 @@ var DefaultAppLayout = () => {
18609
18728
  overflow: "hidden",
18610
18729
  ref: uiState.rootUiRef,
18611
18730
  children: [
18612
- /* @__PURE__ */ jsx84(MainContent, {}),
18613
- /* @__PURE__ */ jsxs63(
18614
- Box65,
18731
+ /* @__PURE__ */ jsx85(MainContent, {}),
18732
+ /* @__PURE__ */ jsxs64(
18733
+ Box66,
18615
18734
  {
18616
18735
  flexDirection: "column",
18617
18736
  ref: uiState.mainControlsRef,
@@ -18619,10 +18738,10 @@ var DefaultAppLayout = () => {
18619
18738
  flexGrow: 0,
18620
18739
  width: uiState.terminalWidth,
18621
18740
  children: [
18622
- /* @__PURE__ */ jsx84(Notifications, {}),
18623
- /* @__PURE__ */ jsx84(CopyModeWarning, {}),
18624
- pendingApproval !== void 0 ? /* @__PURE__ */ jsxs63(Fragment14, { children: [
18625
- /* @__PURE__ */ jsx84(
18741
+ /* @__PURE__ */ jsx85(Notifications, {}),
18742
+ /* @__PURE__ */ jsx85(CopyModeWarning, {}),
18743
+ pendingApproval !== void 0 ? /* @__PURE__ */ jsxs64(Fragment14, { children: [
18744
+ /* @__PURE__ */ jsx85(
18626
18745
  ToolConfirmationQueue,
18627
18746
  {
18628
18747
  request: pendingApproval,
@@ -18632,14 +18751,14 @@ var DefaultAppLayout = () => {
18632
18751
  respond: (response) => approvalRuntime.respond(pendingApproval.id, response)
18633
18752
  }
18634
18753
  ),
18635
- /* @__PURE__ */ jsx84(Composer, { isFocused: false })
18636
- ] }) : pendingUserQuestion !== void 0 ? /* @__PURE__ */ jsx84(UserQuestionQueue, {}) : uiState.customDialog ? uiState.customDialog : uiState.dialogsVisible ? /* @__PURE__ */ jsx84(
18754
+ /* @__PURE__ */ jsx85(Composer, { isFocused: false })
18755
+ ] }) : pendingUserQuestion !== void 0 ? /* @__PURE__ */ jsx85(UserQuestionQueue, {}) : uiState.customDialog ? uiState.customDialog : uiState.dialogsVisible ? /* @__PURE__ */ jsx85(
18637
18756
  DialogManager,
18638
18757
  {
18639
18758
  terminalWidth: uiState.terminalWidth
18640
18759
  }
18641
- ) : /* @__PURE__ */ jsx84(Composer, { isFocused: true }),
18642
- /* @__PURE__ */ jsx84(ExitWarning, {})
18760
+ ) : /* @__PURE__ */ jsx85(Composer, { isFocused: true }),
18761
+ /* @__PURE__ */ jsx85(ExitWarning, {})
18643
18762
  ]
18644
18763
  }
18645
18764
  )
@@ -18649,23 +18768,23 @@ var DefaultAppLayout = () => {
18649
18768
  };
18650
18769
 
18651
18770
  // src/ui/components/indicators/alternate-buffer-quitting-display.tsx
18652
- import { Box as Box66, Text as Text59 } from "ink";
18653
- import { jsx as jsx85, jsxs as jsxs64 } from "react/jsx-runtime";
18771
+ import { Box as Box67, Text as Text60 } from "ink";
18772
+ import { jsx as jsx86, jsxs as jsxs65 } from "react/jsx-runtime";
18654
18773
  var AlternateBufferQuittingDisplay = () => {
18655
18774
  const { version } = useAppContext();
18656
18775
  const uiState = useUIState();
18657
18776
  const { snapshot: approvalSnapshot } = useApprovalRuntime();
18658
18777
  const pendingApproval = approvalSnapshot.pending[0];
18659
- return /* @__PURE__ */ jsxs64(
18660
- Box66,
18778
+ return /* @__PURE__ */ jsxs65(
18779
+ Box67,
18661
18780
  {
18662
18781
  flexDirection: "column",
18663
18782
  flexShrink: 0,
18664
18783
  flexGrow: 0,
18665
18784
  width: uiState.terminalWidth,
18666
18785
  children: [
18667
- /* @__PURE__ */ jsx85(AppHeader, { version }, "app-header"),
18668
- uiState.history.map((h) => /* @__PURE__ */ jsx85(
18786
+ /* @__PURE__ */ jsx86(AppHeader, { version }, "app-header"),
18787
+ uiState.history.map((h) => /* @__PURE__ */ jsx86(
18669
18788
  HistoryItemDisplay,
18670
18789
  {
18671
18790
  terminalWidth: uiState.mainAreaWidth,
@@ -18677,7 +18796,7 @@ var AlternateBufferQuittingDisplay = () => {
18677
18796
  },
18678
18797
  h.id
18679
18798
  )),
18680
- uiState.pendingHistoryItems.map((item, i) => /* @__PURE__ */ jsx85(
18799
+ uiState.pendingHistoryItems.map((item, i) => /* @__PURE__ */ jsx86(
18681
18800
  HistoryItemDisplay,
18682
18801
  {
18683
18802
  availableTerminalHeight: void 0,
@@ -18690,31 +18809,31 @@ var AlternateBufferQuittingDisplay = () => {
18690
18809
  },
18691
18810
  i
18692
18811
  )),
18693
- pendingApproval !== void 0 && /* @__PURE__ */ jsxs64(Box66, { flexDirection: "column", marginTop: 1, marginBottom: 1, children: [
18694
- /* @__PURE__ */ jsx85(Text59, { color: theme.status.warning, bold: true, children: "Action Required (was prompted):" }),
18695
- /* @__PURE__ */ jsx85(Text59, { color: theme.text.primary, children: pendingApproval.toolName }),
18696
- pendingApproval.reason !== void 0 && /* @__PURE__ */ jsx85(Text59, { color: theme.text.secondary, children: pendingApproval.reason })
18812
+ pendingApproval !== void 0 && /* @__PURE__ */ jsxs65(Box67, { flexDirection: "column", marginTop: 1, marginBottom: 1, children: [
18813
+ /* @__PURE__ */ jsx86(Text60, { color: theme.status.warning, bold: true, children: "Action Required (was prompted):" }),
18814
+ /* @__PURE__ */ jsx86(Text60, { color: theme.text.primary, children: pendingApproval.toolName }),
18815
+ pendingApproval.reason !== void 0 && /* @__PURE__ */ jsx86(Text60, { color: theme.text.secondary, children: pendingApproval.reason })
18697
18816
  ] }),
18698
- /* @__PURE__ */ jsx85(QuittingDisplay, {})
18817
+ /* @__PURE__ */ jsx86(QuittingDisplay, {})
18699
18818
  ]
18700
18819
  }
18701
18820
  );
18702
18821
  };
18703
18822
 
18704
18823
  // src/ui/app.tsx
18705
- import { jsx as jsx86 } from "react/jsx-runtime";
18824
+ import { jsx as jsx87 } from "react/jsx-runtime";
18706
18825
  var App = () => {
18707
18826
  const uiState = useUIState();
18708
18827
  const isAlternateBuffer = useAlternateBuffer();
18709
18828
  const isScreenReaderEnabled = useIsScreenReaderEnabled5();
18710
18829
  if (uiState.quittingMessages) {
18711
18830
  if (isAlternateBuffer) {
18712
- return /* @__PURE__ */ jsx86(StreamingContext.Provider, { value: uiState.streamingState, children: /* @__PURE__ */ jsx86(AlternateBufferQuittingDisplay, {}) });
18831
+ return /* @__PURE__ */ jsx87(StreamingContext.Provider, { value: uiState.streamingState, children: /* @__PURE__ */ jsx87(AlternateBufferQuittingDisplay, {}) });
18713
18832
  } else {
18714
- return /* @__PURE__ */ jsx86(QuittingDisplay, {});
18833
+ return /* @__PURE__ */ jsx87(QuittingDisplay, {});
18715
18834
  }
18716
18835
  }
18717
- return /* @__PURE__ */ jsx86(StreamingContext.Provider, { value: uiState.streamingState, children: isScreenReaderEnabled ? /* @__PURE__ */ jsx86(ScreenReaderAppLayout, {}) : /* @__PURE__ */ jsx86(DefaultAppLayout, {}) });
18836
+ return /* @__PURE__ */ jsx87(StreamingContext.Provider, { value: uiState.streamingState, children: isScreenReaderEnabled ? /* @__PURE__ */ jsx87(ScreenReaderAppLayout, {}) : /* @__PURE__ */ jsx87(DefaultAppLayout, {}) });
18718
18837
  };
18719
18838
 
18720
18839
  // src/ui/app-container.tsx
@@ -18858,6 +18977,17 @@ import { arch, platform as platform2, release } from "node:os";
18858
18977
  function modelSelectionLabel(selection) {
18859
18978
  return `${selection.provider}/${selection.model}`;
18860
18979
  }
18980
+ function modelReasoningEffortLabel(selection) {
18981
+ const reasoning = selection.reasoning;
18982
+ if (reasoning === void 0) return void 0;
18983
+ const selected = reasoning.selectedEffort;
18984
+ if (selected === void 0) {
18985
+ return reasoning.efforts.find(
18986
+ (effort) => effort.id === reasoning.defaultEffort
18987
+ )?.name ?? "Provider default";
18988
+ }
18989
+ return reasoning.efforts.find((effort) => effort.id === selected)?.name ?? selected;
18990
+ }
18861
18991
 
18862
18992
  // src/ui/commands/about-command.ts
18863
18993
  var aboutCommand = {
@@ -18948,272 +19078,17 @@ var vimCommand = {
18948
19078
  }
18949
19079
  };
18950
19080
 
18951
- // src/terminal/setup.ts
18952
- import { promises as fs9 } from "node:fs";
18953
- import * as os3 from "node:os";
18954
- import * as path11 from "node:path";
18955
- import { exec } from "node:child_process";
18956
- import { promisify } from "node:util";
18957
- var VSCODE_SHIFT_ENTER_SEQUENCE = "\\\r\n";
18958
- var execAsync = promisify(exec);
18959
- function stripJsonComments2(content) {
18960
- return content.replace(/^\s*\/\/.*$/gm, "");
18961
- }
18962
- function getTerminalProgram() {
18963
- const termProgram = process.env["TERM_PROGRAM"];
18964
- if (process.env["CURSOR_TRACE_ID"] || process.env["VSCODE_GIT_ASKPASS_MAIN"]?.toLowerCase().includes("cursor")) {
18965
- return "cursor";
18966
- }
18967
- if (process.env["VSCODE_GIT_ASKPASS_MAIN"]?.toLowerCase().includes("windsurf")) {
18968
- return "windsurf";
18969
- }
18970
- if (process.env["VSCODE_GIT_ASKPASS_MAIN"]?.toLowerCase().includes("antigravity")) {
18971
- return "antigravity";
18972
- }
18973
- if (termProgram === "vscode" || process.env["VSCODE_GIT_IPC_HANDLE"]) {
18974
- return "vscode";
18975
- }
18976
- return null;
18977
- }
18978
- async function detectTerminal() {
18979
- const envTerminal = getTerminalProgram();
18980
- if (envTerminal) {
18981
- return envTerminal;
18982
- }
18983
- if (os3.platform() !== "win32") {
18984
- try {
18985
- const { stdout } = await execAsync("ps -o comm= -p $PPID");
18986
- const parentName = stdout.trim();
18987
- if (parentName.includes("windsurf") || parentName.includes("Windsurf"))
18988
- return "windsurf";
18989
- if (parentName.includes("antigravity") || parentName.includes("Antigravity"))
18990
- return "antigravity";
18991
- if (parentName.includes("cursor") || parentName.includes("Cursor"))
18992
- return "cursor";
18993
- if (parentName.includes("code") || parentName.includes("Code"))
18994
- return "vscode";
18995
- } catch (error) {
18996
- debugLogger.debug("Parent process detection failed:", error);
18997
- }
18998
- }
18999
- return null;
19000
- }
19001
- async function backupFile(filePath) {
19002
- try {
19003
- const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
19004
- const backupPath = `${filePath}.backup.${timestamp}`;
19005
- await fs9.copyFile(filePath, backupPath);
19006
- } catch (error) {
19007
- debugLogger.warn(`Failed to create backup of ${filePath}:`, error);
19008
- }
19009
- }
19010
- function getVSCodeStyleConfigDir(appName) {
19011
- const platform4 = os3.platform();
19012
- if (platform4 === "darwin") {
19013
- return path11.join(
19014
- homedir(),
19015
- "Library",
19016
- "Application Support",
19017
- appName,
19018
- "User"
19019
- );
19020
- } else if (platform4 === "win32") {
19021
- if (!process.env["APPDATA"]) {
19022
- return null;
19023
- }
19024
- return path11.join(process.env["APPDATA"], appName, "User");
19025
- } else {
19026
- return path11.join(homedir(), ".config", appName, "User");
19027
- }
19028
- }
19029
- async function configureVSCodeStyle(terminalName, appName) {
19030
- const configDir = getVSCodeStyleConfigDir(appName);
19031
- if (!configDir) {
19032
- return {
19033
- success: false,
19034
- message: `Could not determine ${terminalName} config path on Windows: APPDATA environment variable is not set.`
19035
- };
19036
- }
19037
- const keybindingsFile = path11.join(configDir, "keybindings.json");
19038
- try {
19039
- await fs9.mkdir(configDir, { recursive: true });
19040
- let keybindings = [];
19041
- try {
19042
- const content = await fs9.readFile(keybindingsFile, "utf8");
19043
- await backupFile(keybindingsFile);
19044
- try {
19045
- const cleanContent = stripJsonComments2(content);
19046
- const parsedContent = JSON.parse(cleanContent);
19047
- if (!Array.isArray(parsedContent)) {
19048
- return {
19049
- success: false,
19050
- message: `${terminalName} keybindings.json exists but is not a valid JSON array. Please fix the file manually or delete it to allow automatic configuration.
19051
- File: ${keybindingsFile}`
19052
- };
19053
- }
19054
- keybindings = parsedContent;
19055
- } catch (parseError) {
19056
- return {
19057
- success: false,
19058
- message: `Failed to parse ${terminalName} keybindings.json. The file contains invalid JSON.
19059
- Please fix the file manually or delete it to allow automatic configuration.
19060
- File: ${keybindingsFile}
19061
- Error: ${parseError}`
19062
- };
19063
- }
19064
- } catch {
19065
- }
19066
- const shiftEnterBinding = {
19067
- key: "shift+enter",
19068
- command: "workbench.action.terminal.sendSequence",
19069
- when: "terminalFocus",
19070
- args: { text: VSCODE_SHIFT_ENTER_SEQUENCE }
19071
- };
19072
- const ctrlEnterBinding = {
19073
- key: "ctrl+enter",
19074
- command: "workbench.action.terminal.sendSequence",
19075
- when: "terminalFocus",
19076
- args: { text: VSCODE_SHIFT_ENTER_SEQUENCE }
19077
- };
19078
- const hasOurShiftEnter = keybindings.some((kb) => {
19079
- const binding = kb;
19080
- return binding.key === "shift+enter" && binding.command === "workbench.action.terminal.sendSequence" && binding.args?.text === "\\\r\n";
19081
- });
19082
- const hasOurCtrlEnter = keybindings.some((kb) => {
19083
- const binding = kb;
19084
- return binding.key === "ctrl+enter" && binding.command === "workbench.action.terminal.sendSequence" && binding.args?.text === "\\\r\n";
19085
- });
19086
- if (hasOurShiftEnter && hasOurCtrlEnter) {
19087
- return {
19088
- success: true,
19089
- message: `${terminalName} keybindings already configured.`
19090
- };
19091
- }
19092
- const existingShiftEnter = keybindings.find((kb) => {
19093
- const binding = kb;
19094
- return binding.key === "shift+enter";
19095
- });
19096
- const existingCtrlEnter = keybindings.find((kb) => {
19097
- const binding = kb;
19098
- return binding.key === "ctrl+enter";
19099
- });
19100
- if (existingShiftEnter || existingCtrlEnter) {
19101
- const messages = [];
19102
- if (existingShiftEnter && !hasOurShiftEnter) {
19103
- messages.push(`- Shift+Enter binding already exists`);
19104
- }
19105
- if (existingCtrlEnter && !hasOurCtrlEnter) {
19106
- messages.push(`- Ctrl+Enter binding already exists`);
19107
- }
19108
- if (messages.length > 0) {
19109
- return {
19110
- success: false,
19111
- message: `Existing keybindings detected. Will not modify to avoid conflicts.
19112
- ` + messages.join("\n") + `
19113
- Please check and modify manually if needed: ${keybindingsFile}`
19114
- };
19115
- }
19116
- }
19117
- if (!hasOurShiftEnter) keybindings.unshift(shiftEnterBinding);
19118
- if (!hasOurCtrlEnter) keybindings.unshift(ctrlEnterBinding);
19119
- await fs9.writeFile(keybindingsFile, JSON.stringify(keybindings, null, 4));
19120
- return {
19121
- success: true,
19122
- message: `Added Shift+Enter and Ctrl+Enter keybindings to ${terminalName}.
19123
- Modified: ${keybindingsFile}`,
19124
- requiresRestart: true
19125
- };
19126
- } catch (error) {
19127
- return {
19128
- success: false,
19129
- message: `Failed to configure ${terminalName}.
19130
- File: ${keybindingsFile}
19131
- Error: ${error}`
19132
- };
19133
- }
19134
- }
19135
- async function configureVSCode() {
19136
- return configureVSCodeStyle("VS Code", "Code");
19137
- }
19138
- async function configureCursor() {
19139
- return configureVSCodeStyle("Cursor", "Cursor");
19140
- }
19141
- async function configureWindsurf() {
19142
- return configureVSCodeStyle("Windsurf", "Windsurf");
19143
- }
19144
- async function configureAntigravity() {
19145
- return configureVSCodeStyle("Antigravity", "Antigravity");
19146
- }
19147
- async function terminalSetup() {
19148
- if (terminalCapabilityManager.isKittyProtocolEnabled()) {
19149
- return {
19150
- success: true,
19151
- message: "Your terminal is already configured for an optimal experience with multiline input (Shift+Enter and Ctrl+Enter)."
19152
- };
19153
- }
19154
- const terminal = await detectTerminal();
19155
- if (!terminal) {
19156
- return {
19157
- success: false,
19158
- message: "Could not detect terminal type. Supported terminals: VS Code, Cursor, Windsurf, and Antigravity."
19159
- };
19160
- }
19161
- switch (terminal) {
19162
- case "vscode":
19163
- return configureVSCode();
19164
- case "cursor":
19165
- return configureCursor();
19166
- case "windsurf":
19167
- return configureWindsurf();
19168
- case "antigravity":
19169
- return configureAntigravity();
19170
- default:
19171
- return {
19172
- success: false,
19173
- message: `Terminal "${terminal}" is not supported yet.`
19174
- };
19175
- }
19176
- }
19177
-
19178
- // src/ui/commands/terminal-setup-command.ts
19179
- var terminalSetupCommand = {
19180
- name: "terminal-setup",
19181
- description: "Configure terminal keybindings for multiline input (VS Code, Cursor, Windsurf)",
19182
- kind: "built-in" /* BUILT_IN */,
19183
- autoExecute: true,
19184
- action: async () => {
19185
- try {
19186
- const result = await terminalSetup();
19187
- let content = result.message;
19188
- if (result.requiresRestart) {
19189
- content += "\n\nPlease restart your terminal for the changes to take effect.";
19190
- }
19191
- return {
19192
- type: "message",
19193
- content,
19194
- messageType: result.success ? "info" : "error"
19195
- };
19196
- } catch (error) {
19197
- return {
19198
- type: "message",
19199
- content: `Failed to configure terminal: ${error}`,
19200
- messageType: "error"
19201
- };
19202
- }
19203
- }
19204
- };
19205
-
19206
19081
  // src/ui/commands/model-command.ts
19207
19082
  import React16 from "react";
19208
19083
 
19209
19084
  // src/ui/components/dialogs/model-dialog.tsx
19210
19085
  import { useCallback as useCallback32, useEffect as useEffect39, useMemo as useMemo28, useRef as useRef19, useState as useState36 } from "react";
19211
- import { Box as Box68, Text as Text61 } from "ink";
19086
+ import { Box as Box69, Text as Text62 } from "ink";
19212
19087
 
19213
19088
  // src/ui/components/dialogs/provider-setup-dialog.tsx
19214
19089
  import { useEffect as useEffect38, useRef as useRef18, useState as useState35 } from "react";
19215
- import { Box as Box67, Text as Text60 } from "ink";
19216
- import { jsx as jsx87, jsxs as jsxs65 } from "react/jsx-runtime";
19090
+ import { Box as Box68, Text as Text61 } from "ink";
19091
+ import { jsx as jsx88, jsxs as jsxs66 } from "react/jsx-runtime";
19217
19092
  function ProviderSetupDialog({
19218
19093
  runtime,
19219
19094
  provider,
@@ -19315,8 +19190,8 @@ function ProviderSetupDialog({
19315
19190
  const fieldLabel = credential.endsWith("_API_KEY") ? "API key" : "Credential";
19316
19191
  const canWrite = view?.writable === true;
19317
19192
  const isReadOnly = view !== void 0 && view.status !== "unsupported" && view.status !== "error" && !view.writable;
19318
- return /* @__PURE__ */ jsxs65(
19319
- Box67,
19193
+ return /* @__PURE__ */ jsxs66(
19194
+ Box68,
19320
19195
  {
19321
19196
  borderStyle: "round",
19322
19197
  borderColor: theme.border.default,
@@ -19325,45 +19200,45 @@ function ProviderSetupDialog({
19325
19200
  paddingY: 1,
19326
19201
  width: "100%",
19327
19202
  children: [
19328
- /* @__PURE__ */ jsxs65(Box67, { justifyContent: "space-between", children: [
19329
- /* @__PURE__ */ jsxs65(Text60, { bold: true, color: theme.text.accent, children: [
19203
+ /* @__PURE__ */ jsxs66(Box68, { justifyContent: "space-between", children: [
19204
+ /* @__PURE__ */ jsxs66(Text61, { bold: true, color: theme.text.accent, children: [
19330
19205
  "Configure ",
19331
19206
  label
19332
19207
  ] }),
19333
- /* @__PURE__ */ jsxs65(Text60, { color: theme.text.secondary, children: [
19334
- /* @__PURE__ */ jsx87(Text60, { bold: true, color: theme.text.primary, children: "Esc" }),
19208
+ /* @__PURE__ */ jsxs66(Text61, { color: theme.text.secondary, children: [
19209
+ /* @__PURE__ */ jsx88(Text61, { bold: true, color: theme.text.primary, children: "Esc" }),
19335
19210
  " ",
19336
19211
  reason === "first-run" ? "Cancel" : "Close"
19337
19212
  ] })
19338
19213
  ] }),
19339
- /* @__PURE__ */ jsxs65(Box67, { marginTop: 1, flexDirection: "column", children: [
19340
- /* @__PURE__ */ jsx87(Text60, { color: theme.text.primary, children: reason === "first-run" ? `Enter your ${label} API key to continue.` : `Enter a replacement credential for ${label}.` }),
19341
- /* @__PURE__ */ jsxs65(Text60, { color: theme.text.secondary, children: [
19214
+ /* @__PURE__ */ jsxs66(Box68, { marginTop: 1, flexDirection: "column", children: [
19215
+ /* @__PURE__ */ jsx88(Text61, { color: theme.text.primary, children: reason === "first-run" ? `Enter your ${label} API key to continue.` : `Enter a replacement credential for ${label}.` }),
19216
+ /* @__PURE__ */ jsxs66(Text61, { color: theme.text.secondary, children: [
19342
19217
  "Alternatively, set ",
19343
19218
  credential,
19344
19219
  " before starting DSH Console."
19345
19220
  ] })
19346
19221
  ] }),
19347
- !view && !error && /* @__PURE__ */ jsx87(Box67, { marginTop: 1, children: /* @__PURE__ */ jsx87(Text60, { color: theme.text.secondary, children: "Checking provider setup..." }) }),
19348
- view?.status === "configured" && /* @__PURE__ */ jsx87(Box67, { marginTop: 1, children: /* @__PURE__ */ jsxs65(Text60, { color: theme.status.success, children: [
19222
+ !view && !error && /* @__PURE__ */ jsx88(Box68, { marginTop: 1, children: /* @__PURE__ */ jsx88(Text61, { color: theme.text.secondary, children: "Checking provider setup..." }) }),
19223
+ view?.status === "configured" && /* @__PURE__ */ jsx88(Box68, { marginTop: 1, children: /* @__PURE__ */ jsxs66(Text61, { color: theme.status.success, children: [
19349
19224
  "Configured from ",
19350
19225
  view.source ?? "DSH credential storage",
19351
19226
  "."
19352
19227
  ] }) }),
19353
- (view?.status === "unsupported" || view?.status === "error") && view.message && /* @__PURE__ */ jsx87(Box67, { marginTop: 1, children: /* @__PURE__ */ jsx87(Text60, { color: theme.status.warning, children: view.message }) }),
19354
- isReadOnly && /* @__PURE__ */ jsx87(Box67, { marginTop: 1, children: /* @__PURE__ */ jsxs65(Text60, { color: theme.status.warning, children: [
19228
+ (view?.status === "unsupported" || view?.status === "error") && view.message && /* @__PURE__ */ jsx88(Box68, { marginTop: 1, children: /* @__PURE__ */ jsx88(Text61, { color: theme.status.warning, children: view.message }) }),
19229
+ isReadOnly && /* @__PURE__ */ jsx88(Box68, { marginTop: 1, children: /* @__PURE__ */ jsxs66(Text61, { color: theme.status.warning, children: [
19355
19230
  credential,
19356
19231
  " is supplied by a read-only source. Change that source and restart DSH Console."
19357
19232
  ] }) }),
19358
- canWrite && /* @__PURE__ */ jsxs65(Box67, { marginTop: 1, flexDirection: "column", children: [
19359
- /* @__PURE__ */ jsx87(Text60, { bold: true, color: theme.text.primary, children: fieldLabel }),
19360
- /* @__PURE__ */ jsx87(
19361
- Box67,
19233
+ canWrite && /* @__PURE__ */ jsxs66(Box68, { marginTop: 1, flexDirection: "column", children: [
19234
+ /* @__PURE__ */ jsx88(Text61, { bold: true, color: theme.text.primary, children: fieldLabel }),
19235
+ /* @__PURE__ */ jsx88(
19236
+ Box68,
19362
19237
  {
19363
19238
  borderStyle: "single",
19364
19239
  borderColor: saving ? theme.border.default : theme.text.accent,
19365
19240
  paddingX: 1,
19366
- children: /* @__PURE__ */ jsx87(Text60, { color: theme.text.primary, children: secret.length === 0 ? /* @__PURE__ */ jsxs65(Text60, { color: theme.text.secondary, children: [
19241
+ children: /* @__PURE__ */ jsx88(Text61, { color: theme.text.primary, children: secret.length === 0 ? /* @__PURE__ */ jsxs66(Text61, { color: theme.text.secondary, children: [
19367
19242
  "Paste your ",
19368
19243
  label,
19369
19244
  " API key"
@@ -19371,37 +19246,37 @@ function ProviderSetupDialog({
19371
19246
  }
19372
19247
  )
19373
19248
  ] }),
19374
- error && /* @__PURE__ */ jsx87(Box67, { marginTop: 1, children: /* @__PURE__ */ jsx87(Text60, { color: theme.status.error, children: error }) }),
19375
- canWrite ? /* @__PURE__ */ jsxs65(Box67, { marginTop: 1, flexDirection: "column", children: [
19376
- /* @__PURE__ */ jsx87(Text60, { color: theme.text.secondary, children: "Stored through the configured DSH credential service. Never added to prompts, sessions, history, or logs." }),
19377
- /* @__PURE__ */ jsxs65(Box67, { marginTop: 1, children: [
19378
- /* @__PURE__ */ jsx87(Text60, { bold: true, color: theme.text.accent, children: "Enter" }),
19379
- /* @__PURE__ */ jsx87(Text60, { color: theme.text.primary, children: " Save and continue" }),
19380
- /* @__PURE__ */ jsx87(Text60, { color: theme.text.secondary, children: " " }),
19381
- /* @__PURE__ */ jsx87(Text60, { bold: true, color: theme.text.primary, children: "Esc" }),
19382
- /* @__PURE__ */ jsxs65(Text60, { color: theme.text.secondary, children: [
19249
+ error && /* @__PURE__ */ jsx88(Box68, { marginTop: 1, children: /* @__PURE__ */ jsx88(Text61, { color: theme.status.error, children: error }) }),
19250
+ canWrite ? /* @__PURE__ */ jsxs66(Box68, { marginTop: 1, flexDirection: "column", children: [
19251
+ /* @__PURE__ */ jsx88(Text61, { color: theme.text.secondary, children: "Stored through the configured DSH credential service. Never added to prompts, sessions, history, or logs." }),
19252
+ /* @__PURE__ */ jsxs66(Box68, { marginTop: 1, children: [
19253
+ /* @__PURE__ */ jsx88(Text61, { bold: true, color: theme.text.accent, children: "Enter" }),
19254
+ /* @__PURE__ */ jsx88(Text61, { color: theme.text.primary, children: " Save and continue" }),
19255
+ /* @__PURE__ */ jsx88(Text61, { color: theme.text.secondary, children: " " }),
19256
+ /* @__PURE__ */ jsx88(Text61, { bold: true, color: theme.text.primary, children: "Esc" }),
19257
+ /* @__PURE__ */ jsxs66(Text61, { color: theme.text.secondary, children: [
19383
19258
  " ",
19384
19259
  reason === "first-run" ? "Cancel" : "Close"
19385
19260
  ] }),
19386
- /* @__PURE__ */ jsx87(Text60, { color: theme.text.secondary, children: " " }),
19387
- /* @__PURE__ */ jsx87(Text60, { bold: true, color: theme.text.primary, children: "Ctrl+C" }),
19388
- /* @__PURE__ */ jsxs65(Text60, { color: theme.text.secondary, children: [
19261
+ /* @__PURE__ */ jsx88(Text61, { color: theme.text.secondary, children: " " }),
19262
+ /* @__PURE__ */ jsx88(Text61, { bold: true, color: theme.text.primary, children: "Ctrl+C" }),
19263
+ /* @__PURE__ */ jsxs66(Text61, { color: theme.text.secondary, children: [
19389
19264
  " ",
19390
19265
  secret.length > 0 ? "Clear" : "Cancel"
19391
19266
  ] })
19392
19267
  ] })
19393
- ] }) : /* @__PURE__ */ jsxs65(Box67, { marginTop: 1, children: [
19394
- /* @__PURE__ */ jsx87(Text60, { bold: true, color: theme.text.primary, children: "Esc" }),
19395
- /* @__PURE__ */ jsx87(Text60, { color: theme.text.secondary, children: " Close" })
19268
+ ] }) : /* @__PURE__ */ jsxs66(Box68, { marginTop: 1, children: [
19269
+ /* @__PURE__ */ jsx88(Text61, { bold: true, color: theme.text.primary, children: "Esc" }),
19270
+ /* @__PURE__ */ jsx88(Text61, { color: theme.text.secondary, children: " Close" })
19396
19271
  ] }),
19397
- saving && /* @__PURE__ */ jsx87(Text60, { bold: true, color: theme.text.accent, children: "Saving credential..." })
19272
+ saving && /* @__PURE__ */ jsx88(Text61, { bold: true, color: theme.text.accent, children: "Saving credential..." })
19398
19273
  ]
19399
19274
  }
19400
19275
  );
19401
19276
  }
19402
19277
 
19403
19278
  // src/ui/components/dialogs/model-dialog.tsx
19404
- import { Fragment as Fragment15, jsx as jsx88, jsxs as jsxs66 } from "react/jsx-runtime";
19279
+ import { Fragment as Fragment15, jsx as jsx89, jsxs as jsxs67 } from "react/jsx-runtime";
19405
19280
  function capabilityLabel(model) {
19406
19281
  return model.inputModalities.includes("image") ? "Text + Vision" : "Text";
19407
19282
  }
@@ -19421,6 +19296,7 @@ function ModelDialog({
19421
19296
  const [checkingProvider, setCheckingProvider] = useState36(false);
19422
19297
  const [error, setError] = useState36();
19423
19298
  const [setupSelection, setSetupSelection] = useState36();
19299
+ const [reasoningSelection, setReasoningSelection] = useState36();
19424
19300
  const providerCheckRef = useRef19(void 0);
19425
19301
  useEffect39(() => {
19426
19302
  const controller = new AbortController();
@@ -19468,7 +19344,11 @@ function ModelDialog({
19468
19344
  setSwitching(true);
19469
19345
  setError(void 0);
19470
19346
  try {
19471
- const activated = await runtime.setModel(selection.provider, selection.model);
19347
+ const activated = await runtime.setModel({
19348
+ provider: selection.provider,
19349
+ model: selection.model,
19350
+ ...selection.reasoning?.selectedEffort === void 0 ? {} : { reasoningEffort: selection.reasoning.selectedEffort }
19351
+ });
19472
19352
  onSwitched(activated);
19473
19353
  } catch (cause) {
19474
19354
  setError(cause instanceof Error ? cause.message : String(cause));
@@ -19481,7 +19361,7 @@ function ModelDialog({
19481
19361
  );
19482
19362
  const finishSelection = useCallback32(
19483
19363
  (selection) => {
19484
- if (selection.provider === current.provider && selection.model === current.model) {
19364
+ if (selection.provider === current.provider && selection.model === current.model && selection.reasoning?.selectedEffort === current.reasoning?.selectedEffort) {
19485
19365
  onClose();
19486
19366
  return;
19487
19367
  }
@@ -19491,7 +19371,24 @@ function ModelDialog({
19491
19371
  }
19492
19372
  void switchModel(selection);
19493
19373
  },
19494
- [current.model, current.provider, onClose, runtime, switchModel]
19374
+ [
19375
+ current.model,
19376
+ current.provider,
19377
+ current.reasoning?.selectedEffort,
19378
+ onClose,
19379
+ runtime,
19380
+ switchModel
19381
+ ]
19382
+ );
19383
+ const continueSelection = useCallback32(
19384
+ (selection) => {
19385
+ if (selection.reasoning?.efforts.length) {
19386
+ setReasoningSelection(selection);
19387
+ return;
19388
+ }
19389
+ finishSelection(selection);
19390
+ },
19391
+ [finishSelection]
19495
19392
  );
19496
19393
  const selectModel = useCallback32(
19497
19394
  async (selection) => {
@@ -19529,9 +19426,9 @@ function ModelDialog({
19529
19426
  }
19530
19427
  }
19531
19428
  }
19532
- finishSelection(selection);
19429
+ continueSelection(selection);
19533
19430
  },
19534
- [finishSelection, providerSetupRuntime]
19431
+ [continueSelection, providerSetupRuntime]
19535
19432
  );
19536
19433
  useKeypress(
19537
19434
  (key) => {
@@ -19541,12 +19438,13 @@ function ModelDialog({
19541
19438
  return;
19542
19439
  }
19543
19440
  if (pending) setPending(void 0);
19441
+ else if (reasoningSelection) setReasoningSelection(void 0);
19544
19442
  else onClose();
19545
19443
  },
19546
19444
  { isActive: setupSelection === void 0 }
19547
19445
  );
19548
19446
  if (setupSelection) {
19549
- return /* @__PURE__ */ jsx88(
19447
+ return /* @__PURE__ */ jsx89(
19550
19448
  ProviderSetupDialog,
19551
19449
  {
19552
19450
  runtime: providerSetupRuntime,
@@ -19555,13 +19453,87 @@ function ModelDialog({
19555
19453
  onConfigured: () => {
19556
19454
  const selection = setupSelection;
19557
19455
  setSetupSelection(void 0);
19558
- finishSelection(selection);
19456
+ continueSelection(selection);
19559
19457
  }
19560
19458
  }
19561
19459
  );
19562
19460
  }
19563
- return /* @__PURE__ */ jsxs66(
19564
- Box68,
19461
+ if (reasoningSelection?.reasoning) {
19462
+ const reasoning = reasoningSelection.reasoning;
19463
+ const defaultName = reasoning.efforts.find(
19464
+ (effort) => effort.id === reasoning.defaultEffort
19465
+ )?.name;
19466
+ const selectedEffort = reasoningSelection.provider === current.provider && reasoningSelection.model === current.model ? current.reasoning?.selectedEffort : void 0;
19467
+ const effortItems = [
19468
+ {
19469
+ key: "provider-default",
19470
+ value: void 0,
19471
+ label: `Provider default${defaultName ? ` (${defaultName})` : ""}`
19472
+ },
19473
+ ...reasoning.efforts.map((effort) => ({
19474
+ key: effort.id,
19475
+ value: effort.id,
19476
+ label: effort.name
19477
+ }))
19478
+ ];
19479
+ const initialEffortIndex = Math.max(
19480
+ 0,
19481
+ effortItems.findIndex((item) => item.value === selectedEffort)
19482
+ );
19483
+ return /* @__PURE__ */ jsxs67(
19484
+ Box69,
19485
+ {
19486
+ borderStyle: "round",
19487
+ borderColor: theme.border.default,
19488
+ flexDirection: "column",
19489
+ paddingX: 1,
19490
+ paddingY: 1,
19491
+ width: "100%",
19492
+ children: [
19493
+ /* @__PURE__ */ jsxs67(Box69, { justifyContent: "space-between", children: [
19494
+ /* @__PURE__ */ jsx89(Text62, { bold: true, color: theme.text.primary, children: "Select Reasoning Effort" }),
19495
+ /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Esc to models" })
19496
+ ] }),
19497
+ /* @__PURE__ */ jsxs67(Box69, { marginTop: 1, flexDirection: "row", children: [
19498
+ /* @__PURE__ */ jsx89(Box69, { width: "55%", paddingRight: 2, flexDirection: "column", children: /* @__PURE__ */ jsx89(
19499
+ RadioButtonSelect,
19500
+ {
19501
+ items: effortItems,
19502
+ initialIndex: initialEffortIndex,
19503
+ onSelect: (reasoningEffort) => {
19504
+ setReasoningSelection(void 0);
19505
+ finishSelection({
19506
+ ...reasoningSelection,
19507
+ reasoning: {
19508
+ ...reasoning,
19509
+ ...reasoningEffort === void 0 ? { selectedEffort: void 0 } : { selectedEffort: reasoningEffort }
19510
+ }
19511
+ });
19512
+ },
19513
+ isFocused: !switching,
19514
+ showNumbers: false
19515
+ }
19516
+ ) }),
19517
+ /* @__PURE__ */ jsxs67(Box69, { width: "45%", paddingLeft: 2, flexDirection: "column", children: [
19518
+ /* @__PURE__ */ jsx89(Text62, { bold: true, color: theme.text.primary, children: reasoningSelection.name }),
19519
+ /* @__PURE__ */ jsxs67(Box69, { marginTop: 1, flexDirection: "column", children: [
19520
+ /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Current choice" }),
19521
+ /* @__PURE__ */ jsx89(Text62, { children: modelReasoningEffortLabel({
19522
+ ...reasoningSelection,
19523
+ reasoning: { ...reasoning, selectedEffort }
19524
+ }) }),
19525
+ /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Behavior" }),
19526
+ /* @__PURE__ */ jsx89(Text62, { wrap: "wrap", children: "Provider default follows the model adapter. An explicit effort remains fixed for this Agent and future Sessions." })
19527
+ ] })
19528
+ ] })
19529
+ ] }),
19530
+ /* @__PURE__ */ jsx89(Box69, { marginTop: 1, children: /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Use \u2191/\u2193 to navigate and Enter to select." }) })
19531
+ ]
19532
+ }
19533
+ );
19534
+ }
19535
+ return /* @__PURE__ */ jsxs67(
19536
+ Box69,
19565
19537
  {
19566
19538
  borderStyle: "round",
19567
19539
  borderColor: theme.border.default,
@@ -19570,13 +19542,13 @@ function ModelDialog({
19570
19542
  paddingY: 1,
19571
19543
  width: "100%",
19572
19544
  children: [
19573
- /* @__PURE__ */ jsxs66(Box68, { justifyContent: "space-between", children: [
19574
- /* @__PURE__ */ jsx88(Text61, { bold: true, color: theme.text.primary, children: "Select DSH Model" }),
19575
- /* @__PURE__ */ jsx88(Text61, { color: theme.text.secondary, children: "Esc to close" })
19545
+ /* @__PURE__ */ jsxs67(Box69, { justifyContent: "space-between", children: [
19546
+ /* @__PURE__ */ jsx89(Text62, { bold: true, color: theme.text.primary, children: "Select DSH Model" }),
19547
+ /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Esc to close" })
19576
19548
  ] }),
19577
- error && /* @__PURE__ */ jsx88(Box68, { marginTop: 1, children: /* @__PURE__ */ jsx88(Text61, { color: theme.status.error, children: error }) }),
19578
- loading ? /* @__PURE__ */ jsx88(Box68, { marginTop: 1, children: /* @__PURE__ */ jsx88(Text61, { color: theme.text.secondary, children: "Loading models..." }) }) : models.length === 0 ? /* @__PURE__ */ jsx88(Box68, { marginTop: 1, children: /* @__PURE__ */ jsx88(Text61, { color: theme.status.warning, children: "No DSH models are available." }) }) : /* @__PURE__ */ jsxs66(Box68, { flexDirection: "row", marginTop: 1, children: [
19579
- /* @__PURE__ */ jsx88(Box68, { width: "55%", paddingRight: 2, flexDirection: "column", children: /* @__PURE__ */ jsx88(
19549
+ error && /* @__PURE__ */ jsx89(Box69, { marginTop: 1, children: /* @__PURE__ */ jsx89(Text62, { color: theme.status.error, children: error }) }),
19550
+ loading ? /* @__PURE__ */ jsx89(Box69, { marginTop: 1, children: /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Loading models..." }) }) : models.length === 0 ? /* @__PURE__ */ jsx89(Box69, { marginTop: 1, children: /* @__PURE__ */ jsx89(Text62, { color: theme.status.warning, children: "No DSH models are available." }) }) : /* @__PURE__ */ jsxs67(Box69, { flexDirection: "row", marginTop: 1, children: [
19551
+ /* @__PURE__ */ jsx89(Box69, { width: "55%", paddingRight: 2, flexDirection: "column", children: /* @__PURE__ */ jsx89(
19580
19552
  RadioButtonSelect,
19581
19553
  {
19582
19554
  items,
@@ -19589,28 +19561,28 @@ function ModelDialog({
19589
19561
  renderItem: (item, { titleColor }) => {
19590
19562
  const model = item.value;
19591
19563
  const isCurrent = model.provider === current.provider && model.model === current.model;
19592
- return /* @__PURE__ */ jsxs66(Text61, { color: titleColor, wrap: "truncate", children: [
19564
+ return /* @__PURE__ */ jsxs67(Text62, { color: titleColor, wrap: "truncate", children: [
19593
19565
  model.name,
19594
19566
  " ",
19595
- /* @__PURE__ */ jsx88(Text61, { color: theme.text.secondary, children: model.provider }),
19596
- model.inputModalities.includes("image") && /* @__PURE__ */ jsx88(Text61, { color: theme.status.success, children: " Vision" }),
19597
- isCurrent && /* @__PURE__ */ jsx88(Text61, { color: theme.text.accent, children: " Current" })
19567
+ /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: model.provider }),
19568
+ model.inputModalities.includes("image") && /* @__PURE__ */ jsx89(Text62, { color: theme.status.success, children: " Vision" }),
19569
+ isCurrent && /* @__PURE__ */ jsx89(Text62, { color: theme.text.accent, children: " Current" })
19598
19570
  ] });
19599
19571
  }
19600
19572
  },
19601
19573
  items.map((item) => item.key).join("|")
19602
19574
  ) }),
19603
- /* @__PURE__ */ jsx88(Box68, { width: "45%", paddingLeft: 2, flexDirection: "column", children: pending ? /* @__PURE__ */ jsxs66(Fragment15, { children: [
19604
- /* @__PURE__ */ jsx88(Text61, { bold: true, color: theme.status.warning, children: "Start a new Session?" }),
19605
- /* @__PURE__ */ jsxs66(Box68, { marginTop: 1, flexDirection: "column", children: [
19606
- /* @__PURE__ */ jsxs66(Text61, { children: [
19575
+ /* @__PURE__ */ jsx89(Box69, { width: "45%", paddingLeft: 2, flexDirection: "column", children: pending ? /* @__PURE__ */ jsxs67(Fragment15, { children: [
19576
+ /* @__PURE__ */ jsx89(Text62, { bold: true, color: theme.status.warning, children: "Start a new Session?" }),
19577
+ /* @__PURE__ */ jsxs67(Box69, { marginTop: 1, flexDirection: "column", children: [
19578
+ /* @__PURE__ */ jsxs67(Text62, { children: [
19607
19579
  "Changing to ",
19608
19580
  pending.name,
19609
19581
  " creates a new DSH Agent and Session."
19610
19582
  ] }),
19611
- /* @__PURE__ */ jsx88(Text61, { color: theme.text.secondary, children: "The existing transcript remains visible but is not sent to the new model." })
19583
+ /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "The existing transcript remains visible but is not sent to the new model." })
19612
19584
  ] }),
19613
- /* @__PURE__ */ jsx88(Box68, { marginTop: 1, children: /* @__PURE__ */ jsx88(
19585
+ /* @__PURE__ */ jsx89(Box69, { marginTop: 1, children: /* @__PURE__ */ jsx89(
19614
19586
  RadioButtonSelect,
19615
19587
  {
19616
19588
  items: [
@@ -19625,21 +19597,23 @@ function ModelDialog({
19625
19597
  showNumbers: false
19626
19598
  }
19627
19599
  ) })
19628
- ] }) : /* @__PURE__ */ jsxs66(Fragment15, { children: [
19629
- /* @__PURE__ */ jsx88(Text61, { bold: true, color: theme.text.primary, children: highlighted.name }),
19630
- /* @__PURE__ */ jsxs66(Box68, { marginTop: 1, flexDirection: "column", children: [
19631
- /* @__PURE__ */ jsx88(Text61, { color: theme.text.secondary, children: "Provider" }),
19632
- /* @__PURE__ */ jsx88(Text61, { children: highlighted.provider }),
19633
- /* @__PURE__ */ jsx88(Text61, { color: theme.text.secondary, children: "Model ID" }),
19634
- /* @__PURE__ */ jsx88(Text61, { wrap: "wrap", children: highlighted.model }),
19635
- /* @__PURE__ */ jsx88(Text61, { color: theme.text.secondary, children: "Input" }),
19636
- /* @__PURE__ */ jsx88(Text61, { color: highlighted.inputModalities.includes("image") ? theme.status.success : theme.text.primary, children: capabilityLabel(highlighted) })
19600
+ ] }) : /* @__PURE__ */ jsxs67(Fragment15, { children: [
19601
+ /* @__PURE__ */ jsx89(Text62, { bold: true, color: theme.text.primary, children: highlighted.name }),
19602
+ /* @__PURE__ */ jsxs67(Box69, { marginTop: 1, flexDirection: "column", children: [
19603
+ /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Provider" }),
19604
+ /* @__PURE__ */ jsx89(Text62, { children: highlighted.provider }),
19605
+ /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Model ID" }),
19606
+ /* @__PURE__ */ jsx89(Text62, { wrap: "wrap", children: highlighted.model }),
19607
+ /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Input" }),
19608
+ /* @__PURE__ */ jsx89(Text62, { color: highlighted.inputModalities.includes("image") ? theme.status.success : theme.text.primary, children: capabilityLabel(highlighted) }),
19609
+ /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Context window" }),
19610
+ /* @__PURE__ */ jsx89(Text62, { children: highlighted.contextWindow === void 0 ? "Not disclosed" : `${formatTokenCount(highlighted.contextWindow)} tokens` })
19637
19611
  ] }),
19638
- switching && /* @__PURE__ */ jsx88(Box68, { marginTop: 1, children: /* @__PURE__ */ jsx88(Text61, { color: theme.text.accent, children: "Creating new Agent..." }) }),
19639
- checkingProvider && /* @__PURE__ */ jsx88(Box68, { marginTop: 1, children: /* @__PURE__ */ jsx88(Text61, { color: theme.text.accent, children: "Checking provider setup..." }) })
19612
+ switching && /* @__PURE__ */ jsx89(Box69, { marginTop: 1, children: /* @__PURE__ */ jsx89(Text62, { color: theme.text.accent, children: "Creating new Agent..." }) }),
19613
+ checkingProvider && /* @__PURE__ */ jsx89(Box69, { marginTop: 1, children: /* @__PURE__ */ jsx89(Text62, { color: theme.text.accent, children: "Checking provider setup..." }) })
19640
19614
  ] }) })
19641
19615
  ] }),
19642
- /* @__PURE__ */ jsx88(Box68, { marginTop: 1, children: /* @__PURE__ */ jsx88(Text61, { color: theme.text.secondary, children: "Use \u2191/\u2193 to navigate and Enter to select." }) })
19616
+ /* @__PURE__ */ jsx89(Box69, { marginTop: 1, children: /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Use \u2191/\u2193 to navigate and Enter to select." }) })
19643
19617
  ]
19644
19618
  }
19645
19619
  );
@@ -19686,8 +19660,8 @@ import React17 from "react";
19686
19660
 
19687
19661
  // src/ui/components/dialogs/provider-dialog.tsx
19688
19662
  import { useEffect as useEffect40, useMemo as useMemo29, useState as useState37 } from "react";
19689
- import { Box as Box69, Text as Text62 } from "ink";
19690
- import { Fragment as Fragment16, jsx as jsx89, jsxs as jsxs67 } from "react/jsx-runtime";
19663
+ import { Box as Box70, Text as Text63 } from "ink";
19664
+ import { Fragment as Fragment16, jsx as jsx90, jsxs as jsxs68 } from "react/jsx-runtime";
19691
19665
  function statusLabel(status) {
19692
19666
  switch (status) {
19693
19667
  case "configured":
@@ -19778,7 +19752,7 @@ function ProviderDialog({
19778
19752
  );
19779
19753
  const currentProvider = runtime.getSnapshot().current.provider;
19780
19754
  if (editing) {
19781
- return /* @__PURE__ */ jsx89(
19755
+ return /* @__PURE__ */ jsx90(
19782
19756
  ProviderSetupDialog,
19783
19757
  {
19784
19758
  runtime,
@@ -19796,8 +19770,8 @@ function ProviderDialog({
19796
19770
  }
19797
19771
  );
19798
19772
  }
19799
- return /* @__PURE__ */ jsxs67(
19800
- Box69,
19773
+ return /* @__PURE__ */ jsxs68(
19774
+ Box70,
19801
19775
  {
19802
19776
  borderStyle: "round",
19803
19777
  borderColor: theme.border.default,
@@ -19806,18 +19780,18 @@ function ProviderDialog({
19806
19780
  paddingY: 1,
19807
19781
  width: "100%",
19808
19782
  children: [
19809
- /* @__PURE__ */ jsxs67(Box69, { justifyContent: "space-between", children: [
19810
- /* @__PURE__ */ jsx89(Text62, { bold: true, color: theme.text.accent, children: "DSH Providers" }),
19811
- /* @__PURE__ */ jsxs67(Text62, { color: theme.text.secondary, children: [
19812
- /* @__PURE__ */ jsx89(Text62, { bold: true, color: theme.text.primary, children: "Esc" }),
19783
+ /* @__PURE__ */ jsxs68(Box70, { justifyContent: "space-between", children: [
19784
+ /* @__PURE__ */ jsx90(Text63, { bold: true, color: theme.text.accent, children: "DSH Providers" }),
19785
+ /* @__PURE__ */ jsxs68(Text63, { color: theme.text.secondary, children: [
19786
+ /* @__PURE__ */ jsx90(Text63, { bold: true, color: theme.text.primary, children: "Esc" }),
19813
19787
  " Close"
19814
19788
  ] })
19815
19789
  ] }),
19816
- error && /* @__PURE__ */ jsx89(Box69, { marginTop: 1, children: /* @__PURE__ */ jsx89(Text62, { color: theme.status.error, children: error }) }),
19817
- loading && /* @__PURE__ */ jsx89(Box69, { marginTop: 1, children: /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Loading providers..." }) }),
19818
- !loading && providers.length === 0 && /* @__PURE__ */ jsx89(Box69, { marginTop: 1, children: /* @__PURE__ */ jsx89(Text62, { color: theme.status.warning, children: "No DSH-managed providers are available." }) }),
19819
- providers.length > 0 && highlighted && /* @__PURE__ */ jsxs67(Box69, { marginTop: 1, children: [
19820
- /* @__PURE__ */ jsx89(Box69, { width: "55%", paddingRight: 2, children: /* @__PURE__ */ jsx89(
19790
+ error && /* @__PURE__ */ jsx90(Box70, { marginTop: 1, children: /* @__PURE__ */ jsx90(Text63, { color: theme.status.error, children: error }) }),
19791
+ loading && /* @__PURE__ */ jsx90(Box70, { marginTop: 1, children: /* @__PURE__ */ jsx90(Text63, { color: theme.text.secondary, children: "Loading providers..." }) }),
19792
+ !loading && providers.length === 0 && /* @__PURE__ */ jsx90(Box70, { marginTop: 1, children: /* @__PURE__ */ jsx90(Text63, { color: theme.status.warning, children: "No DSH-managed providers are available." }) }),
19793
+ providers.length > 0 && highlighted && /* @__PURE__ */ jsxs68(Box70, { marginTop: 1, children: [
19794
+ /* @__PURE__ */ jsx90(Box70, { width: "55%", paddingRight: 2, children: /* @__PURE__ */ jsx90(
19821
19795
  RadioButtonSelect,
19822
19796
  {
19823
19797
  items,
@@ -19830,45 +19804,45 @@ function ProviderDialog({
19830
19804
  },
19831
19805
  showScrollArrows: true,
19832
19806
  maxItemsToShow: 12,
19833
- renderItem: (item, { titleColor }) => /* @__PURE__ */ jsxs67(Text62, { color: titleColor, wrap: "truncate", children: [
19807
+ renderItem: (item, { titleColor }) => /* @__PURE__ */ jsxs68(Text63, { color: titleColor, wrap: "truncate", children: [
19834
19808
  item.value.displayName,
19835
19809
  " ",
19836
- /* @__PURE__ */ jsx89(Text62, { color: statusColor(item.value.status), children: statusLabel(item.value.status) }),
19837
- item.value.provider === currentProvider && /* @__PURE__ */ jsx89(Text62, { color: theme.text.accent, children: " Current" })
19810
+ /* @__PURE__ */ jsx90(Text63, { color: statusColor(item.value.status), children: statusLabel(item.value.status) }),
19811
+ item.value.provider === currentProvider && /* @__PURE__ */ jsx90(Text63, { color: theme.text.accent, children: " Current" })
19838
19812
  ] })
19839
19813
  }
19840
19814
  ) }),
19841
- /* @__PURE__ */ jsxs67(Box69, { width: "45%", paddingLeft: 2, flexDirection: "column", children: [
19842
- /* @__PURE__ */ jsx89(Text62, { bold: true, color: theme.text.primary, children: highlighted.displayName }),
19843
- /* @__PURE__ */ jsxs67(Box69, { marginTop: 1, flexDirection: "column", children: [
19844
- /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Provider" }),
19845
- /* @__PURE__ */ jsx89(Text62, { children: highlighted.provider }),
19846
- /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Status" }),
19847
- /* @__PURE__ */ jsx89(Text62, { color: statusColor(highlighted.status), children: statusLabel(highlighted.status) }),
19848
- highlighted.credentialLabel && /* @__PURE__ */ jsxs67(Fragment16, { children: [
19849
- /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Credential" }),
19850
- /* @__PURE__ */ jsx89(Text62, { children: highlighted.credentialLabel })
19815
+ /* @__PURE__ */ jsxs68(Box70, { width: "45%", paddingLeft: 2, flexDirection: "column", children: [
19816
+ /* @__PURE__ */ jsx90(Text63, { bold: true, color: theme.text.primary, children: highlighted.displayName }),
19817
+ /* @__PURE__ */ jsxs68(Box70, { marginTop: 1, flexDirection: "column", children: [
19818
+ /* @__PURE__ */ jsx90(Text63, { color: theme.text.secondary, children: "Provider" }),
19819
+ /* @__PURE__ */ jsx90(Text63, { children: highlighted.provider }),
19820
+ /* @__PURE__ */ jsx90(Text63, { color: theme.text.secondary, children: "Status" }),
19821
+ /* @__PURE__ */ jsx90(Text63, { color: statusColor(highlighted.status), children: statusLabel(highlighted.status) }),
19822
+ highlighted.credentialLabel && /* @__PURE__ */ jsxs68(Fragment16, { children: [
19823
+ /* @__PURE__ */ jsx90(Text63, { color: theme.text.secondary, children: "Credential" }),
19824
+ /* @__PURE__ */ jsx90(Text63, { children: highlighted.credentialLabel })
19851
19825
  ] }),
19852
- highlighted.source && /* @__PURE__ */ jsxs67(Fragment16, { children: [
19853
- /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Source" }),
19854
- /* @__PURE__ */ jsx89(Text62, { children: highlighted.source })
19826
+ highlighted.source && /* @__PURE__ */ jsxs68(Fragment16, { children: [
19827
+ /* @__PURE__ */ jsx90(Text63, { color: theme.text.secondary, children: "Source" }),
19828
+ /* @__PURE__ */ jsx90(Text63, { children: highlighted.source })
19855
19829
  ] }),
19856
- highlighted.message && /* @__PURE__ */ jsx89(Box69, { marginTop: 1, children: /* @__PURE__ */ jsx89(Text62, { color: theme.status.warning, children: highlighted.message }) }),
19857
- !highlighted.writable && highlighted.status !== "unsupported" && highlighted.status !== "error" && /* @__PURE__ */ jsx89(Box69, { marginTop: 1, children: /* @__PURE__ */ jsx89(Text62, { color: theme.status.warning, children: "This credential comes from a read-only source. Update it outside DSH Console." }) })
19830
+ highlighted.message && /* @__PURE__ */ jsx90(Box70, { marginTop: 1, children: /* @__PURE__ */ jsx90(Text63, { color: theme.status.warning, children: highlighted.message }) }),
19831
+ !highlighted.writable && highlighted.status !== "unsupported" && highlighted.status !== "error" && /* @__PURE__ */ jsx90(Box70, { marginTop: 1, children: /* @__PURE__ */ jsx90(Text63, { color: theme.status.warning, children: "This credential comes from a read-only source. Update it outside DSH Console." }) })
19858
19832
  ] })
19859
19833
  ] })
19860
19834
  ] }),
19861
- providers.length > 0 && highlighted && /* @__PURE__ */ jsx89(Box69, { marginTop: 1, children: highlighted.writable && highlighted.status !== "unsupported" ? /* @__PURE__ */ jsxs67(Fragment16, { children: [
19862
- /* @__PURE__ */ jsx89(Text62, { bold: true, color: theme.text.accent, children: "Enter" }),
19863
- /* @__PURE__ */ jsxs67(Text62, { color: theme.text.primary, children: [
19835
+ providers.length > 0 && highlighted && /* @__PURE__ */ jsx90(Box70, { marginTop: 1, children: highlighted.writable && highlighted.status !== "unsupported" ? /* @__PURE__ */ jsxs68(Fragment16, { children: [
19836
+ /* @__PURE__ */ jsx90(Text63, { bold: true, color: theme.text.accent, children: "Enter" }),
19837
+ /* @__PURE__ */ jsxs68(Text63, { color: theme.text.primary, children: [
19864
19838
  " ",
19865
19839
  highlighted.status === "configured" ? "Replace credential" : "Configure provider"
19866
19840
  ] }),
19867
- /* @__PURE__ */ jsxs67(Text62, { color: theme.text.secondary, children: [
19841
+ /* @__PURE__ */ jsxs68(Text63, { color: theme.text.secondary, children: [
19868
19842
  " ",
19869
19843
  "Use \u2191/\u2193 to navigate"
19870
19844
  ] })
19871
- ] }) : /* @__PURE__ */ jsx89(Text62, { color: theme.text.secondary, children: "Use \u2191/\u2193 to inspect providers. This credential cannot be changed here." }) })
19845
+ ] }) : /* @__PURE__ */ jsx90(Text63, { color: theme.text.secondary, children: "Use \u2191/\u2193 to inspect providers. This credential cannot be changed here." }) })
19872
19846
  ]
19873
19847
  }
19874
19848
  );
@@ -19921,8 +19895,8 @@ import React18 from "react";
19921
19895
 
19922
19896
  // src/ui/components/dialogs/session-dialog.tsx
19923
19897
  import { useCallback as useCallback33, useEffect as useEffect41, useMemo as useMemo30, useRef as useRef20, useState as useState38 } from "react";
19924
- import { Box as Box70, Text as Text63 } from "ink";
19925
- import { Fragment as Fragment17, jsx as jsx90, jsxs as jsxs68 } from "react/jsx-runtime";
19898
+ import { Box as Box71, Text as Text64 } from "ink";
19899
+ import { Fragment as Fragment17, jsx as jsx91, jsxs as jsxs69 } from "react/jsx-runtime";
19926
19900
  function shortId(id) {
19927
19901
  const start2 = id.startsWith("dsh-console-") ? "dsh-console-".length : 0;
19928
19902
  return id.slice(start2, start2 + 12);
@@ -19989,14 +19963,14 @@ function SessionDialog({ runtime, onClose }) {
19989
19963
  if (pending) setPending(void 0);
19990
19964
  else onClose();
19991
19965
  }, { isActive: true });
19992
- return /* @__PURE__ */ jsxs68(Box70, { borderStyle: "round", borderColor: theme.border.default, flexDirection: "column", paddingX: 1, paddingY: 1, width: "100%", children: [
19993
- /* @__PURE__ */ jsxs68(Box70, { justifyContent: "space-between", children: [
19994
- /* @__PURE__ */ jsx90(Text63, { bold: true, color: theme.text.primary, children: "DSH Sessions" }),
19995
- /* @__PURE__ */ jsx90(Text63, { color: theme.text.secondary, children: "Esc to close" })
19966
+ return /* @__PURE__ */ jsxs69(Box71, { borderStyle: "round", borderColor: theme.border.default, flexDirection: "column", paddingX: 1, paddingY: 1, width: "100%", children: [
19967
+ /* @__PURE__ */ jsxs69(Box71, { justifyContent: "space-between", children: [
19968
+ /* @__PURE__ */ jsx91(Text64, { bold: true, color: theme.text.primary, children: "DSH Sessions" }),
19969
+ /* @__PURE__ */ jsx91(Text64, { color: theme.text.secondary, children: "Esc to close" })
19996
19970
  ] }),
19997
- error && /* @__PURE__ */ jsx90(Box70, { marginTop: 1, children: /* @__PURE__ */ jsx90(Text63, { color: theme.status.error, children: error }) }),
19998
- loading ? /* @__PURE__ */ jsx90(Box70, { marginTop: 1, children: /* @__PURE__ */ jsx90(Text63, { color: theme.text.secondary, children: "Loading Sessions..." }) }) : sessions.length === 0 ? /* @__PURE__ */ jsx90(Box70, { marginTop: 1, children: /* @__PURE__ */ jsx90(Text63, { color: theme.text.secondary, children: "No resumable Sessions." }) }) : /* @__PURE__ */ jsxs68(Box70, { flexDirection: "row", marginTop: 1, children: [
19999
- /* @__PURE__ */ jsx90(Box70, { width: "55%", paddingRight: 2, flexDirection: "column", children: /* @__PURE__ */ jsx90(
19971
+ error && /* @__PURE__ */ jsx91(Box71, { marginTop: 1, children: /* @__PURE__ */ jsx91(Text64, { color: theme.status.error, children: error }) }),
19972
+ loading ? /* @__PURE__ */ jsx91(Box71, { marginTop: 1, children: /* @__PURE__ */ jsx91(Text64, { color: theme.text.secondary, children: "Loading Sessions..." }) }) : sessions.length === 0 ? /* @__PURE__ */ jsx91(Box71, { marginTop: 1, children: /* @__PURE__ */ jsx91(Text64, { color: theme.text.secondary, children: "No resumable Sessions." }) }) : /* @__PURE__ */ jsxs69(Box71, { flexDirection: "row", marginTop: 1, children: [
19973
+ /* @__PURE__ */ jsx91(Box71, { width: "55%", paddingRight: 2, flexDirection: "column", children: /* @__PURE__ */ jsx91(
20000
19974
  RadioButtonSelect,
20001
19975
  {
20002
19976
  items,
@@ -20006,20 +19980,20 @@ function SessionDialog({ runtime, onClose }) {
20006
19980
  isFocused: !pending && !switching,
20007
19981
  showScrollArrows: true,
20008
19982
  maxItemsToShow: 12,
20009
- renderItem: (item, { titleColor }) => /* @__PURE__ */ jsxs68(Text63, { color: titleColor, wrap: "truncate", children: [
19983
+ renderItem: (item, { titleColor }) => /* @__PURE__ */ jsxs69(Text64, { color: titleColor, wrap: "truncate", children: [
20010
19984
  sessionLabel(item.value),
20011
- item.value.current && /* @__PURE__ */ jsx90(Text63, { color: theme.text.accent, children: " Current" }),
20012
- !item.value.current && !item.value.resumable && /* @__PURE__ */ jsx90(Text63, { color: theme.status.warning, children: " Not resumable" })
19985
+ item.value.current && /* @__PURE__ */ jsx91(Text64, { color: theme.text.accent, children: " Current" }),
19986
+ !item.value.current && !item.value.resumable && /* @__PURE__ */ jsx91(Text64, { color: theme.status.warning, children: " Not resumable" })
20013
19987
  ] })
20014
19988
  }
20015
19989
  ) }),
20016
- /* @__PURE__ */ jsx90(Box70, { width: "45%", paddingLeft: 2, flexDirection: "column", children: pending ? /* @__PURE__ */ jsxs68(Fragment17, { children: [
20017
- /* @__PURE__ */ jsx90(Text63, { bold: true, color: theme.status.warning, children: "Resume this Session?" }),
20018
- /* @__PURE__ */ jsxs68(Box70, { marginTop: 1, flexDirection: "column", children: [
20019
- /* @__PURE__ */ jsx90(Text63, { children: sessionLabel(pending) }),
20020
- /* @__PURE__ */ jsx90(Text63, { color: theme.text.secondary, children: "The current transcript will be replaced." })
19990
+ /* @__PURE__ */ jsx91(Box71, { width: "45%", paddingLeft: 2, flexDirection: "column", children: pending ? /* @__PURE__ */ jsxs69(Fragment17, { children: [
19991
+ /* @__PURE__ */ jsx91(Text64, { bold: true, color: theme.status.warning, children: "Resume this Session?" }),
19992
+ /* @__PURE__ */ jsxs69(Box71, { marginTop: 1, flexDirection: "column", children: [
19993
+ /* @__PURE__ */ jsx91(Text64, { children: sessionLabel(pending) }),
19994
+ /* @__PURE__ */ jsx91(Text64, { color: theme.text.secondary, children: "The current transcript will be replaced." })
20021
19995
  ] }),
20022
- /* @__PURE__ */ jsx90(Box70, { marginTop: 1, children: /* @__PURE__ */ jsx90(
19996
+ /* @__PURE__ */ jsx91(Box71, { marginTop: 1, children: /* @__PURE__ */ jsx91(
20023
19997
  RadioButtonSelect,
20024
19998
  {
20025
19999
  items: [
@@ -20031,21 +20005,21 @@ function SessionDialog({ runtime, onClose }) {
20031
20005
  showNumbers: false
20032
20006
  }
20033
20007
  ) })
20034
- ] }) : highlighted ? /* @__PURE__ */ jsxs68(Fragment17, { children: [
20035
- /* @__PURE__ */ jsx90(Text63, { bold: true, children: sessionLabel(highlighted) }),
20036
- /* @__PURE__ */ jsxs68(Box70, { marginTop: 1, flexDirection: "column", children: [
20037
- /* @__PURE__ */ jsx90(Text63, { color: theme.text.secondary, children: "Created" }),
20038
- /* @__PURE__ */ jsx90(Text63, { children: new Date(highlighted.createdAt).toLocaleString() }),
20039
- !highlighted.resumable && highlighted.resumeUnavailableReason && /* @__PURE__ */ jsxs68(Fragment17, { children: [
20040
- /* @__PURE__ */ jsx90(Text63, { color: theme.text.secondary, children: "Resume status" }),
20041
- /* @__PURE__ */ jsx90(Text63, { color: theme.status.warning, children: highlighted.resumeUnavailableReason })
20008
+ ] }) : highlighted ? /* @__PURE__ */ jsxs69(Fragment17, { children: [
20009
+ /* @__PURE__ */ jsx91(Text64, { bold: true, children: sessionLabel(highlighted) }),
20010
+ /* @__PURE__ */ jsxs69(Box71, { marginTop: 1, flexDirection: "column", children: [
20011
+ /* @__PURE__ */ jsx91(Text64, { color: theme.text.secondary, children: "Created" }),
20012
+ /* @__PURE__ */ jsx91(Text64, { children: new Date(highlighted.createdAt).toLocaleString() }),
20013
+ !highlighted.resumable && highlighted.resumeUnavailableReason && /* @__PURE__ */ jsxs69(Fragment17, { children: [
20014
+ /* @__PURE__ */ jsx91(Text64, { color: theme.text.secondary, children: "Resume status" }),
20015
+ /* @__PURE__ */ jsx91(Text64, { color: theme.status.warning, children: highlighted.resumeUnavailableReason })
20042
20016
  ] }),
20043
- /* @__PURE__ */ jsx90(Text63, { color: theme.text.secondary, children: "Session ID" }),
20044
- /* @__PURE__ */ jsx90(Text63, { wrap: "wrap", children: highlighted.id })
20017
+ /* @__PURE__ */ jsx91(Text64, { color: theme.text.secondary, children: "Session ID" }),
20018
+ /* @__PURE__ */ jsx91(Text64, { wrap: "wrap", children: highlighted.id })
20045
20019
  ] })
20046
20020
  ] }) : null })
20047
20021
  ] }),
20048
- /* @__PURE__ */ jsx90(Box70, { marginTop: 1, children: /* @__PURE__ */ jsx90(Text63, { color: theme.text.secondary, children: "Use \u2191/\u2193 to navigate and Enter to resume." }) })
20022
+ /* @__PURE__ */ jsx91(Box71, { marginTop: 1, children: /* @__PURE__ */ jsx91(Text64, { color: theme.text.secondary, children: "Use \u2191/\u2193 to navigate and Enter to resume." }) })
20049
20023
  ] });
20050
20024
  }
20051
20025
 
@@ -20137,11 +20111,11 @@ import React19 from "react";
20137
20111
 
20138
20112
  // src/ui/components/dialogs/tools-dialog.tsx
20139
20113
  import { useEffect as useEffect42, useMemo as useMemo31, useState as useState39, useSyncExternalStore as useSyncExternalStore3 } from "react";
20140
- import { Box as Box72, Text as Text65 } from "ink";
20114
+ import { Box as Box73, Text as Text66 } from "ink";
20141
20115
 
20142
20116
  // src/ui/components/shared/descriptive-radio-button-select.tsx
20143
- import { Text as Text64, Box as Box71 } from "ink";
20144
- import { jsx as jsx91, jsxs as jsxs69 } from "react/jsx-runtime";
20117
+ import { Text as Text65, Box as Box72 } from "ink";
20118
+ import { jsx as jsx92, jsxs as jsxs70 } from "react/jsx-runtime";
20145
20119
  function DescriptiveRadioButtonSelect({
20146
20120
  items,
20147
20121
  initialIndex = 0,
@@ -20152,7 +20126,7 @@ function DescriptiveRadioButtonSelect({
20152
20126
  showScrollArrows = false,
20153
20127
  maxItemsToShow = 10
20154
20128
  }) {
20155
- return /* @__PURE__ */ jsx91(
20129
+ return /* @__PURE__ */ jsx92(
20156
20130
  BaseSelectionList,
20157
20131
  {
20158
20132
  items,
@@ -20163,16 +20137,16 @@ function DescriptiveRadioButtonSelect({
20163
20137
  showNumbers,
20164
20138
  showScrollArrows,
20165
20139
  maxItemsToShow,
20166
- renderItem: (item, { titleColor }) => /* @__PURE__ */ jsxs69(Box71, { flexDirection: "column", children: [
20167
- /* @__PURE__ */ jsx91(Text64, { color: titleColor, children: item.title }),
20168
- item.description && /* @__PURE__ */ jsx91(Text64, { color: theme.text.secondary, children: item.description })
20140
+ renderItem: (item, { titleColor }) => /* @__PURE__ */ jsxs70(Box72, { flexDirection: "column", children: [
20141
+ /* @__PURE__ */ jsx92(Text65, { color: titleColor, children: item.title }),
20142
+ item.description && /* @__PURE__ */ jsx92(Text65, { color: theme.text.secondary, children: item.description })
20169
20143
  ] }, item.key)
20170
20144
  }
20171
20145
  );
20172
20146
  }
20173
20147
 
20174
20148
  // src/ui/components/dialogs/tools-dialog.tsx
20175
- import { Fragment as Fragment18, jsx as jsx92, jsxs as jsxs70 } from "react/jsx-runtime";
20149
+ import { Fragment as Fragment18, jsx as jsx93, jsxs as jsxs71 } from "react/jsx-runtime";
20176
20150
  function summary(description) {
20177
20151
  const line = description.replace(/\s+/g, " ").trim();
20178
20152
  return line.length > 90 ? `${line.slice(0, 89)}...` : line;
@@ -20203,8 +20177,8 @@ function ToolsDialog({ runtime, onClose }) {
20203
20177
  })),
20204
20178
  [snapshot.tools]
20205
20179
  );
20206
- return /* @__PURE__ */ jsxs70(
20207
- Box72,
20180
+ return /* @__PURE__ */ jsxs71(
20181
+ Box73,
20208
20182
  {
20209
20183
  borderStyle: "round",
20210
20184
  borderColor: theme.border.default,
@@ -20213,16 +20187,16 @@ function ToolsDialog({ runtime, onClose }) {
20213
20187
  paddingY: 1,
20214
20188
  width: "100%",
20215
20189
  children: [
20216
- /* @__PURE__ */ jsxs70(Box72, { justifyContent: "space-between", children: [
20217
- /* @__PURE__ */ jsxs70(Text65, { bold: true, color: theme.text.primary, children: [
20190
+ /* @__PURE__ */ jsxs71(Box73, { justifyContent: "space-between", children: [
20191
+ /* @__PURE__ */ jsxs71(Text66, { bold: true, color: theme.text.primary, children: [
20218
20192
  "DSH Tools (",
20219
20193
  snapshot.tools.length,
20220
20194
  ")"
20221
20195
  ] }),
20222
- /* @__PURE__ */ jsx92(Text65, { color: theme.text.secondary, children: "Esc to close" })
20196
+ /* @__PURE__ */ jsx93(Text66, { color: theme.text.secondary, children: "Esc to close" })
20223
20197
  ] }),
20224
- snapshot.tools.length === 0 ? /* @__PURE__ */ jsx92(Box72, { marginTop: 1, children: /* @__PURE__ */ jsx92(Text65, { color: theme.text.secondary, children: "No tools are visible to the current Agent." }) }) : /* @__PURE__ */ jsxs70(Box72, { flexDirection: "row", marginTop: 1, children: [
20225
- /* @__PURE__ */ jsx92(Box72, { width: "55%", paddingRight: 2, flexDirection: "column", children: /* @__PURE__ */ jsx92(
20198
+ snapshot.tools.length === 0 ? /* @__PURE__ */ jsx93(Box73, { marginTop: 1, children: /* @__PURE__ */ jsx93(Text66, { color: theme.text.secondary, children: "No tools are visible to the current Agent." }) }) : /* @__PURE__ */ jsxs71(Box73, { flexDirection: "row", marginTop: 1, children: [
20199
+ /* @__PURE__ */ jsx93(Box73, { width: "55%", paddingRight: 2, flexDirection: "column", children: /* @__PURE__ */ jsx93(
20226
20200
  DescriptiveRadioButtonSelect,
20227
20201
  {
20228
20202
  items,
@@ -20233,26 +20207,26 @@ function ToolsDialog({ runtime, onClose }) {
20233
20207
  maxItemsToShow: 10
20234
20208
  }
20235
20209
  ) }),
20236
- /* @__PURE__ */ jsx92(Box72, { width: "45%", paddingLeft: 2, flexDirection: "column", children: selected && /* @__PURE__ */ jsxs70(Fragment18, { children: [
20237
- /* @__PURE__ */ jsx92(Text65, { bold: true, color: theme.text.accent, children: selected.name }),
20238
- /* @__PURE__ */ jsx92(Box72, { marginTop: 1, children: /* @__PURE__ */ jsx92(Text65, { wrap: "wrap", children: selected.description }) }),
20239
- /* @__PURE__ */ jsxs70(Box72, { marginTop: 1, flexDirection: "column", children: [
20240
- /* @__PURE__ */ jsx92(Text65, { bold: true, color: theme.text.primary, children: "Parameters" }),
20241
- selected.parameters.length === 0 ? /* @__PURE__ */ jsx92(Text65, { color: theme.text.secondary, children: "None" }) : selected.parameters.map((parameter) => /* @__PURE__ */ jsxs70(Box72, { flexDirection: "column", children: [
20242
- /* @__PURE__ */ jsxs70(Text65, { color: theme.text.link, children: [
20210
+ /* @__PURE__ */ jsx93(Box73, { width: "45%", paddingLeft: 2, flexDirection: "column", children: selected && /* @__PURE__ */ jsxs71(Fragment18, { children: [
20211
+ /* @__PURE__ */ jsx93(Text66, { bold: true, color: theme.text.accent, children: selected.name }),
20212
+ /* @__PURE__ */ jsx93(Box73, { marginTop: 1, children: /* @__PURE__ */ jsx93(Text66, { wrap: "wrap", children: selected.description }) }),
20213
+ /* @__PURE__ */ jsxs71(Box73, { marginTop: 1, flexDirection: "column", children: [
20214
+ /* @__PURE__ */ jsx93(Text66, { bold: true, color: theme.text.primary, children: "Parameters" }),
20215
+ selected.parameters.length === 0 ? /* @__PURE__ */ jsx93(Text66, { color: theme.text.secondary, children: "None" }) : selected.parameters.map((parameter) => /* @__PURE__ */ jsxs71(Box73, { flexDirection: "column", children: [
20216
+ /* @__PURE__ */ jsxs71(Text66, { color: theme.text.link, children: [
20243
20217
  parameter.name,
20244
20218
  " ",
20245
- /* @__PURE__ */ jsxs70(Text65, { color: theme.text.secondary, children: [
20219
+ /* @__PURE__ */ jsxs71(Text66, { color: theme.text.secondary, children: [
20246
20220
  parameter.type,
20247
20221
  parameter.required ? " required" : " optional"
20248
20222
  ] })
20249
20223
  ] }),
20250
- parameter.description && /* @__PURE__ */ jsx92(Text65, { color: theme.text.secondary, children: parameter.description })
20224
+ parameter.description && /* @__PURE__ */ jsx93(Text66, { color: theme.text.secondary, children: parameter.description })
20251
20225
  ] }, parameter.name))
20252
20226
  ] })
20253
20227
  ] }) })
20254
20228
  ] }),
20255
- snapshot.tools.length > 0 && /* @__PURE__ */ jsx92(Box72, { marginTop: 1, children: /* @__PURE__ */ jsx92(Text65, { color: theme.text.secondary, children: "Use Up/Down to inspect the current Agent's tool catalog." }) })
20229
+ snapshot.tools.length > 0 && /* @__PURE__ */ jsx93(Box73, { marginTop: 1, children: /* @__PURE__ */ jsx93(Text66, { color: theme.text.secondary, children: "Use Up/Down to inspect the current Agent's tool catalog." }) })
20256
20230
  ]
20257
20231
  }
20258
20232
  );
@@ -20295,8 +20269,8 @@ import React20 from "react";
20295
20269
 
20296
20270
  // src/ui/components/dialogs/permission-dialog.tsx
20297
20271
  import { useCallback as useCallback34, useMemo as useMemo32, useState as useState40, useSyncExternalStore as useSyncExternalStore4 } from "react";
20298
- import { Box as Box73, Text as Text66 } from "ink";
20299
- import { Fragment as Fragment19, jsx as jsx93, jsxs as jsxs71 } from "react/jsx-runtime";
20272
+ import { Box as Box74, Text as Text67 } from "ink";
20273
+ import { Fragment as Fragment19, jsx as jsx94, jsxs as jsxs72 } from "react/jsx-runtime";
20300
20274
  function PermissionDialog({
20301
20275
  runtime,
20302
20276
  onClose,
@@ -20358,8 +20332,8 @@ function PermissionDialog({
20358
20332
  },
20359
20333
  { isActive: true }
20360
20334
  );
20361
- return /* @__PURE__ */ jsxs71(
20362
- Box73,
20335
+ return /* @__PURE__ */ jsxs72(
20336
+ Box74,
20363
20337
  {
20364
20338
  borderStyle: "round",
20365
20339
  borderColor: theme.border.default,
@@ -20368,13 +20342,13 @@ function PermissionDialog({
20368
20342
  paddingY: 1,
20369
20343
  width: "100%",
20370
20344
  children: [
20371
- /* @__PURE__ */ jsxs71(Box73, { justifyContent: "space-between", children: [
20372
- /* @__PURE__ */ jsx93(Text66, { bold: true, color: theme.text.primary, children: "Select DSH Permission" }),
20373
- /* @__PURE__ */ jsx93(Text66, { color: theme.text.secondary, children: "Esc to close" })
20345
+ /* @__PURE__ */ jsxs72(Box74, { justifyContent: "space-between", children: [
20346
+ /* @__PURE__ */ jsx94(Text67, { bold: true, color: theme.text.primary, children: "Select DSH Permission" }),
20347
+ /* @__PURE__ */ jsx94(Text67, { color: theme.text.secondary, children: "Esc to close" })
20374
20348
  ] }),
20375
- error && /* @__PURE__ */ jsx93(Box73, { marginTop: 1, children: /* @__PURE__ */ jsx93(Text66, { color: theme.status.error, children: error }) }),
20376
- !snapshot.available ? /* @__PURE__ */ jsx93(Box73, { marginTop: 1, children: /* @__PURE__ */ jsx93(Text66, { color: theme.status.warning, children: "DSH permission presets are unavailable." }) }) : snapshot.options.length === 0 ? /* @__PURE__ */ jsx93(Box73, { marginTop: 1, children: /* @__PURE__ */ jsx93(Text66, { color: theme.status.warning, children: "No permission presets are available." }) }) : /* @__PURE__ */ jsxs71(Box73, { flexDirection: "row", marginTop: 1, children: [
20377
- /* @__PURE__ */ jsx93(Box73, { width: "50%", paddingRight: 2, flexDirection: "column", children: /* @__PURE__ */ jsx93(
20349
+ error && /* @__PURE__ */ jsx94(Box74, { marginTop: 1, children: /* @__PURE__ */ jsx94(Text67, { color: theme.status.error, children: error }) }),
20350
+ !snapshot.available ? /* @__PURE__ */ jsx94(Box74, { marginTop: 1, children: /* @__PURE__ */ jsx94(Text67, { color: theme.status.warning, children: "DSH permission presets are unavailable." }) }) : snapshot.options.length === 0 ? /* @__PURE__ */ jsx94(Box74, { marginTop: 1, children: /* @__PURE__ */ jsx94(Text67, { color: theme.status.warning, children: "No permission presets are available." }) }) : /* @__PURE__ */ jsxs72(Box74, { flexDirection: "row", marginTop: 1, children: [
20351
+ /* @__PURE__ */ jsx94(Box74, { width: "50%", paddingRight: 2, flexDirection: "column", children: /* @__PURE__ */ jsx94(
20378
20352
  RadioButtonSelect,
20379
20353
  {
20380
20354
  items,
@@ -20383,17 +20357,17 @@ function PermissionDialog({
20383
20357
  onSelect: selectPermission,
20384
20358
  isFocused: !pending && !snapshot.busy,
20385
20359
  showNumbers: false,
20386
- renderItem: (item, { titleColor }) => /* @__PURE__ */ jsxs71(Text66, { color: titleColor, wrap: "truncate", children: [
20360
+ renderItem: (item, { titleColor }) => /* @__PURE__ */ jsxs72(Text67, { color: titleColor, wrap: "truncate", children: [
20387
20361
  item.value.name,
20388
- item.value.value === snapshot.currentValue && /* @__PURE__ */ jsx93(Text66, { color: theme.text.accent, children: " Current" })
20362
+ item.value.value === snapshot.currentValue && /* @__PURE__ */ jsx94(Text67, { color: theme.text.accent, children: " Current" })
20389
20363
  ] })
20390
20364
  },
20391
20365
  items.map((item) => item.key).join("|")
20392
20366
  ) }),
20393
- /* @__PURE__ */ jsx93(Box73, { width: "50%", paddingLeft: 2, flexDirection: "column", children: pending ? /* @__PURE__ */ jsxs71(Fragment19, { children: [
20394
- /* @__PURE__ */ jsx93(Text66, { bold: true, color: theme.status.warning, children: "Enable Full access?" }),
20395
- /* @__PURE__ */ jsx93(Box73, { marginTop: 1, children: /* @__PURE__ */ jsx93(Text66, { children: "This allows commands to run without workspace sandbox restrictions or approval prompts." }) }),
20396
- /* @__PURE__ */ jsx93(Box73, { marginTop: 1, children: /* @__PURE__ */ jsx93(
20367
+ /* @__PURE__ */ jsx94(Box74, { width: "50%", paddingLeft: 2, flexDirection: "column", children: pending ? /* @__PURE__ */ jsxs72(Fragment19, { children: [
20368
+ /* @__PURE__ */ jsx94(Text67, { bold: true, color: theme.status.warning, children: "Enable Full access?" }),
20369
+ /* @__PURE__ */ jsx94(Box74, { marginTop: 1, children: /* @__PURE__ */ jsx94(Text67, { children: "This allows commands to run without workspace sandbox restrictions or approval prompts." }) }),
20370
+ /* @__PURE__ */ jsx94(Box74, { marginTop: 1, children: /* @__PURE__ */ jsx94(
20397
20371
  RadioButtonSelect,
20398
20372
  {
20399
20373
  items: [
@@ -20408,14 +20382,14 @@ function PermissionDialog({
20408
20382
  showNumbers: false
20409
20383
  }
20410
20384
  ) })
20411
- ] }) : selected ? /* @__PURE__ */ jsxs71(Fragment19, { children: [
20412
- /* @__PURE__ */ jsx93(Text66, { bold: true, color: theme.text.primary, children: selected.name }),
20413
- /* @__PURE__ */ jsx93(Text66, { color: theme.text.secondary, children: selected.value }),
20414
- /* @__PURE__ */ jsx93(Box73, { marginTop: 1, children: /* @__PURE__ */ jsx93(Text66, { children: selected.description ?? "No description is available for this preset." }) }),
20415
- snapshot.busy && /* @__PURE__ */ jsx93(Box73, { marginTop: 1, children: /* @__PURE__ */ jsx93(Text66, { color: theme.text.accent, children: "Applying permission..." }) })
20385
+ ] }) : selected ? /* @__PURE__ */ jsxs72(Fragment19, { children: [
20386
+ /* @__PURE__ */ jsx94(Text67, { bold: true, color: theme.text.primary, children: selected.name }),
20387
+ /* @__PURE__ */ jsx94(Text67, { color: theme.text.secondary, children: selected.value }),
20388
+ /* @__PURE__ */ jsx94(Box74, { marginTop: 1, children: /* @__PURE__ */ jsx94(Text67, { children: selected.description ?? "No description is available for this preset." }) }),
20389
+ snapshot.busy && /* @__PURE__ */ jsx94(Box74, { marginTop: 1, children: /* @__PURE__ */ jsx94(Text67, { color: theme.text.accent, children: "Applying permission..." }) })
20416
20390
  ] }) : null })
20417
20391
  ] }),
20418
- /* @__PURE__ */ jsx93(Box73, { marginTop: 1, children: /* @__PURE__ */ jsx93(Text66, { color: theme.text.secondary, children: "Changes apply to the current DSH Session immediately. No restart required." }) })
20392
+ /* @__PURE__ */ jsx94(Box74, { marginTop: 1, children: /* @__PURE__ */ jsx94(Text67, { color: theme.text.secondary, children: "Changes apply to the current DSH Session immediately. No restart required." }) })
20419
20393
  ]
20420
20394
  }
20421
20395
  );
@@ -20531,7 +20505,6 @@ var BuiltinCommandLoader = class {
20531
20505
  themeCommand,
20532
20506
  settingsCommand,
20533
20507
  vimCommand,
20534
- terminalSetupCommand,
20535
20508
  modelCommand,
20536
20509
  providerCommand,
20537
20510
  permissionCommand,
@@ -20856,8 +20829,8 @@ ${commandToExecute.subCommands.map((sc) => ` - ${sc.name}: ${sc.description ||
20856
20829
  // src/ui/app-container.tsx
20857
20830
  import { useStdout as useStdout4, useStdin as useStdin4 } from "ink";
20858
20831
  import ansiEscapes from "ansi-escapes";
20859
- import * as fs13 from "node:fs";
20860
- import { basename as basename2, join as join6 } from "node:path";
20832
+ import * as fs12 from "node:fs";
20833
+ import { basename as basename2, join as join5 } from "node:path";
20861
20834
 
20862
20835
  // src/ui/hooks/commands/use-settings-command.ts
20863
20836
  import { useState as useState42, useCallback as useCallback36 } from "react";
@@ -21517,9 +21490,9 @@ function useVim(buffer, onSubmit) {
21517
21490
 
21518
21491
  // src/ui/hooks/session/use-git-branch-name.ts
21519
21492
  import { useState as useState44, useEffect as useEffect45, useCallback as useCallback39 } from "react";
21520
- import fs10 from "node:fs";
21493
+ import fs9 from "node:fs";
21521
21494
  import fsPromises2 from "node:fs/promises";
21522
- import path12 from "node:path";
21495
+ import path11 from "node:path";
21523
21496
  function useGitBranchName(cwd) {
21524
21497
  const [branchName, setBranchName] = useState44(void 0);
21525
21498
  const fetchBranchName = useCallback39(async () => {
@@ -21546,14 +21519,14 @@ function useGitBranchName(cwd) {
21546
21519
  }, [cwd, setBranchName]);
21547
21520
  useEffect45(() => {
21548
21521
  fetchBranchName();
21549
- const gitLogsHeadPath = path12.join(cwd, ".git", "logs", "HEAD");
21522
+ const gitLogsHeadPath = path11.join(cwd, ".git", "logs", "HEAD");
21550
21523
  let watcher;
21551
21524
  let cancelled = false;
21552
21525
  const setupWatcher = async () => {
21553
21526
  try {
21554
- await fsPromises2.access(gitLogsHeadPath, fs10.constants.F_OK);
21527
+ await fsPromises2.access(gitLogsHeadPath, fs9.constants.F_OK);
21555
21528
  if (cancelled) return;
21556
- watcher = fs10.watch(gitLogsHeadPath, (eventType) => {
21529
+ watcher = fs9.watch(gitLogsHeadPath, (eventType) => {
21557
21530
  if (eventType === "change" || eventType === "rename") {
21558
21531
  fetchBranchName();
21559
21532
  }
@@ -22101,8 +22074,8 @@ function useInputHistoryStore() {
22101
22074
 
22102
22075
  // src/services/prompt-history-store.ts
22103
22076
  import { randomUUID } from "node:crypto";
22104
- import { promises as fs11 } from "node:fs";
22105
- import path13 from "node:path";
22077
+ import { promises as fs10 } from "node:fs";
22078
+ import path12 from "node:path";
22106
22079
  var MAX_HISTORY_ENTRIES = 1e3;
22107
22080
  function isPromptHistoryEntry(value) {
22108
22081
  if (!value || typeof value !== "object") return false;
@@ -22143,7 +22116,7 @@ var PromptHistoryStore = class {
22143
22116
  if (this.entries) return this.entries;
22144
22117
  try {
22145
22118
  const parsed = JSON.parse(
22146
- await fs11.readFile(this.filePath, "utf8")
22119
+ await fs10.readFile(this.filePath, "utf8")
22147
22120
  );
22148
22121
  if (!Array.isArray(parsed) || !parsed.every(isPromptHistoryEntry)) {
22149
22122
  await this.backUpInvalidFile();
@@ -22165,17 +22138,17 @@ var PromptHistoryStore = class {
22165
22138
  }
22166
22139
  async backUpInvalidFile() {
22167
22140
  const backupPath = `${this.filePath}.invalid.${Date.now()}.bak`;
22168
- await fs11.rename(this.filePath, backupPath).catch(() => {
22141
+ await fs10.rename(this.filePath, backupPath).catch(() => {
22169
22142
  });
22170
22143
  }
22171
22144
  async writeAtomically(entries) {
22172
- await fs11.mkdir(path13.dirname(this.filePath), { recursive: true });
22145
+ await fs10.mkdir(path12.dirname(this.filePath), { recursive: true });
22173
22146
  const temporaryPath = `${this.filePath}.${process.pid}.${randomUUID()}.tmp`;
22174
22147
  try {
22175
- await fs11.writeFile(temporaryPath, JSON.stringify(entries), "utf8");
22176
- await fs11.rename(temporaryPath, this.filePath);
22148
+ await fs10.writeFile(temporaryPath, JSON.stringify(entries), "utf8");
22149
+ await fs10.rename(temporaryPath, this.filePath);
22177
22150
  } finally {
22178
- await fs11.rm(temporaryPath, { force: true }).catch(() => {
22151
+ await fs10.rm(temporaryPath, { force: true }).catch(() => {
22179
22152
  });
22180
22153
  }
22181
22154
  }
@@ -22248,9 +22221,9 @@ var useShellInactivityStatus = ({
22248
22221
  // src/ui/hooks/input/use-local-shell-command.ts
22249
22222
  import { useCallback as useCallback44, useEffect as useEffect53, useRef as useRef29, useState as useState52 } from "react";
22250
22223
  import crypto2 from "node:crypto";
22251
- import fs12 from "node:fs";
22252
- import os4 from "node:os";
22253
- import path14 from "node:path";
22224
+ import fs11 from "node:fs";
22225
+ import os3 from "node:os";
22226
+ import path13 from "node:path";
22254
22227
  function outputDisplay(output) {
22255
22228
  return typeof output === "string" ? { type: "text", content: output } : { type: "ansi", content: output };
22256
22229
  }
@@ -22303,9 +22276,9 @@ function useLocalShellCommand({
22303
22276
  let cumulativeOutput = "";
22304
22277
  let binaryOutput = false;
22305
22278
  let binaryBytes = 0;
22306
- if (os4.platform() !== "win32") {
22307
- pwdFilePath = path14.join(
22308
- os4.tmpdir(),
22279
+ if (os3.platform() !== "win32") {
22280
+ pwdFilePath = path13.join(
22281
+ os3.tmpdir(),
22309
22282
  `dsh_console_shell_pwd_${crypto2.randomBytes(6).toString("hex")}.tmp`
22310
22283
  );
22311
22284
  const terminated = command.endsWith(";") || command.endsWith("&") ? command : `${command};`;
@@ -22406,7 +22379,7 @@ function useLocalShellCommand({
22406
22379
  if (mountedRef.current) setPendingItem(null);
22407
22380
  if (pwdFilePath !== void 0) {
22408
22381
  try {
22409
- fs12.unlinkSync(pwdFilePath);
22382
+ fs11.unlinkSync(pwdFilePath);
22410
22383
  } catch (error) {
22411
22384
  if (error.code !== "ENOENT") {
22412
22385
  onDebugMessage(`Unable to remove shell state file: ${String(error)}`);
@@ -22457,8 +22430,8 @@ ${output}`;
22457
22430
  output = `Command exited with code ${result.exitCode}.
22458
22431
  ${output}`;
22459
22432
  }
22460
- if (pwdFilePath !== void 0 && fs12.existsSync(pwdFilePath)) {
22461
- const finalDir = fs12.readFileSync(pwdFilePath, "utf8").trim();
22433
+ if (pwdFilePath !== void 0 && fs11.existsSync(pwdFilePath)) {
22434
+ const finalDir = fs11.readFileSync(pwdFilePath, "utf8").trim();
22462
22435
  if (finalDir && finalDir !== targetDir) {
22463
22436
  output = `WARNING: shell mode is stateless; the directory change to '${finalDir}' will not persist.
22464
22437
 
@@ -22473,7 +22446,7 @@ ${output}`;
22473
22446
  }
22474
22447
 
22475
22448
  // src/ui/app-container.tsx
22476
- import { jsx as jsx94 } from "react/jsx-runtime";
22449
+ import { jsx as jsx95 } from "react/jsx-runtime";
22477
22450
  var SHELL_WIDTH_FRACTION = 0.89;
22478
22451
  var SHELL_HEIGHT_PADDING = 10;
22479
22452
  var noopExternalStoreSubscribe = () => () => {
@@ -22644,6 +22617,7 @@ var AppContainer = (props) => {
22644
22617
  [modelSelectionRuntime]
22645
22618
  );
22646
22619
  const currentModel = modelSelectionSnapshot ? modelSelectionLabel(modelSelectionSnapshot.current) : "DSH default";
22620
+ const currentReasoningEffort = modelSelectionSnapshot ? modelReasoningEffortLabel(modelSelectionSnapshot.current) : void 0;
22647
22621
  const providerSetupSnapshot = useSyncExternalStore5(
22648
22622
  providerSetupRuntime?.subscribe ?? noopExternalStoreSubscribe,
22649
22623
  providerSetupRuntime?.getSnapshot ?? emptyProviderSetupSnapshot,
@@ -22652,7 +22626,7 @@ var AppContainer = (props) => {
22652
22626
  const [providerSetupDismissed, setProviderSetupDismissed] = useState53(false);
22653
22627
  const promptHistory = useMemo34(
22654
22628
  () => new PromptHistoryStore(
22655
- join6(config.storage.getProjectTempDir(), "prompt_history.json")
22629
+ join5(config.storage.getProjectTempDir(), "prompt_history.json")
22656
22630
  ),
22657
22631
  [config.storage]
22658
22632
  );
@@ -22693,7 +22667,7 @@ var AppContainer = (props) => {
22693
22667
  const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
22694
22668
  const isValidPath = useCallback45((filePath) => {
22695
22669
  try {
22696
- return fs13.existsSync(filePath) && fs13.statSync(filePath).isFile();
22670
+ return fs12.existsSync(filePath) && fs12.statSync(filePath).isFile();
22697
22671
  } catch (_e) {
22698
22672
  return false;
22699
22673
  }
@@ -23033,7 +23007,7 @@ ${queuedText}` : queuedText;
23033
23007
  return;
23034
23008
  }
23035
23009
  setCustomDialog(
23036
- /* @__PURE__ */ jsx94(
23010
+ /* @__PURE__ */ jsx95(
23037
23011
  ProviderSetupDialog,
23038
23012
  {
23039
23013
  runtime: providerSetupRuntime,
@@ -23429,6 +23403,7 @@ ${queuedText}` : queuedText;
23429
23403
  messageQueue,
23430
23404
  queueErrorMessage,
23431
23405
  currentModel,
23406
+ currentReasoningEffort,
23432
23407
  errorCount,
23433
23408
  availableTerminalHeight,
23434
23409
  mainAreaWidth,
@@ -23502,6 +23477,7 @@ ${queuedText}` : queuedText;
23502
23477
  mainControlsRef,
23503
23478
  rootUiRef,
23504
23479
  currentModel,
23480
+ currentReasoningEffort,
23505
23481
  activePtyId,
23506
23482
  historyManager,
23507
23483
  embeddedShellFocused,
@@ -23555,14 +23531,14 @@ ${queuedText}` : queuedText;
23555
23531
  setEmbeddedShellFocused
23556
23532
  ]
23557
23533
  );
23558
- return /* @__PURE__ */ jsx94(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ jsx94(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ jsx94(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ jsx94(
23534
+ return /* @__PURE__ */ jsx95(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ jsx95(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ jsx95(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ jsx95(
23559
23535
  AppContext.Provider,
23560
23536
  {
23561
23537
  value: {
23562
23538
  version: props.version,
23563
23539
  startupWarnings: props.startupWarnings || []
23564
23540
  },
23565
- children: /* @__PURE__ */ jsx94(ApprovalRuntimeProvider, { runtime: approvalRuntime, children: /* @__PURE__ */ jsx94(UserQuestionRuntimeProvider, { runtime: userQuestionRuntime, children: /* @__PURE__ */ jsx94(ShellFocusContext.Provider, { value: isFocused, children: /* @__PURE__ */ jsx94(App, {}) }) }) })
23541
+ children: /* @__PURE__ */ jsx95(ApprovalRuntimeProvider, { runtime: approvalRuntime, children: /* @__PURE__ */ jsx95(UserQuestionRuntimeProvider, { runtime: userQuestionRuntime, children: /* @__PURE__ */ jsx95(ShellFocusContext.Provider, { value: isFocused, children: /* @__PURE__ */ jsx95(App, {}) }) }) })
23566
23542
  }
23567
23543
  ) }) }) });
23568
23544
  };
@@ -23570,7 +23546,7 @@ ${queuedText}` : queuedText;
23570
23546
  // src/ui/root.tsx
23571
23547
  import React21 from "react";
23572
23548
  import { render } from "ink";
23573
- import { jsx as jsx95 } from "react/jsx-runtime";
23549
+ import { jsx as jsx96 } from "react/jsx-runtime";
23574
23550
  var SLOW_RENDER_MS = 200;
23575
23551
  function validateDnsResolutionOrder(order) {
23576
23552
  const defaultValue = "ipv4first";
@@ -23618,17 +23594,17 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
23618
23594
  const version = await getVersion();
23619
23595
  const AppWrapper = () => {
23620
23596
  useKittyKeyboardProtocol();
23621
- return /* @__PURE__ */ jsx95(SettingsContext.Provider, { value: settings, children: /* @__PURE__ */ jsx95(
23597
+ return /* @__PURE__ */ jsx96(SettingsContext.Provider, { value: settings, children: /* @__PURE__ */ jsx96(
23622
23598
  KeypressProvider,
23623
23599
  {
23624
23600
  config,
23625
23601
  debugKeystrokeLogging: settings.merged.general.debugKeystrokeLogging,
23626
- children: /* @__PURE__ */ jsx95(
23602
+ children: /* @__PURE__ */ jsx96(
23627
23603
  MouseProvider,
23628
23604
  {
23629
23605
  mouseEventsEnabled,
23630
23606
  debugKeystrokeLogging: settings.merged.general.debugKeystrokeLogging,
23631
- children: /* @__PURE__ */ jsx95(ScrollProvider, { children: /* @__PURE__ */ jsx95(SessionStatsProvider, { conversationRuntime, children: /* @__PURE__ */ jsx95(VimModeProvider, { settings, children: /* @__PURE__ */ jsx95(
23607
+ children: /* @__PURE__ */ jsx96(ScrollProvider, { children: /* @__PURE__ */ jsx96(SessionStatsProvider, { conversationRuntime, children: /* @__PURE__ */ jsx96(VimModeProvider, { settings, children: /* @__PURE__ */ jsx96(
23632
23608
  AppContainer,
23633
23609
  {
23634
23610
  config,
@@ -23656,7 +23632,7 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
23656
23632
  };
23657
23633
  const { stdout: inkStdout, stderr: inkStderr } = createWorkingStdio();
23658
23634
  const instance = render(
23659
- process.env["DEBUG"] ? /* @__PURE__ */ jsx95(React21.StrictMode, { children: /* @__PURE__ */ jsx95(AppWrapper, {}) }) : /* @__PURE__ */ jsx95(AppWrapper, {}),
23635
+ process.env["DEBUG"] ? /* @__PURE__ */ jsx96(React21.StrictMode, { children: /* @__PURE__ */ jsx96(AppWrapper, {}) }) : /* @__PURE__ */ jsx96(AppWrapper, {}),
23660
23636
  {
23661
23637
  stdout: inkStdout,
23662
23638
  stderr: inkStderr,
@@ -23847,10 +23823,11 @@ function mergeToolPresentation(existing, next) {
23847
23823
  return { ...existing, ...next };
23848
23824
  }
23849
23825
  var DshSessionProjector = class {
23850
- constructor(sessionId = "dsh-console", model = "default", toolPresenter) {
23826
+ constructor(sessionId = "dsh-console", model = "default", toolPresenter, contextWindow2) {
23851
23827
  this.sessionId = sessionId;
23852
23828
  this.model = model;
23853
23829
  this.toolPresenter = toolPresenter;
23830
+ this.contextWindow = contextWindow2;
23854
23831
  }
23855
23832
  snapshot = {
23856
23833
  messages: [],
@@ -23871,7 +23848,8 @@ var DshSessionProjector = class {
23871
23848
  getSessionStats = () => ({
23872
23849
  sessionId: this.sessionId,
23873
23850
  metrics: this.metrics,
23874
- lastPromptTokenCount: this.lastPromptTokenCount
23851
+ lastPromptTokenCount: this.lastPromptTokenCount,
23852
+ ...this.contextWindow === void 0 ? {} : { contextWindow: this.contextWindow }
23875
23853
  });
23876
23854
  subscribe = (listener) => {
23877
23855
  this.listeners.add(listener);
@@ -24227,7 +24205,8 @@ var DshPromptCompletionRuntime = class {
24227
24205
  meta: { cwd: process.cwd() },
24228
24206
  agentOptions: {
24229
24207
  provider: selection.provider,
24230
- model: selection.model
24208
+ model: selection.model,
24209
+ ...selection.reasoningEffort === void 0 ? {} : { reasoningEffort: selection.reasoningEffort }
24231
24210
  },
24232
24211
  signal,
24233
24212
  setup: (agentCtx) => {
@@ -24288,8 +24267,8 @@ var DshPromptCompletionRuntime = class {
24288
24267
  };
24289
24268
 
24290
24269
  // src/dsh/prompt-input-runtime.ts
24291
- import { promises as fs14 } from "node:fs";
24292
- import path15 from "node:path";
24270
+ import { promises as fs13 } from "node:fs";
24271
+ import path14 from "node:path";
24293
24272
  var MAX_FILES = 50;
24294
24273
  var MAX_FILE_BYTES = 256 * 1024;
24295
24274
  var MAX_TOTAL_BYTES = 1024 * 1024;
@@ -24323,8 +24302,8 @@ function throwIfAborted(signal) {
24323
24302
  if (signal.aborted) throw abortError();
24324
24303
  }
24325
24304
  function isWithin(root, candidate) {
24326
- const relative2 = path15.relative(root, candidate);
24327
- return relative2 === "" || !relative2.startsWith("..") && !path15.isAbsolute(relative2);
24305
+ const relative2 = path14.relative(root, candidate);
24306
+ return relative2 === "" || !relative2.startsWith("..") && !path14.isAbsolute(relative2);
24328
24307
  }
24329
24308
  function parseReferences(text) {
24330
24309
  const references = [];
@@ -24353,14 +24332,14 @@ function parseReferences(text) {
24353
24332
  return references;
24354
24333
  }
24355
24334
  async function resolveReference(value, workspaceRoots, clipboardRoots) {
24356
- const candidates = path15.isAbsolute(value) ? [path15.resolve(value)] : workspaceRoots.map((root) => path15.resolve(root, value));
24335
+ const candidates = path14.isAbsolute(value) ? [path14.resolve(value)] : workspaceRoots.map((root) => path14.resolve(root, value));
24357
24336
  const isAllowedLexically = candidates.some(
24358
24337
  (candidate) => workspaceRoots.some((root) => isWithin(root, candidate)) || clipboardRoots.some((root) => isWithin(root, candidate))
24359
24338
  );
24360
24339
  if (!isAllowedLexically) throw new Error(`File reference is outside the workspace: @${value}`);
24361
24340
  for (const candidate of candidates) {
24362
24341
  try {
24363
- const realCandidate = await fs14.realpath(candidate);
24342
+ const realCandidate = await fs13.realpath(candidate);
24364
24343
  const workspaceRoot = workspaceRoots.find((root) => isWithin(root, realCandidate));
24365
24344
  if (workspaceRoot) return { path: realCandidate, kind: "workspace-file" };
24366
24345
  const clipboardRoot = clipboardRoots.find((root) => isWithin(root, realCandidate));
@@ -24376,20 +24355,20 @@ async function resolveReference(value, workspaceRoots, clipboardRoots) {
24376
24355
  async function collectFiles(candidate, root, signal, output) {
24377
24356
  throwIfAborted(signal);
24378
24357
  if (output.length >= MAX_FILES) return;
24379
- const stats = await fs14.lstat(candidate);
24358
+ const stats = await fs13.lstat(candidate);
24380
24359
  if (stats.isSymbolicLink()) return;
24381
24360
  if (stats.isFile()) {
24382
- if (!IMAGE_MEDIA_TYPES.has(path15.extname(candidate).toLowerCase())) output.push(candidate);
24361
+ if (!IMAGE_MEDIA_TYPES.has(path14.extname(candidate).toLowerCase())) output.push(candidate);
24383
24362
  return;
24384
24363
  }
24385
24364
  if (!stats.isDirectory()) return;
24386
- const entries = await fs14.readdir(candidate, { withFileTypes: true });
24365
+ const entries = await fs13.readdir(candidate, { withFileTypes: true });
24387
24366
  entries.sort((left, right) => left.name.localeCompare(right.name));
24388
24367
  for (const entry of entries) {
24389
24368
  if (output.length >= MAX_FILES) return;
24390
24369
  if (entry.name.startsWith(".")) continue;
24391
24370
  if (entry.isDirectory() && SKIPPED_DIRECTORIES.has(entry.name)) continue;
24392
- const child = path15.join(candidate, entry.name);
24371
+ const child = path14.join(candidate, entry.name);
24393
24372
  if (isWithin(root, child)) await collectFiles(child, root, signal, output);
24394
24373
  }
24395
24374
  }
@@ -24409,12 +24388,12 @@ var WorkspacePromptInputRuntime = class {
24409
24388
  }) {
24410
24389
  if (this.disposed) throw new Error("Prompt input runtime has been disposed.");
24411
24390
  throwIfAborted(signal);
24412
- const roots = await Promise.all(workspaceRoots.map((root) => fs14.realpath(root)));
24391
+ const roots = await Promise.all(workspaceRoots.map((root) => fs13.realpath(root)));
24413
24392
  const clipboardRoots = await Promise.all(clipboardImageRoots.map(async (root) => {
24414
24393
  try {
24415
- return await fs14.realpath(root);
24394
+ return await fs13.realpath(root);
24416
24395
  } catch (error) {
24417
- if (error.code === "ENOENT") return path15.resolve(root);
24396
+ if (error.code === "ENOENT") return path14.resolve(root);
24418
24397
  throw error;
24419
24398
  }
24420
24399
  }));
@@ -24425,14 +24404,14 @@ var WorkspacePromptInputRuntime = class {
24425
24404
  throwIfAborted(signal);
24426
24405
  const resolved = await resolveReference(reference.value, roots, clipboardRoots);
24427
24406
  if (!resolved) continue;
24428
- const stats = await fs14.stat(resolved.path);
24429
- const extension = path15.extname(resolved.path).toLowerCase();
24407
+ const stats = await fs13.stat(resolved.path);
24408
+ const extension = path14.extname(resolved.path).toLowerCase();
24430
24409
  const mediaType = IMAGE_MEDIA_TYPES.get(extension);
24431
24410
  if (stats.isFile() && mediaType) {
24432
24411
  images.set(reference.start, {
24433
24412
  type: "image-source",
24434
24413
  source: { kind: resolved.kind, path: resolved.path },
24435
- displayName: path15.basename(resolved.path),
24414
+ displayName: path14.basename(resolved.path),
24436
24415
  declaredMediaType: mediaType
24437
24416
  });
24438
24417
  continue;
@@ -24449,7 +24428,7 @@ var WorkspacePromptInputRuntime = class {
24449
24428
  if (stats.size > MAX_FILE_BYTES) {
24450
24429
  throw new Error(`Referenced text file is too large: @${reference.value}`);
24451
24430
  }
24452
- const candidate = await fs14.readFile(resolved.path, { signal });
24431
+ const candidate = await fs13.readFile(resolved.path, { signal });
24453
24432
  try {
24454
24433
  if (candidate.includes(0)) throw new Error("binary");
24455
24434
  new TextDecoder("utf-8", { fatal: true }).decode(candidate);
@@ -24477,9 +24456,9 @@ var WorkspacePromptInputRuntime = class {
24477
24456
  let totalBytes = 0;
24478
24457
  for (const { file, root } of uniqueFiles) {
24479
24458
  throwIfAborted(signal);
24480
- const stats = await fs14.stat(file);
24459
+ const stats = await fs13.stat(file);
24481
24460
  if (stats.size > MAX_FILE_BYTES || totalBytes + stats.size > MAX_TOTAL_BYTES) continue;
24482
- const buffer = await fs14.readFile(file, { signal });
24461
+ const buffer = await fs13.readFile(file, { signal });
24483
24462
  if (buffer.includes(0)) continue;
24484
24463
  let content2;
24485
24464
  try {
@@ -24488,7 +24467,7 @@ var WorkspacePromptInputRuntime = class {
24488
24467
  continue;
24489
24468
  }
24490
24469
  totalBytes += stats.size;
24491
- const label = path15.relative(root, file).split(path15.sep).join("/");
24470
+ const label = path14.relative(root, file).split(path14.sep).join("/");
24492
24471
  sections.push(`Content from @${label}:
24493
24472
  ${content2}`);
24494
24473
  }
@@ -24693,7 +24672,7 @@ var DshToolPresentationAdapter = class {
24693
24672
  };
24694
24673
 
24695
24674
  // src/dsh/attachment-input-adapter.ts
24696
- import { promises as fs15 } from "node:fs";
24675
+ import { promises as fs14 } from "node:fs";
24697
24676
  import { isImageAdmissionError } from "@deepseek-ai/dsh-attachment";
24698
24677
  var IMAGE_MEDIA_TYPES2 = /* @__PURE__ */ new Set([
24699
24678
  "image/png",
@@ -24726,7 +24705,7 @@ var DshAttachmentInputAdapter = class {
24726
24705
  signal.throwIfAborted();
24727
24706
  const images = imageParts(content);
24728
24707
  const inputs = await Promise.all(images.map(async (part) => ({
24729
- data: new Uint8Array(await fs15.readFile(part.source.path, { signal })),
24708
+ data: new Uint8Array(await fs14.readFile(part.source.path, { signal })),
24730
24709
  mediaType: imageMediaType(part.declaredMediaType),
24731
24710
  name: part.displayName
24732
24711
  })));
@@ -24754,17 +24733,48 @@ var DshAttachmentInputAdapter = class {
24754
24733
  import { unlink as unlink3 } from "node:fs/promises";
24755
24734
 
24756
24735
  // src/dsh/model-selection-runtime.ts
24736
+ import { ReasoningEffortId } from "@deepseek-ai/dsh-llm";
24757
24737
  function inputModalities(model) {
24758
24738
  return (model.inputModalities ?? ["text"]).filter(
24759
24739
  (modality) => modality === "text" || modality === "image"
24760
24740
  );
24761
24741
  }
24762
- function modelSelectionView(model) {
24742
+ function contextWindow(model) {
24743
+ return "context" in model ? model.context?.contextWindow : void 0;
24744
+ }
24745
+ function modelSelectionView(model, selectedEffort) {
24746
+ const resolvedContextWindow = contextWindow(model);
24747
+ const reasoning = "reasoning" in model ? model.reasoning : void 0;
24748
+ if (selectedEffort !== void 0 && !reasoning?.efforts.some((effort) => String(effort.id) === selectedEffort)) {
24749
+ throw new Error(
24750
+ `Reasoning effort ${selectedEffort} is not available for ${model.provider}/${model.id}.`
24751
+ );
24752
+ }
24763
24753
  return {
24764
24754
  provider: model.provider,
24765
24755
  model: model.id,
24766
24756
  name: model.name,
24767
- inputModalities: inputModalities(model)
24757
+ inputModalities: inputModalities(model),
24758
+ ...resolvedContextWindow === void 0 ? {} : { contextWindow: resolvedContextWindow },
24759
+ ...reasoning === void 0 ? {} : {
24760
+ reasoning: {
24761
+ efforts: reasoning.efforts.map((effort) => ({
24762
+ id: String(effort.id),
24763
+ name: effort.name,
24764
+ ...effort.description === void 0 ? {} : { description: effort.description }
24765
+ })),
24766
+ ...reasoning.defaultEffort === void 0 ? {} : { defaultEffort: String(reasoning.defaultEffort) },
24767
+ ...selectedEffort === void 0 ? {} : { selectedEffort }
24768
+ }
24769
+ }
24770
+ };
24771
+ }
24772
+ function modelSelectionFromView(selection) {
24773
+ const reasoningEffort = selection.reasoning?.selectedEffort;
24774
+ return {
24775
+ provider: selection.provider,
24776
+ model: selection.model,
24777
+ ...reasoningEffort === void 0 ? {} : { reasoningEffort: ReasoningEffortId(reasoningEffort) }
24768
24778
  };
24769
24779
  }
24770
24780
  var DshModelSelectionRuntime = class _DshModelSelectionRuntime {
@@ -24779,7 +24789,10 @@ var DshModelSelectionRuntime = class _DshModelSelectionRuntime {
24779
24789
  snapshot;
24780
24790
  static async create(llm, defaults, activate, conversationExists, signal) {
24781
24791
  const selection = defaults.currentSelection();
24782
- const current = modelSelectionView(await llm.resolveModelInfo(selection.provider, selection.model, signal));
24792
+ const current = modelSelectionView(
24793
+ await llm.resolveModelInfo(selection.provider, selection.model, signal),
24794
+ selection.reasoningEffort === void 0 ? void 0 : String(selection.reasoningEffort)
24795
+ );
24783
24796
  signal?.throwIfAborted();
24784
24797
  return new _DshModelSelectionRuntime(llm, defaults, activate, conversationExists, current);
24785
24798
  }
@@ -24799,23 +24812,41 @@ var DshModelSelectionRuntime = class _DshModelSelectionRuntime {
24799
24812
  })
24800
24813
  );
24801
24814
  signal?.throwIfAborted();
24802
- return models.flat().map(modelSelectionView);
24815
+ return Promise.all(
24816
+ models.flat().map(async (model) => {
24817
+ signal?.throwIfAborted();
24818
+ try {
24819
+ const resolved = await this.llm.resolveModelInfo(
24820
+ model.provider,
24821
+ model.id,
24822
+ signal
24823
+ );
24824
+ signal?.throwIfAborted();
24825
+ return modelSelectionView(resolved);
24826
+ } catch (cause) {
24827
+ signal?.throwIfAborted();
24828
+ if (cause instanceof Error && cause.name === "AbortError") throw cause;
24829
+ return modelSelectionView(model);
24830
+ }
24831
+ })
24832
+ );
24803
24833
  }
24804
24834
  hasConversation = () => this.conversationExists();
24805
- async setModel(provider, model, signal) {
24806
- const resolved = modelSelectionView(await this.llm.resolveModelInfo(provider, model, signal));
24835
+ async setModel(selection, signal) {
24836
+ const resolved = modelSelectionView(
24837
+ await this.llm.resolveModelInfo(selection.provider, selection.model, signal),
24838
+ selection.reasoningEffort
24839
+ );
24807
24840
  signal?.throwIfAborted();
24808
24841
  const previousDefault = this.snapshot.default;
24809
- await this.defaults.saveSelection({ provider, model });
24842
+ const selected = modelSelectionFromView(resolved);
24843
+ await this.defaults.saveSelection(selected);
24810
24844
  try {
24811
24845
  signal?.throwIfAborted();
24812
- await this.activate({ provider, model });
24846
+ await this.activate(selected);
24813
24847
  } catch (cause) {
24814
24848
  try {
24815
- await this.defaults.saveSelection({
24816
- provider: previousDefault.provider,
24817
- model: previousDefault.model
24818
- });
24849
+ await this.defaults.saveSelection(modelSelectionFromView(previousDefault));
24819
24850
  } catch (rollbackError) {
24820
24851
  throw new AggregateError(
24821
24852
  [cause, rollbackError],
@@ -24942,7 +24973,7 @@ var DshSessionManagementRuntime = class {
24942
24973
  signal?.throwIfAborted();
24943
24974
  const current = this.callbacks.currentSelection();
24944
24975
  const sessionId = await this.callbacks.createFresh(
24945
- { provider: current.provider, model: current.model },
24976
+ modelSelectionFromView(current),
24946
24977
  signal
24947
24978
  );
24948
24979
  this.commitCurrentSession(sessionId);
@@ -24978,10 +25009,14 @@ var DshSessionManagementRuntime = class {
24978
25009
  signal
24979
25010
  );
24980
25011
  signal?.throwIfAborted();
24981
- const selected = modelSelectionView(resolved);
25012
+ const explicitReasoningEffort = header.adapterDefaults?.reasoningEffort ? void 0 : header.config.reasoningEffort;
25013
+ const selected = modelSelectionView(
25014
+ resolved,
25015
+ explicitReasoningEffort === void 0 ? void 0 : String(explicitReasoningEffort)
25016
+ );
24982
25017
  const resumedSessionId = await this.callbacks.resume(
24983
25018
  id,
24984
- { provider: selected.provider, model: selected.model },
25019
+ modelSelectionFromView(selected),
24985
25020
  signal
24986
25021
  );
24987
25022
  this.callbacks.adoptCurrentModel(selected);
@@ -25449,9 +25484,9 @@ function throwIfAborted2(signal) {
25449
25484
  throw new DOMException("The operation was aborted.", "AbortError");
25450
25485
  }
25451
25486
  }
25452
- function valueAtPath(value, path16) {
25487
+ function valueAtPath(value, path15) {
25453
25488
  let current = value;
25454
- for (const segment of path16) {
25489
+ for (const segment of path15) {
25455
25490
  if (typeof current !== "object" || current === null) return void 0;
25456
25491
  current = current[segment];
25457
25492
  }
@@ -25685,7 +25720,17 @@ async function start(ctx, config) {
25685
25720
  const promptInputRuntime = new WorkspacePromptInputRuntime();
25686
25721
  const attachmentInput = new DshAttachmentInputAdapter(attachments);
25687
25722
  const createActiveConversation = async (selected, options = {}) => {
25688
- const agentOptions = { provider: selected.provider, model: selected.model };
25723
+ const modelInfo = await llm.resolveModelInfo(
25724
+ selected.provider,
25725
+ selected.model,
25726
+ options.signal
25727
+ );
25728
+ options.signal?.throwIfAborted();
25729
+ const agentOptions = {
25730
+ provider: selected.provider,
25731
+ model: selected.model,
25732
+ ...selected.reasoningEffort === void 0 ? {} : { reasoningEffort: selected.reasoningEffort }
25733
+ };
25689
25734
  const setup = (agentCtx) => {
25690
25735
  const ref = {
25691
25736
  current: selected,
@@ -25710,7 +25755,8 @@ async function start(ctx, config) {
25710
25755
  const projector = new DshSessionProjector(
25711
25756
  String(handle.agent.session.id),
25712
25757
  String(selected.model),
25713
- new DshToolPresentationAdapter(tools, handle.agent)
25758
+ new DshToolPresentationAdapter(tools, handle.agent),
25759
+ modelInfo.context?.contextWindow
25714
25760
  );
25715
25761
  if (options.resumeSessionId !== void 0)
25716
25762
  projector.replay(handle.agent.session.events);