pi-wsearch 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tools.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-wsearch",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Pi extension: WebSearch + WebFetch",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/tools.ts CHANGED
@@ -376,7 +376,7 @@ class WrappedSearchText implements Component {
376
376
  const shown = expanded ? lines : lines.slice(0, SEARCH_PREVIEW_LINES);
377
377
  const colored = italicizeRanks(shown.join('\n'), this.theme)
378
378
  .split('\n')
379
- .map((l) => colorLine(l, this.theme))
379
+ .map((l) => (this.expanded ? colorLine(l, this.theme) : this.theme.fg('dim', l)))
380
380
  .join('\n');
381
381
  const out = replaceTabs(colored).split('\n');
382
382
  if (!expanded) {
@@ -434,7 +434,7 @@ function moreLinesHint(shown: number, total: number, theme: Theme): string {
434
434
 
435
435
  function previewWithHint(lines: string[], theme: Theme, maxLines = PREVIEW_LINES): string {
436
436
  const shown = lines.slice(0, maxLines);
437
- const text = shown.map((l) => theme.fg('toolOutput', replaceTabs(l))).join('\n');
437
+ const text = shown.map((l) => theme.fg('dim', replaceTabs(l))).join('\n');
438
438
  const hint = moreLinesHint(shown.length, lines.length, theme);
439
439
  return hint ? `${text}\n${hint}` : text;
440
440
  }