@celljs/ta-dash 4.44.0 → 4.45.0

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/host/index.mjs +43 -0
  2. package/package.json +4 -4
package/host/index.mjs CHANGED
@@ -329,6 +329,49 @@ var TaAgentToolUtil;
329
329
  return Object.fromEntries(Object.entries(input).filter(([key]) => !UNSHOWN.has(key)));
330
330
  }
331
331
  TaAgentToolUtil2.shownInput = shownInput;
332
+ function target(kind, input) {
333
+ var _a;
334
+ return (_a = byKind(kind, input)) !== null && _a !== undefined ? _a : TARGET_KEYS.map((key) => text(input[key])).find(Boolean);
335
+ }
336
+ TaAgentToolUtil2.target = target;
337
+ const TARGET_KEYS = [
338
+ "description",
339
+ "subject",
340
+ "summary",
341
+ "skill",
342
+ "image_path",
343
+ "file_path",
344
+ "filePath",
345
+ "path",
346
+ "url",
347
+ "query",
348
+ "recipient",
349
+ "prompt",
350
+ "task_id",
351
+ "id",
352
+ "toolName",
353
+ "message"
354
+ ];
355
+ function byKind(kind, input) {
356
+ var _a, _b, _c, _d;
357
+ switch (kind) {
358
+ case "execute":
359
+ return text(input.command);
360
+ case "read":
361
+ case "edit":
362
+ case "delete":
363
+ case "move":
364
+ return (_b = (_a = text(input.file_path)) !== null && _a !== undefined ? _a : text(input.path)) !== null && _b !== undefined ? _b : text(input.filePath);
365
+ case "search":
366
+ return (_c = text(input.pattern)) !== null && _c !== undefined ? _c : text(input.query);
367
+ case "fetch":
368
+ return (_d = text(input.url)) !== null && _d !== undefined ? _d : text(input.query);
369
+ }
370
+ return;
371
+ }
372
+ function text(value) {
373
+ return typeof value === "string" && value.trim() ? value.trim() : undefined;
374
+ }
332
375
  function shownDetails(details) {
333
376
  const input = details === null || details === undefined ? undefined : details.input;
334
377
  if (!input || typeof input !== "object") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-dash",
3
- "version": "4.44.0",
3
+ "version": "4.45.0",
4
4
  "description": "A pi package for Ta: dashboards of replies whose numbers come from queries run on the user's computer, kept current, each showing the query behind it",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -27,9 +27,9 @@
27
27
  "watch": "tsc -b -w --preserveWatchOutput"
28
28
  },
29
29
  "devDependencies": {
30
- "@celljs/core": "4.44.0",
31
- "@celljs/ta-protocol": "4.44.0",
32
- "@celljs/ta-web": "4.44.0",
30
+ "@celljs/core": "4.45.0",
31
+ "@celljs/ta-protocol": "4.45.0",
32
+ "@celljs/ta-web": "4.45.0",
33
33
  "@types/node": "^24.0.0",
34
34
  "@types/react": "^19.3.3"
35
35
  },