@pratikgajjar/pi-recall 0.2.6 → 0.4.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.
package/README.md CHANGED
@@ -40,8 +40,14 @@ pi -e ./packages/pi-recall/src/index.ts
40
40
  | `recall_transcript` | Read a session in full — by `session_id`, or omit it for the most recent session (filterable by repo/source/since). |
41
41
  | `recall_sessions` | List recent sessions (titles + ids, no bodies). |
42
42
  | `recall_related` | Given a session id, find other sessions on the same topic. |
43
-
44
- All tools accept `repo` (pass `"."` for the current project), `source` (`cursor` \| `claude` \| `codex` \| `pi`), and `since` (e.g. `7d`).
43
+ | `recall_tag` / `recall_untag` | Attach/remove durable tags on a session — bookmark sessions worth remembering. Tags survive index rebuilds. |
44
+ | `recall_tags` | List all tags (with counts), or the tags on one session. |
45
+
46
+ All search/list tools accept `repo` (pass `"."` for the current project),
47
+ `source` (`cursor` \| `claude` \| `codex` \| `pi`), `since` (e.g. `7d`), and
48
+ `tags` (filter to sessions carrying ALL given tags; AND). A tag may be a user
49
+ tag or a reserved facet like `source:cursor` — `tags: ["source:cursor"]` is
50
+ equivalent to `source: "cursor"`.
45
51
 
46
52
  ### Navigating large sessions
47
53
 
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pratikgajjar/pi-recall",
3
- "version": "0.2.6",
3
+ "version": "0.4.0",
4
4
  "description": "pi extension: search your past AI chat history (Cursor, Claude Code, Codex, pi) via the recall CLI",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -45,6 +45,9 @@ const SOURCE_HELP = "Restrict to one tool: cursor | claude | codex | pi.";
45
45
  const REPO_HELP =
46
46
  "Restrict to a project folder. Pass '.' for the current working directory.";
47
47
  const SINCE_HELP = "Only sessions newer than this, e.g. '24h', '7d', '30d'.";
48
+ const TAGS_HELP =
49
+ "Filter to sessions carrying ALL of these tags (AND). A tag is either a user " +
50
+ "tag (applied with recall_tag) or a reserved facet like 'source:cursor'.";
48
51
 
49
52
  interface RecallHit {
50
53
  session_id: string;
@@ -178,11 +181,15 @@ export default function recallExtension(pi: ExtensionAPI) {
178
181
  source?: string;
179
182
  since?: string;
180
183
  limit?: number;
184
+ tags?: string[];
181
185
  }): string[] {
182
186
  const args: string[] = [];
183
187
  const repo = resolveRepo(params.repo);
184
188
  if (repo) args.push("--repo", repo);
185
- if (params.source) args.push("--source", params.source);
189
+ // `source` is a reserved facet on the unified --tag selector; there is no
190
+ // separate --source flag on the CLI anymore.
191
+ if (params.source) args.push("--tag", `source:${params.source}`);
192
+ for (const t of params.tags ?? []) args.push("--tag", t);
186
193
  if (params.since) args.push("--since", params.since);
187
194
  if (params.limit !== undefined)
188
195
  args.push("--limit", String(Math.max(1, params.limit)));
@@ -299,6 +306,7 @@ export default function recallExtension(pi: ExtensionAPI) {
299
306
  repo: Type.Optional(Type.String({ description: REPO_HELP })),
300
307
  source: Type.Optional(Type.String({ description: SOURCE_HELP })),
301
308
  since: Type.Optional(Type.String({ description: SINCE_HELP })),
309
+ tags: Type.Optional(Type.Array(Type.String(), { description: TAGS_HELP })),
302
310
  limit: Type.Optional(
303
311
  Type.Number({ description: `Max hits (default ${DEFAULT_SEARCH_LIMIT})` }),
304
312
  ),
@@ -322,6 +330,7 @@ export default function recallExtension(pi: ExtensionAPI) {
322
330
  repo: params.repo,
323
331
  source: params.source,
324
332
  since: params.since,
333
+ tags: params.tags,
325
334
  limit: params.limit ?? DEFAULT_SEARCH_LIMIT,
326
335
  })];
327
336
  const res = await runRecall(args, signal);
@@ -477,6 +486,7 @@ export default function recallExtension(pi: ExtensionAPI) {
477
486
  repo: Type.Optional(Type.String({ description: REPO_HELP })),
478
487
  source: Type.Optional(Type.String({ description: SOURCE_HELP })),
479
488
  since: Type.Optional(Type.String({ description: SINCE_HELP })),
489
+ tags: Type.Optional(Type.Array(Type.String(), { description: TAGS_HELP })),
480
490
  limit: Type.Optional(
481
491
  Type.Number({ description: `Max sessions (default ${DEFAULT_SESSIONS_LIMIT})` }),
482
492
  ),
@@ -498,6 +508,7 @@ export default function recallExtension(pi: ExtensionAPI) {
498
508
  repo: params.repo,
499
509
  source: params.source,
500
510
  since: params.since,
511
+ tags: params.tags,
501
512
  limit: params.limit ?? DEFAULT_SESSIONS_LIMIT,
502
513
  })];
503
514
  const res = await runRecall(args, signal);