@webinson/peer 0.4.26 → 0.4.27

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/bin/peer.mjs CHANGED
@@ -901,6 +901,7 @@ function threadUses(session, prompts) {
901
901
  const name = (text) => path.basename(String(text).trim(), ".md").replace(/[_-]+/g, " ");
902
902
  const clean = (text) => plain(String(text).replace(/\*\*/g, "").replace(/`/g, "")).slice(0, 120);
903
903
  const uses = [];
904
+ const asking = new Map();
904
905
  let last;
905
906
  for (const line of fs.readFileSync(file, "utf8").split("\n")) {
906
907
  let row;
@@ -936,7 +937,17 @@ function threadUses(session, prompts) {
936
937
  if (block?.type !== "tool_use" || !/openviking/i.test(String(block.name))) continue;
937
938
  const input = block.input ?? {};
938
939
  const detail = input.query ?? input.pattern ?? input.uri ?? (Array.isArray(input.uris) ? input.uris.join(", ") : "") ?? "";
939
- uses.push({ at, where: "tool", from: "yours", kind: String(block.name).split("__").pop(), items: detail ? [clean(String(detail).startsWith("viking://") ? name(detail) : detail)] : [], ...near("tool") });
940
+ const use = { at, where: "tool", from: "yours", kind: String(block.name).split("__").pop(), items: detail ? [clean(String(detail).startsWith("viking://") ? name(detail) : detail)] : [], ...near("tool") };
941
+ uses.push(use);
942
+ if (block.id) asking.set(block.id, use);
943
+ }
944
+ }
945
+ // A call that was refused (Jellyfish or Inactive holds PeerMemory back) or failed asked nothing of the memory.
946
+ if (row.type === "user" && Array.isArray(row.message?.content)) {
947
+ for (const block of row.message.content) {
948
+ if (block?.type !== "tool_result" || !block.is_error || !asking.has(block.tool_use_id)) continue;
949
+ const at = uses.indexOf(asking.get(block.tool_use_id));
950
+ if (at >= 0) uses.splice(at, 1);
940
951
  }
941
952
  }
942
953
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peer-thread-mark",
3
- "version": "0.4.26",
3
+ "version": "0.4.27",
4
4
  "description": "Marks a Claude Code thread shared with Peer (/peer) with a band above the prompt, with /peer stop and /peer start; panes for /peer-list, /peer-thread and /peer-all (search your memories)",
5
5
  "license": "MIT",
6
6
  "types": "./types/index.d.ts"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webinson/peer",
3
- "version": "0.4.26",
3
+ "version": "0.4.27",
4
4
  "description": "Share chosen Claude Code and Codex threads with your team: who has agents running and on what.",
5
5
  "license": "MIT",
6
6
  "type": "module",