@selesai/code 0.5.11 → 0.5.12

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.
@@ -11,6 +11,7 @@ import {
11
11
  type ExtensionAPI,
12
12
  withFileMutationQueue,
13
13
  } from "@selesai/code";
14
+ import { Text } from "@earendil-works/pi-tui";
14
15
  import { load } from "cheerio";
15
16
  import { Type } from "typebox";
16
17
 
@@ -165,6 +166,11 @@ export default function grepAppExtension(pi: ExtensionAPI): void {
165
166
  details: { total: response.hits.total, page, resultCount: response.hits.hits.length, fullOutputPath: output.fullOutputPath },
166
167
  };
167
168
  },
169
+ renderResult(result, _options, theme, context) {
170
+ if (context.isError) return new Text(theme.fg("error", "✗ grep.app search failed"), 0, 0);
171
+ const details = result.details as { total?: number; page?: number; resultCount?: number } | undefined;
172
+ return new Text(theme.fg("success", `✓ grep.app: ${details?.resultCount ?? 0} results · page ${details?.page ?? 1} · ${details?.total ?? 0} total matches`), 0, 0);
173
+ },
168
174
  });
169
175
 
170
176
  pi.registerTool({
@@ -196,5 +202,10 @@ export default function grepAppExtension(pi: ExtensionAPI): void {
196
202
  details: { repo: params.repo, path: params.path, ref: params.ref ?? "HEAD", startLine, endLine, totalLines: allLines.length, fullOutputPath: output.fullOutputPath },
197
203
  };
198
204
  },
205
+ renderResult(result, _options, theme, context) {
206
+ if (context.isError) return new Text(theme.fg("error", "✗ GitHub file fetch failed"), 0, 0);
207
+ const details = result.details as { repo?: string; path?: string; startLine?: number; endLine?: number } | undefined;
208
+ return new Text(theme.fg("success", `✓ GitHub: ${details?.repo ?? "?"}/${details?.path ?? "?"} · lines ${details?.startLine ?? 1}-${details?.endLine ?? "?"}`), 0, 0);
209
+ },
199
210
  });
200
211
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selesai/code",
3
- "version": "0.5.11",
3
+ "version": "0.5.12",
4
4
  "description": "Selesai coding agent",
5
5
  "type": "module",
6
6
  "piConfig": {