worktree-launcher 1.5.2 → 1.5.4

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 +4 -61
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -770,7 +770,7 @@ function showNewWorktreeForm() {
770
770
  });
771
771
  input.focus();
772
772
  screen.render();
773
- input.on("submit", () => {
773
+ input.on("submit", async () => {
774
774
  const value = input.getValue()?.trim();
775
775
  if (!value) {
776
776
  form.destroy();
@@ -782,11 +782,10 @@ function showNewWorktreeForm() {
782
782
  validateBranchName(value);
783
783
  form.destroy();
784
784
  screen.render();
785
- showAIToolSelector(value);
785
+ await createNewWorktree(value, null);
786
786
  } catch (e) {
787
787
  setStatus(`Error: ${e.message}`);
788
- input.clearValue();
789
- input.focus();
788
+ worktreeList.focus();
790
789
  screen.render();
791
790
  }
792
791
  });
@@ -797,62 +796,6 @@ function showNewWorktreeForm() {
797
796
  });
798
797
  input.readInput();
799
798
  }
800
- function showAIToolSelector(branchName) {
801
- const form = blessed.box({
802
- parent: screen,
803
- top: "center",
804
- left: "center",
805
- width: 40,
806
- height: 9,
807
- border: { type: "line" },
808
- style: { fg: "default", border: { fg: "cyan" } },
809
- label: " Launch AI Tool "
810
- });
811
- blessed.text({
812
- parent: form,
813
- top: 1,
814
- left: 2,
815
- content: "Which AI assistant to launch?",
816
- style: { fg: "default" }
817
- });
818
- const list = blessed.list({
819
- parent: form,
820
- top: 3,
821
- left: 2,
822
- width: 34,
823
- height: 3,
824
- keys: true,
825
- vi: true,
826
- style: {
827
- selected: { bg: "cyan", fg: "black" },
828
- item: { fg: "default" }
829
- },
830
- items: [" Claude Code", " Codex", " Skip"]
831
- });
832
- list.focus();
833
- screen.render();
834
- list.on("select", async (_item, index) => {
835
- const tool = index === 0 ? "claude" : index === 1 ? "codex" : null;
836
- form.destroy();
837
- setStatus(`Selected: ${tool ?? "skip"}, creating worktree...`);
838
- screen.render();
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);
849
- });
850
- list.key(["escape"], () => {
851
- form.destroy();
852
- screen.render();
853
- worktreeList.focus();
854
- });
855
- }
856
799
  async function createNewWorktree(branchName, tool) {
857
800
  setStatus(`Creating ${branchName}...`);
858
801
  screen.render();
@@ -964,7 +907,7 @@ async function deleteSelected() {
964
907
 
965
908
  // src/index.ts
966
909
  var program = new Command();
967
- program.name("wt").description("CLI tool to streamline git worktrees with AI coding assistants").version("1.5.2").action(async () => {
910
+ program.name("wt").description("CLI tool to streamline git worktrees with AI coding assistants").version("1.5.4").action(async () => {
968
911
  await interactiveCommand();
969
912
  });
970
913
  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.2",
3
+ "version": "1.5.4",
4
4
  "description": "CLI tool for managing git worktrees with AI coding assistants",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",