Skip to content

Add "New Chat in Same Worktree" option#113

Open
mcintyre94 wants to merge 1 commit intomainfrom
create-new-chat-in-worktree-492ca6df
Open

Add "New Chat in Same Worktree" option#113
mcintyre94 wants to merge 1 commit intomainfrom
create-new-chat-in-worktree-492ca6df

Conversation

@mcintyre94
Copy link
Copy Markdown
Owner

Summary

  • Long-pressing the new chat button (toolbar on iPhone/iPad, nav panel sidebar, chat switcher sheet) shows a context menu with a "New Chat in '[branch]'" option when the current chat has a worktree
  • Tap still creates a normal new chat (no behaviour change for the common case)
  • New chat inherits worktreePath, worktreeBranch, and workingDirectory from the source chat — starts fresh with no session ID, sharing the same git directory

Test plan

  • Open a sprite that has at least one chat with a worktree (worktree-per-chat enabled, send a message)
  • Long-press the square.and.pencil toolbar button — confirm context menu appears with "New Chat in '[branch]'" and "New Chat" options
  • Tap "New Chat in Same Worktree" — confirm new chat opens with the same working directory as the source chat
  • Confirm normal tap on the button still creates a plain new chat
  • On iPad/Mac: long-press the "New Chat" entry in the sidebar nav panel — same menu should appear
  • On iPhone: open chat switcher, long-press "+" — same menu should appear
  • For a chat without a worktree, confirm no context menu appears (button behaves as before)

🤖 Generated with Claude Code

Long-pressing the new chat button (toolbar, nav panel, chat switcher)
shows a context menu with an option to start a fresh chat in the same
worktree directory and branch as the current one — useful for exploring
a different direction without losing the working tree state.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant