feat(worktree): unify /worktree with add/list/switch/delete subcommands and inline menu#167
feat(worktree): unify /worktree with add/list/switch/delete subcommands and inline menu#167kamysheblid wants to merge 2 commits into
Conversation
…ds and inline menu
undone unnecessary change
|
@kamysheblid thanks for PR. But it is out of concept of this bot, all commands doesn't have arguments, it's very unconvenient to type command with keyboard on mobile, chosing command from menu and then use inline buttons for additional actions - this is how all commands work there. |
|
@grinev You mean you want extra commands in the menu, like this? /worktree_delete Do you still want /worktree to be a command? If so what function should it perform? Should I remove /worktree_switch and just leave it as /worktree? BTW I noticed other people submitted PRs for /session and /project. To do the same for those will mean adding 6-12 new commands in the menu, unless your plan is only to take PRs for the important ones, in which case worktree might not be that important and should be excluded even though that would be very annoying for people that use worktrees. Would you consider letting me implement both of these and adding an environment variable ( Implementing both wont add more than a dozen or so extra lines to the codebase, basically just an env/var check in src/bot/routers/message-router.ts line 155 in the message:text function. |
Summary
Unifies the worktree command to support subcommands instead of only displaying an inline menu for switching.
Changes
/worktree add [name]— create a new worktree (optionally with a name, or interactive prompt)/worktree list— formatted list of all worktrees with markers for current/main/worktree switch [name]— switch worktree by name/path/branch, or show inline menu/worktree delete <name>— delete a worktree with confirmation flow/worktree help— show usage guidematchWorktreeEntry()helper for fuzzy matching (by path, basename, or branch)handleWorktreeDeleteCallbackcallback handler