worktree-launcher 1.5.0 → 1.5.1

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/index.js +13 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -831,11 +831,21 @@ function showAIToolSelector(branchName) {
831
831
  });
832
832
  list.focus();
833
833
  screen.render();
834
- list.on("select", (_item, index) => {
834
+ list.on("select", async (_item, index) => {
835
835
  const tool = index === 0 ? "claude" : index === 1 ? "codex" : null;
836
836
  form.destroy();
837
+ setStatus(`Selected: ${tool ?? "skip"}, creating worktree...`);
837
838
  screen.render();
838
- createNewWorktree(branchName, tool);
839
+ try {
840
+ await createNewWorktree(branchName, tool);
841
+ } catch (e) {
842
+ setStatus(`Error: ${e.message}`);
843
+ worktreeList.focus();
844
+ screen.render();
845
+ }
846
+ });
847
+ list.key(["enter"], () => {
848
+ list.emit("select", list.items[list.selected], list.selected);
839
849
  });
840
850
  list.key(["escape"], () => {
841
851
  form.destroy();
@@ -946,7 +956,7 @@ async function deleteSelected() {
946
956
 
947
957
  // src/index.ts
948
958
  var program = new Command();
949
- program.name("wt").description("CLI tool to streamline git worktrees with AI coding assistants").version("1.5.0").action(async () => {
959
+ program.name("wt").description("CLI tool to streamline git worktrees with AI coding assistants").version("1.5.1").action(async () => {
950
960
  await interactiveCommand();
951
961
  });
952
962
  program.command("new <branch-name>").description("Create a new worktree and launch AI assistant").option("-i, --install", "Run package manager install after creating worktree").option("-s, --skip-launch", "Create worktree without launching AI assistant").option("-p, --push", "Push branch to remote (visible on GitHub)").action(async (branchName, options) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worktree-launcher",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "CLI tool for managing git worktrees with AI coding assistants",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",