reconvo 0.1.0 → 0.2.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/dist/cli.js +28 -2
  2. package/package.json +3 -2
package/dist/cli.js CHANGED
@@ -438,6 +438,7 @@ var exports_tui = {};
438
438
  __export(exports_tui, {
439
439
  browse: () => browse
440
440
  });
441
+ import { spawn } from "node:child_process";
441
442
  function renderTree(state) {
442
443
  const { rows, cursor, scroll, termWidth, termHeight } = state;
443
444
  const treeWidth = Math.min(Math.floor(termWidth * 0.5), 60);
@@ -512,7 +513,7 @@ function renderTree(state) {
512
513
  } else if (state.filter) {
513
514
  write(`${ansi2.dim}filter: ${state.filter} (esc to clear)${ansi2.reset}`);
514
515
  } else {
515
- write(`${ansi2.dim}j/k navigate tab view c copy id / filter q quit${ansi2.reset}`);
516
+ write(`${ansi2.dim}j/k navigate enter open c copy id tab view / filter q quit${ansi2.reset}`);
516
517
  }
517
518
  }
518
519
  async function updatePreview(state) {
@@ -759,10 +760,15 @@ function handleKey(key, state) {
759
760
  state.cursor = state.rows.length - 1;
760
761
  state.scroll = Math.max(0, state.cursor - visibleRows + 1);
761
762
  return "continue";
762
- case "c":
763
763
  case "\r":
764
764
  case `
765
765
  `: {
766
+ const row = state.rows[state.cursor];
767
+ if (row?.node.kind === "session")
768
+ return "open";
769
+ return "continue";
770
+ }
771
+ case "c": {
766
772
  const row = state.rows[state.cursor];
767
773
  if (row?.node.kind === "session")
768
774
  return "copy";
@@ -830,6 +836,26 @@ async function browse(scopePaths) {
830
836
  cleanup();
831
837
  return;
832
838
  }
839
+ if (action === "open") {
840
+ const row = state.rows[state.cursor];
841
+ if (row?.node.kind === "session") {
842
+ const session = row.node.session;
843
+ cleanup();
844
+ if (session.source === "opencode") {
845
+ spawn("opencode", ["--session", session.id], {
846
+ stdio: "inherit",
847
+ cwd: session.directory
848
+ });
849
+ } else {
850
+ spawn("claude", ["--resume", session.id], {
851
+ stdio: "inherit",
852
+ cwd: session.directory
853
+ });
854
+ }
855
+ return;
856
+ }
857
+ continue;
858
+ }
833
859
  if (action === "copy") {
834
860
  const row = state.rows[state.cursor];
835
861
  if (row?.node.kind === "session") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reconvo",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Human- and agent-friendly CLI to search Claude Code and OpenCode sessions",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -33,6 +33,7 @@
33
33
  "@types/bun": "1.2.9"
34
34
  },
35
35
  "dependencies": {
36
- "duckdb": "^1.2.2"
36
+ "duckdb": "^1.2.2",
37
+ "reconvo": "^0.1.0"
37
38
  }
38
39
  }