When agent is working locally, we cannot explicitl...
# proj-agent-canvas
c
When agent is working locally, we cannot explicitly launch the agent to directly work on a folder, rather than its gitwork tree 😞 Especially when data associate with the code that only exists on the original folder (not the worktree) - this means "Files" tab are also not working since you can only view files from worktree
l
I think that Robert was discussing this although I forget where, we might want to make the worktree behavior optional
c
FWIW, Codex app has this dropdown available only at the start of a conversation
nod 1
c
^I like this, we could just do this (cc @hundreds-twilight-32833 @breezy-kilobyte-39430)
h
plus1 We have a ticket for a worktree selector and I think included a screenshot of what codex has for ui
🙌 1
Codex is interesting because they still use worktrees behind the scenes even when you say not to.
w
The API endpoint just accepts a
worktree
boolean, this should be easy to do
b
I started work on this, and just to make sure I'm understanding of our needs vs codex: In our case we just need to toggle between a worktree and branch. We need to let the user know they have the ability to hand off to a worktree from branch or to a branch from a worktree—when in a started conversation. If the user is on a new conversation they can toggle to a worktree if they want, but we start on a branch? @hundreds-twilight-32833
h
I think in the short term we would only be able to do worktrees on/off. Long term that extra functionality would be great to figure out.
b
@Devin, that on/off is the handoff. Or did you mean the on/off is initiated at the start of conversation and cannot be changed in the conversation?
h
at the start of conversation and cannot be changed in the conversation
^
At least for the short term
Short term: Simple UI for on/off Long term: Flexible like codex, need to explore options
b
@hundreds-twilight-32833 Do we think that "Direct" is the right language opposite to "New Worktree"?
h
Maybe...I'm not sure of the exact terminology around them. Let me do a quick bit of research
Direct seems like a good fit
Alternative might be "Main Worktree"
w
"Main workspace" I think is the right language
Actually "Main directory" is probably better
b
@wooden-umbrella-84098 this might conflict with the branch name of main though, wdyt?
w
Yeah agree. "Direct" is wrong though, it doesn't mean anything "Original directory" or just "Directory" would work
Maybe with a folder icon
b
This is from gpt, what do you think of Primary, Repo Root, Root Workspace, or Working Tree
Here's some visual metaphors to distinguish the root repo/working tree from a folder: 2,3,5 are my preferences.
Here's my working branch with UI built in. I have a handoff interaction built in as well. It might actually work...but need some review. I've kept the toggle name of Direct for now simply because it's short and we don't have a decided alternative. https://github.com/OpenHands/agent-canvas/issues/399#issuecomment-4549557656 @hundreds-twilight-32833
w
what does Codex show?
nod 1
"Repo root" or "Repo directory" would make the most sense to me. IMO the word "directory" is a very strong hint about what this thing does--it's going to confuse most people
b
image.png
w
"Work locally" or "Local directory" would make a ton of sense
c
I like "work locally" 🙂
c
Yes the word “local” will click
nod 1
b
To be clear though, does this not also change where the agent is actually working (local vs cloud) not just the worktree?
h
It does not
w
Yeah that was my hesitation with "Work locally"
you're always working locally
b
Confusing to me, the options like 'work locally' and 'send to cloud' or 'connect codex web' suggest to me the distinction of backend, not worktree related. To me, at least, it's like the distinction of backend.
c
That's fair, in codex they're together though, so it distinguishes from both, I feel
nod 1