@hasna/assistants 1.1.65 → 1.1.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2055,6 +2055,8 @@ var init_models = __esm(() => {
2055
2055
  description: "Powerful reasoning model",
2056
2056
  contextWindow: 200000,
2057
2057
  maxOutputTokens: 1e5,
2058
+ inputCostPer1M: 2,
2059
+ outputCostPer1M: 8,
2058
2060
  supportsTools: true,
2059
2061
  supportsStreaming: true
2060
2062
  },
@@ -2065,6 +2067,8 @@ var init_models = __esm(() => {
2065
2067
  description: "Compact reasoning model",
2066
2068
  contextWindow: 200000,
2067
2069
  maxOutputTokens: 1e5,
2070
+ inputCostPer1M: 1.1,
2071
+ outputCostPer1M: 4.4,
2068
2072
  supportsTools: true,
2069
2073
  supportsStreaming: true
2070
2074
  },
@@ -2102,7 +2106,7 @@ var init_models = __esm(() => {
2102
2106
  contextWindow: 400000,
2103
2107
  maxOutputTokens: 128000,
2104
2108
  inputCostPer1M: 21,
2105
- outputCostPer1M: 84,
2109
+ outputCostPer1M: 168,
2106
2110
  supportsTools: true,
2107
2111
  supportsStreaming: true,
2108
2112
  notes: "Supports xhigh reasoning effort"
@@ -2141,6 +2145,8 @@ var init_models = __esm(() => {
2141
2145
  description: "High quality general model",
2142
2146
  contextWindow: 128000,
2143
2147
  maxOutputTokens: 8192,
2148
+ inputCostPer1M: 2,
2149
+ outputCostPer1M: 6,
2144
2150
  supportsTools: true,
2145
2151
  supportsStreaming: true
2146
2152
  },
@@ -2151,6 +2157,8 @@ var init_models = __esm(() => {
2151
2157
  description: "Fast, cost-effective model",
2152
2158
  contextWindow: 128000,
2153
2159
  maxOutputTokens: 8192,
2160
+ inputCostPer1M: 0.1,
2161
+ outputCostPer1M: 0.3,
2154
2162
  supportsTools: true,
2155
2163
  supportsStreaming: true
2156
2164
  },
@@ -2161,6 +2169,8 @@ var init_models = __esm(() => {
2161
2169
  description: "Latest flagship model",
2162
2170
  contextWindow: 131072,
2163
2171
  maxOutputTokens: 16384,
2172
+ inputCostPer1M: 3,
2173
+ outputCostPer1M: 15,
2164
2174
  supportsTools: true,
2165
2175
  supportsStreaming: true
2166
2176
  },
@@ -2171,6 +2181,8 @@ var init_models = __esm(() => {
2171
2181
  description: "Prior flagship model",
2172
2182
  contextWindow: 131072,
2173
2183
  maxOutputTokens: 16384,
2184
+ inputCostPer1M: 3,
2185
+ outputCostPer1M: 15,
2174
2186
  supportsTools: true,
2175
2187
  supportsStreaming: true
2176
2188
  },
@@ -2181,6 +2193,8 @@ var init_models = __esm(() => {
2181
2193
  description: "Lightweight Grok variant",
2182
2194
  contextWindow: 131072,
2183
2195
  maxOutputTokens: 16384,
2196
+ inputCostPer1M: 0.3,
2197
+ outputCostPer1M: 0.5,
2184
2198
  supportsTools: true,
2185
2199
  supportsStreaming: true
2186
2200
  },
@@ -2191,6 +2205,8 @@ var init_models = __esm(() => {
2191
2205
  description: "Most capable preview model",
2192
2206
  contextWindow: 1048576,
2193
2207
  maxOutputTokens: 65536,
2208
+ inputCostPer1M: 2,
2209
+ outputCostPer1M: 12,
2194
2210
  supportsTools: true,
2195
2211
  supportsStreaming: true
2196
2212
  },
@@ -2201,6 +2217,8 @@ var init_models = __esm(() => {
2201
2217
  description: "Image generation preview model",
2202
2218
  contextWindow: 65536,
2203
2219
  maxOutputTokens: 32768,
2220
+ inputCostPer1M: 2,
2221
+ outputCostPer1M: 12,
2204
2222
  supportsTools: true,
2205
2223
  supportsStreaming: true
2206
2224
  },
@@ -2211,6 +2229,8 @@ var init_models = __esm(() => {
2211
2229
  description: "Fast preview model",
2212
2230
  contextWindow: 1048576,
2213
2231
  maxOutputTokens: 65536,
2232
+ inputCostPer1M: 0.15,
2233
+ outputCostPer1M: 0.6,
2214
2234
  supportsTools: true,
2215
2235
  supportsStreaming: true
2216
2236
  },
@@ -2221,6 +2241,8 @@ var init_models = __esm(() => {
2221
2241
  description: "Most capable Gemini 2.5 model",
2222
2242
  contextWindow: 1048576,
2223
2243
  maxOutputTokens: 65536,
2244
+ inputCostPer1M: 1.25,
2245
+ outputCostPer1M: 10,
2224
2246
  supportsTools: true,
2225
2247
  supportsStreaming: true
2226
2248
  },
@@ -2231,6 +2253,8 @@ var init_models = __esm(() => {
2231
2253
  description: "Fast Gemini 2.5 model",
2232
2254
  contextWindow: 1048576,
2233
2255
  maxOutputTokens: 65536,
2256
+ inputCostPer1M: 0.15,
2257
+ outputCostPer1M: 0.6,
2234
2258
  supportsTools: true,
2235
2259
  supportsStreaming: true
2236
2260
  },
@@ -2241,6 +2265,8 @@ var init_models = __esm(() => {
2241
2265
  description: "Lightweight Gemini 2.5 model",
2242
2266
  contextWindow: 1048576,
2243
2267
  maxOutputTokens: 65536,
2268
+ inputCostPer1M: 0.1,
2269
+ outputCostPer1M: 0.4,
2244
2270
  supportsTools: true,
2245
2271
  supportsStreaming: true
2246
2272
  },
@@ -2251,6 +2277,8 @@ var init_models = __esm(() => {
2251
2277
  description: "Image-capable Gemini 2.5 Flash",
2252
2278
  contextWindow: 65536,
2253
2279
  maxOutputTokens: 32768,
2280
+ inputCostPer1M: 0.15,
2281
+ outputCostPer1M: 0.6,
2254
2282
  supportsTools: true,
2255
2283
  supportsStreaming: true
2256
2284
  },
@@ -89177,7 +89205,7 @@ Not a git repository or git not available.
89177
89205
  context.setProjectContext(projectContext);
89178
89206
  }
89179
89207
  }
89180
- var VERSION2 = "1.1.65";
89208
+ var VERSION2 = "1.1.67";
89181
89209
  var init_builtin = __esm(async () => {
89182
89210
  init_src2();
89183
89211
  init_context3();
@@ -256277,91 +256305,174 @@ function BudgetsPanel({
256277
256305
  }
256278
256306
 
256279
256307
  // packages/terminal/src/components/ModelPanel.tsx
256280
- init_src2();
256281
256308
  await init_build2();
256282
256309
  var import_react72 = __toESM(require_react(), 1);
256310
+ init_src2();
256283
256311
  var jsx_dev_runtime36 = __toESM(require_jsx_dev_runtime(), 1);
256312
+ var MAX_VISIBLE_ROWS4 = 12;
256313
+ var NAME_WIDTH = 28;
256314
+ var CTX_WIDTH = 6;
256315
+ var OUT_WIDTH = 6;
256316
+ var COST_WIDTH = 10;
256317
+ function fmtTokens(n5) {
256318
+ if (n5 == null)
256319
+ return "\u2014";
256320
+ if (n5 >= 1e6)
256321
+ return `${(n5 / 1e6).toFixed(n5 % 1e6 === 0 ? 0 : 1)}M`;
256322
+ if (n5 >= 1000)
256323
+ return `${Math.round(n5 / 1000)}K`;
256324
+ return String(n5);
256325
+ }
256326
+ function fmtCost(model) {
256327
+ if (model.inputCostPer1M == null || model.outputCostPer1M == null)
256328
+ return "\u2014";
256329
+ const fmtNum = (n5) => n5 >= 1 ? `$${n5 % 1 === 0 ? n5 : n5.toFixed(1)}` : `$${n5}`;
256330
+ return `${fmtNum(model.inputCostPer1M)}/${fmtNum(model.outputCostPer1M)}`;
256331
+ }
256332
+ function padRight(s5, w4) {
256333
+ return s5.length >= w4 ? s5.slice(0, w4) : s5 + " ".repeat(w4 - s5.length);
256334
+ }
256335
+ function padLeft(s5, w4) {
256336
+ return s5.length >= w4 ? s5.slice(0, w4) : " ".repeat(w4 - s5.length) + s5;
256337
+ }
256338
+ function getVisibleRange6(selectedIndex, totalItems, maxVisible = MAX_VISIBLE_ROWS4) {
256339
+ if (totalItems <= maxVisible) {
256340
+ return { start: 0, end: totalItems, hasMore: { above: 0, below: 0 } };
256341
+ }
256342
+ const halfWindow = Math.floor(maxVisible / 2);
256343
+ let start = selectedIndex - halfWindow;
256344
+ let end = selectedIndex + (maxVisible - halfWindow);
256345
+ if (start < 0) {
256346
+ start = 0;
256347
+ end = maxVisible;
256348
+ }
256349
+ if (end > totalItems) {
256350
+ end = totalItems;
256351
+ start = Math.max(0, totalItems - maxVisible);
256352
+ }
256353
+ return { start, end, hasMore: { above: start, below: totalItems - end } };
256354
+ }
256355
+ function buildRows(models2) {
256356
+ const rows = [];
256357
+ for (const provider3 of LLM_PROVIDER_IDS) {
256358
+ const providerModels = models2.filter((m5) => m5.provider === provider3);
256359
+ if (providerModels.length === 0)
256360
+ continue;
256361
+ rows.push({ type: "provider", label: getProviderLabel(provider3) });
256362
+ for (const model of providerModels) {
256363
+ rows.push({ type: "model", model });
256364
+ }
256365
+ }
256366
+ return rows;
256367
+ }
256368
+ function getSelectableIndices(rows) {
256369
+ return rows.reduce((acc, row, i6) => {
256370
+ if (row.type === "model")
256371
+ acc.push(i6);
256372
+ return acc;
256373
+ }, []);
256374
+ }
256284
256375
  function ModelPanel({
256285
256376
  currentModelId,
256286
256377
  assistantName,
256287
256378
  onSelectModel,
256288
256379
  onCancel
256289
256380
  }) {
256290
- const [selectedIndex, setSelectedIndex] = import_react72.useState(0);
256381
+ const [selectedRowIndex, setSelectedRowIndex] = import_react72.useState(0);
256291
256382
  const [isSwitching, setIsSwitching] = import_react72.useState(false);
256292
256383
  const [status, setStatus] = import_react72.useState(null);
256293
- const models2 = import_react72.useMemo(() => {
256294
- const ordered = [];
256295
- for (const provider3 of LLM_PROVIDER_IDS) {
256296
- ordered.push(...ALL_MODELS.filter((model) => model.provider === provider3));
256297
- }
256298
- return ordered;
256299
- }, []);
256300
- const rows = import_react72.useMemo(() => {
256301
- const nextRows = [];
256302
- let modelIndex = 0;
256303
- for (const provider3 of LLM_PROVIDER_IDS) {
256304
- const providerModels = models2.filter((model) => model.provider === provider3);
256305
- if (providerModels.length === 0)
256306
- continue;
256307
- nextRows.push({
256308
- type: "provider",
256309
- key: `provider-${provider3}`,
256310
- label: getProviderLabel(provider3)
256311
- });
256312
- for (const model of providerModels) {
256313
- nextRows.push({
256314
- type: "model",
256315
- key: model.id,
256316
- model,
256317
- index: modelIndex
256318
- });
256319
- modelIndex += 1;
256320
- }
256321
- }
256322
- return nextRows;
256323
- }, [models2]);
256384
+ const [isSearching, setIsSearching] = import_react72.useState(false);
256385
+ const [searchQuery, setSearchQuery] = import_react72.useState("");
256386
+ const filteredModels = import_react72.useMemo(() => {
256387
+ if (!searchQuery.trim())
256388
+ return [...ALL_MODELS];
256389
+ const q5 = searchQuery.toLowerCase();
256390
+ return ALL_MODELS.filter((m5) => m5.name.toLowerCase().includes(q5) || m5.id.toLowerCase().includes(q5));
256391
+ }, [searchQuery]);
256392
+ const rows = import_react72.useMemo(() => buildRows(filteredModels), [filteredModels]);
256393
+ const selectableIndices = import_react72.useMemo(() => getSelectableIndices(rows), [rows]);
256324
256394
  import_react72.useEffect(() => {
256325
256395
  if (!currentModelId)
256326
256396
  return;
256327
- const idx = models2.findIndex((model) => model.id === currentModelId);
256397
+ const idx = rows.findIndex((r5) => r5.type === "model" && r5.model.id === currentModelId);
256328
256398
  if (idx >= 0)
256329
- setSelectedIndex(idx);
256330
- }, [currentModelId, models2]);
256399
+ setSelectedRowIndex(idx);
256400
+ }, [currentModelId, rows]);
256401
+ import_react72.useEffect(() => {
256402
+ if (selectableIndices.length === 0)
256403
+ return;
256404
+ if (!selectableIndices.includes(selectedRowIndex)) {
256405
+ setSelectedRowIndex(selectableIndices[0]);
256406
+ }
256407
+ }, [selectableIndices, selectedRowIndex]);
256408
+ const moveSelection = (direction) => {
256409
+ if (selectableIndices.length === 0)
256410
+ return;
256411
+ const currentPos = selectableIndices.indexOf(selectedRowIndex);
256412
+ let nextPos;
256413
+ if (currentPos === -1) {
256414
+ nextPos = direction === 1 ? 0 : selectableIndices.length - 1;
256415
+ } else {
256416
+ nextPos = currentPos + direction;
256417
+ if (nextPos < 0)
256418
+ nextPos = selectableIndices.length - 1;
256419
+ if (nextPos >= selectableIndices.length)
256420
+ nextPos = 0;
256421
+ }
256422
+ setSelectedRowIndex(selectableIndices[nextPos]);
256423
+ };
256424
+ const handleSelect = () => {
256425
+ const row = rows[selectedRowIndex];
256426
+ if (!row || row.type !== "model")
256427
+ return;
256428
+ if (row.model.id === currentModelId) {
256429
+ setStatus({ type: "info", text: `${row.model.name} is already active.` });
256430
+ return;
256431
+ }
256432
+ setIsSwitching(true);
256433
+ onSelectModel(row.model.id).then(() => {
256434
+ setStatus({ type: "success", text: `Switched to ${row.model.name}.` });
256435
+ }).catch((err) => {
256436
+ const message = err instanceof Error ? err.message : String(err);
256437
+ setStatus({ type: "error", text: message });
256438
+ }).finally(() => {
256439
+ setIsSwitching(false);
256440
+ });
256441
+ };
256331
256442
  useSafeInput((input, key) => {
256332
256443
  if (isSwitching)
256333
256444
  return;
256445
+ if (isSearching) {
256446
+ if (key.escape) {
256447
+ setIsSearching(false);
256448
+ setSearchQuery("");
256449
+ return;
256450
+ }
256451
+ return;
256452
+ }
256334
256453
  if (key.escape || input === "q" || input === "Q") {
256335
256454
  onCancel();
256336
256455
  return;
256337
256456
  }
256457
+ if (input === "/") {
256458
+ setIsSearching(true);
256459
+ setSearchQuery("");
256460
+ return;
256461
+ }
256338
256462
  if (key.upArrow || input === "k") {
256339
- setSelectedIndex((prev) => prev <= 0 ? Math.max(0, models2.length - 1) : prev - 1);
256463
+ moveSelection(-1);
256340
256464
  return;
256341
256465
  }
256342
256466
  if (key.downArrow || input === "j") {
256343
- setSelectedIndex((prev) => prev >= models2.length - 1 ? 0 : prev + 1);
256467
+ moveSelection(1);
256344
256468
  return;
256345
256469
  }
256346
256470
  if (key.return || input === "s" || input === "S") {
256347
- const selected = models2[selectedIndex];
256348
- if (!selected)
256349
- return;
256350
- if (selected.id === currentModelId) {
256351
- setStatus({ type: "info", text: `${selected.name} is already active.` });
256352
- return;
256353
- }
256354
- setIsSwitching(true);
256355
- onSelectModel(selected.id).then(() => {
256356
- setStatus({ type: "success", text: `Switched to ${selected.name}.` });
256357
- }).catch((err) => {
256358
- const message = err instanceof Error ? err.message : String(err);
256359
- setStatus({ type: "error", text: message });
256360
- }).finally(() => {
256361
- setIsSwitching(false);
256362
- });
256471
+ handleSelect();
256363
256472
  }
256364
256473
  }, { isActive: true });
256474
+ const visibleRange = import_react72.useMemo(() => getVisibleRange6(selectedRowIndex, rows.length), [selectedRowIndex, rows.length]);
256475
+ const visibleRows = rows.slice(visibleRange.start, visibleRange.end);
256365
256476
  return /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Box_default, {
256366
256477
  flexDirection: "column",
256367
256478
  paddingY: 1,
@@ -256403,67 +256514,124 @@ function ModelPanel({
256403
256514
  children: status.text
256404
256515
  }, undefined, false, undefined, this)
256405
256516
  }, undefined, false, undefined, this),
256517
+ isSearching && /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Box_default, {
256518
+ marginBottom: 1,
256519
+ children: [
256520
+ /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256521
+ bold: true,
256522
+ color: "blue",
256523
+ children: "/ "
256524
+ }, undefined, false, undefined, this),
256525
+ /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(build_default2, {
256526
+ value: searchQuery,
256527
+ onChange: setSearchQuery,
256528
+ placeholder: "Search models..."
256529
+ }, undefined, false, undefined, this)
256530
+ ]
256531
+ }, undefined, true, undefined, this),
256532
+ visibleRange.hasMore.above > 0 && /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Box_default, {
256533
+ paddingLeft: 2,
256534
+ children: /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256535
+ dimColor: true,
256536
+ children: [
256537
+ "\u2191 ",
256538
+ visibleRange.hasMore.above,
256539
+ " more"
256540
+ ]
256541
+ }, undefined, true, undefined, this)
256542
+ }, undefined, false, undefined, this),
256543
+ /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Box_default, {
256544
+ paddingLeft: 2,
256545
+ children: /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256546
+ dimColor: true,
256547
+ children: [
256548
+ padRight("Model", NAME_WIDTH),
256549
+ padLeft("Ctx", CTX_WIDTH),
256550
+ padLeft("Out", OUT_WIDTH),
256551
+ padLeft("Cost/1M", COST_WIDTH)
256552
+ ]
256553
+ }, undefined, true, undefined, this)
256554
+ }, undefined, false, undefined, this),
256406
256555
  /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Box_default, {
256407
256556
  flexDirection: "column",
256408
- borderStyle: "round",
256409
- borderColor: "#d4d4d8",
256410
- borderLeft: false,
256411
- borderRight: false,
256412
- paddingX: 1,
256413
- children: rows.map((row) => {
256557
+ children: visibleRows.map((row, i6) => {
256558
+ const globalIndex = visibleRange.start + i6;
256414
256559
  if (row.type === "provider") {
256415
256560
  return /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Box_default, {
256416
- marginTop: 1,
256561
+ paddingLeft: 1,
256417
256562
  children: /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256418
256563
  bold: true,
256419
256564
  color: "cyan",
256420
- children: row.label
256421
- }, undefined, false, undefined, this)
256422
- }, row.key, false, undefined, this);
256565
+ children: [
256566
+ " ",
256567
+ row.label
256568
+ ]
256569
+ }, undefined, true, undefined, this)
256570
+ }, `p-${row.label}`, false, undefined, this);
256423
256571
  }
256424
- const isSelected = row.index === selectedIndex;
256572
+ const isSelected = globalIndex === selectedRowIndex;
256425
256573
  const isCurrent = row.model.id === currentModelId;
256574
+ const prefix = isSelected ? "\u25B8 " : " ";
256575
+ const name = padRight(row.model.name, NAME_WIDTH);
256576
+ const ctx = padLeft(fmtTokens(row.model.contextWindow), CTX_WIDTH);
256577
+ const out = padLeft(fmtTokens(row.model.maxOutputTokens), OUT_WIDTH);
256578
+ const cost = padLeft(fmtCost(row.model), COST_WIDTH);
256426
256579
  return /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Box_default, {
256427
- flexDirection: "column",
256428
- marginBottom: 1,
256429
256580
  children: [
256430
- /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Box_default, {
256581
+ /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256582
+ color: isSelected ? "blue" : undefined,
256583
+ children: prefix
256584
+ }, undefined, false, undefined, this),
256585
+ /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256586
+ bold: isSelected,
256587
+ color: isSelected ? "blue" : undefined,
256588
+ children: name
256589
+ }, undefined, false, undefined, this),
256590
+ /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256591
+ dimColor: !isSelected,
256592
+ color: isSelected ? "blue" : undefined,
256431
256593
  children: [
256432
- /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256433
- color: isSelected ? "blue" : undefined,
256434
- children: isSelected ? "\u25B8 " : " "
256435
- }, undefined, false, undefined, this),
256436
- /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256437
- bold: isSelected,
256438
- color: isSelected ? "blue" : undefined,
256439
- children: row.model.name
256440
- }, undefined, false, undefined, this),
256441
- isCurrent && /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256442
- color: "green",
256443
- children: " (current)"
256444
- }, undefined, false, undefined, this)
256594
+ ctx,
256595
+ out,
256596
+ cost
256445
256597
  ]
256446
256598
  }, undefined, true, undefined, this),
256447
- /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Box_default, {
256448
- paddingLeft: 2,
256449
- children: /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256450
- dimColor: true,
256451
- children: [
256452
- row.model.id,
256453
- " \xB7 ",
256454
- row.model.description
256455
- ]
256456
- }, undefined, true, undefined, this)
256599
+ isCurrent && /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256600
+ color: "green",
256601
+ children: " \u2190 current"
256457
256602
  }, undefined, false, undefined, this)
256458
256603
  ]
256459
- }, row.key, true, undefined, this);
256604
+ }, row.model.id, true, undefined, this);
256460
256605
  })
256461
256606
  }, undefined, false, undefined, this),
256607
+ visibleRange.hasMore.below > 0 && /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Box_default, {
256608
+ paddingLeft: 2,
256609
+ children: /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256610
+ dimColor: true,
256611
+ children: [
256612
+ "\u2193 ",
256613
+ visibleRange.hasMore.below,
256614
+ " more"
256615
+ ]
256616
+ }, undefined, true, undefined, this)
256617
+ }, undefined, false, undefined, this),
256618
+ selectableIndices.length === 0 && isSearching && /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Box_default, {
256619
+ paddingLeft: 2,
256620
+ marginY: 1,
256621
+ children: /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256622
+ dimColor: true,
256623
+ children: [
256624
+ 'No models match "',
256625
+ searchQuery,
256626
+ '"'
256627
+ ]
256628
+ }, undefined, true, undefined, this)
256629
+ }, undefined, false, undefined, this),
256462
256630
  /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Box_default, {
256463
256631
  marginTop: 1,
256464
256632
  children: /* @__PURE__ */ jsx_dev_runtime36.jsxDEV(Text, {
256465
256633
  dimColor: true,
256466
- children: isSwitching ? "Switching model..." : "Enter/s switch | \u2191\u2193 navigate | q quit"
256634
+ children: isSwitching ? "Switching model..." : isSearching ? "Type to filter | Esc clear search" : "Enter select | \u2191\u2193 navigate | / search | q quit"
256467
256635
  }, undefined, false, undefined, this)
256468
256636
  }, undefined, false, undefined, this)
256469
256637
  ]
@@ -258450,7 +258618,7 @@ var SCOPE_OPTIONS = [
258450
258618
  { id: "global", label: "Global", desc: "Available everywhere (~/.skill/)" }
258451
258619
  ];
258452
258620
  var MAX_VISIBLE_SKILLS = 10;
258453
- function getVisibleRange6(selectedIndex, totalItems, maxVisible = MAX_VISIBLE_SKILLS) {
258621
+ function getVisibleRange7(selectedIndex, totalItems, maxVisible = MAX_VISIBLE_SKILLS) {
258454
258622
  if (totalItems <= maxVisible) {
258455
258623
  return {
258456
258624
  start: 0,
@@ -259368,7 +259536,7 @@ function SkillsPanel({
259368
259536
  }
259369
259537
  const totalSkills = sortedSkills.length;
259370
259538
  const selectedForRange = totalSkills === 0 ? 0 : Math.min(selectedIndex, totalSkills - 1);
259371
- const skillRange = getVisibleRange6(selectedForRange, totalSkills, MAX_VISIBLE_SKILLS);
259539
+ const skillRange = getVisibleRange7(selectedForRange, totalSkills, MAX_VISIBLE_SKILLS);
259372
259540
  const visibleSkills = sortedSkills.slice(skillRange.start, skillRange.end);
259373
259541
  const visibleEntries = visibleSkills.map((skill, offset) => {
259374
259542
  const actualIdx = skillRange.start + offset;
@@ -260844,7 +261012,7 @@ var ADD_FIELDS = [
260844
261012
  { key: "expiryYear", label: "Expiry Year", placeholder: "YYYY" },
260845
261013
  { key: "cvv", label: "CVV", placeholder: "3-4 digits", sensitive: true }
260846
261014
  ];
260847
- function getVisibleRange7(selectedIndex, totalItems, maxVisible = MAX_VISIBLE_ITEMS5) {
261015
+ function getVisibleRange8(selectedIndex, totalItems, maxVisible = MAX_VISIBLE_ITEMS5) {
260848
261016
  if (totalItems <= maxVisible) {
260849
261017
  return {
260850
261018
  start: 0,
@@ -260934,7 +261102,7 @@ function WalletPanel({
260934
261102
  }
260935
261103
  setStatusMessage(null);
260936
261104
  }, [initialMode]);
260937
- const cardRange = import_react79.useMemo(() => getVisibleRange7(cardIndex, cards.length), [cardIndex, cards.length]);
261105
+ const cardRange = import_react79.useMemo(() => getVisibleRange8(cardIndex, cards.length), [cardIndex, cards.length]);
260938
261106
  const currentCard = cards[cardIndex];
260939
261107
  const currentAddField = ADD_FIELDS[addFieldIndex];
260940
261108
  import_react79.useEffect(() => {
@@ -261580,7 +261748,7 @@ var defaultAddForm = () => ({
261580
261748
  scope: "assistant",
261581
261749
  description: ""
261582
261750
  });
261583
- function getVisibleRange8(selectedIndex, totalItems, maxVisible = MAX_VISIBLE_ITEMS6) {
261751
+ function getVisibleRange9(selectedIndex, totalItems, maxVisible = MAX_VISIBLE_ITEMS6) {
261584
261752
  if (totalItems <= maxVisible) {
261585
261753
  return {
261586
261754
  start: 0,
@@ -261659,7 +261827,7 @@ function SecretsPanel({
261659
261827
  import_react80.useEffect(() => {
261660
261828
  setSecretIndex((prev) => Math.min(prev, Math.max(0, secrets2.length - 1)));
261661
261829
  }, [secrets2.length]);
261662
- const secretRange = import_react80.useMemo(() => getVisibleRange8(secretIndex, secrets2.length), [secretIndex, secrets2.length]);
261830
+ const secretRange = import_react80.useMemo(() => getVisibleRange9(secretIndex, secrets2.length), [secretIndex, secrets2.length]);
261663
261831
  const currentSecret = secrets2[secretIndex];
261664
261832
  import_react80.useEffect(() => {
261665
261833
  if (mode === "detail" && !currentSecret) {
@@ -262286,7 +262454,7 @@ await init_build2();
262286
262454
  var import_react81 = __toESM(require_react(), 1);
262287
262455
  var jsx_dev_runtime45 = __toESM(require_jsx_dev_runtime(), 1);
262288
262456
  var MAX_VISIBLE_ITEMS7 = 5;
262289
- function getVisibleRange9(selectedIndex, totalItems, maxVisible = MAX_VISIBLE_ITEMS7) {
262457
+ function getVisibleRange10(selectedIndex, totalItems, maxVisible = MAX_VISIBLE_ITEMS7) {
262290
262458
  if (totalItems <= maxVisible) {
262291
262459
  return { start: 0, end: totalItems, hasMore: { above: 0, below: 0 } };
262292
262460
  }
@@ -262336,7 +262504,7 @@ function WorkspacePanel({
262336
262504
  import_react81.useEffect(() => {
262337
262505
  setWsIndex((prev) => Math.min(prev, Math.max(0, workspaces.length - 1)));
262338
262506
  }, [workspaces.length]);
262339
- const wsRange = import_react81.useMemo(() => getVisibleRange9(wsIndex, workspaces.length), [wsIndex, workspaces.length]);
262507
+ const wsRange = import_react81.useMemo(() => getVisibleRange10(wsIndex, workspaces.length), [wsIndex, workspaces.length]);
262340
262508
  const currentWs = workspaces[wsIndex];
262341
262509
  import_react81.useEffect(() => {
262342
262510
  if (mode === "detail" && !currentWs) {
@@ -269225,17 +269393,38 @@ process.on("unhandledRejection", (reason) => {
269225
269393
  cleanup();
269226
269394
  process.exit(1);
269227
269395
  });
269228
- var VERSION4 = "1.1.65";
269396
+ var VERSION4 = "1.1.67";
269229
269397
  var SYNC_START = "\x1B[?2026h";
269230
269398
  var SYNC_END = "\x1B[?2026l";
269231
269399
  function enableSynchronizedOutput() {
269232
269400
  const originalWrite = process.stdout.write.bind(process.stdout);
269401
+ let buffer = "";
269402
+ let flushScheduled = false;
269403
+ function flush() {
269404
+ flushScheduled = false;
269405
+ if (!buffer)
269406
+ return;
269407
+ const output = buffer;
269408
+ buffer = "";
269409
+ originalWrite(SYNC_START + output + SYNC_END);
269410
+ }
269233
269411
  process.stdout.write = function(chunk, encodingOrCallback, callback) {
269234
269412
  const raw = typeof chunk === "string" ? chunk : chunk.toString();
269235
269413
  const safe = sanitizeTerminalOutput(raw);
269236
- return originalWrite(SYNC_START + safe + SYNC_END, encodingOrCallback, callback);
269414
+ buffer += safe;
269415
+ if (!flushScheduled) {
269416
+ flushScheduled = true;
269417
+ queueMicrotask(flush);
269418
+ }
269419
+ if (typeof encodingOrCallback === "function") {
269420
+ encodingOrCallback();
269421
+ } else if (callback) {
269422
+ callback();
269423
+ }
269424
+ return true;
269237
269425
  };
269238
269426
  return () => {
269427
+ flush();
269239
269428
  process.stdout.write = originalWrite;
269240
269429
  };
269241
269430
  }
@@ -269345,4 +269534,4 @@ export {
269345
269534
  main
269346
269535
  };
269347
269536
 
269348
- //# debugId=06A678D6943F4A3A64756E2164756E21
269537
+ //# debugId=A5FDCCEC1934D13964756E2164756E21