Hey all :slightly_smiling_face: been playing with ...
# questions
a
Hey all 🙂 been playing with OH in Docker the last few days (0.62 still), mostly on existing projects from GH repos. I notice they get cloned in as a subfolder in the
/workspace
folder, I'm assuming that's intentional, although it has caused some confusion with the agent until I tell it to look in the subfolder for the actual project files (or add it to a
repo.md
to remind it), as well as a permanent "1 pending changes" being shown on the Source Control tab (the
settings.json
for VSCode) due to the stacked git repos, so so far it's only been a minor inconvenience. I've just gone to make a new project, and realised there is no subfolder for it, just the
/workspace
folder, which is already initialised as a git repo. It occurs to me that if I put my project files in there and push them up to GH, when I go to make a new conversation from that repo it'll then pull it down to a subfolder, so for the first conversation I would be treating it like it's in the root folder and then in the second conversation (or at the end of the first) have to add the
repo.md
to let it know to search the subfolder for the project instead. Like I said I assumed this was intentional behaviour; I couldn't find anyone else asking about this in the GH issues, and I couldn't find anything clear in the docs about this behaviour, so I assume my understanding of how I'm supposed to work with this is missing some details. Am I doing something wrong, or is there a particular workflow I should be using when creating and/or importing projects to keep things consistent? And what is the reason for setting the working directory to be the parent of the cloned repo instead of the repo itself?
w
yeah the settings.json change is annoying, we need to squash that one
not 100% sure I understand the repo workflow--are you choosing a repo from the dropdown on the homepage?
a
Yeah so if I choose a repo from the homepage it clones it into a subfolder in
/workspace
rather than cloning into
/workspace
directly, e.g. if I want to work on a GitHub project
MyProject
, it will clone it down to
/workspace/MyProject
. It seems a git repo is initialised under
/workspace
regardless, so
/workspace
is a repo and
/workspace/MyProject
is a repo, although it seems git commands from VSCode are focused on
/workspace/MyProject
at least (except for the
settings.json
weirdness, possibly due to the nested repo layout?) so commits are made on the correct repo. When I create a new conversation it doesn't clone anything of course, so I'm just working in
/workspace
directly and git commands are targeting the repo initialised in that folder. If I do that and push some work up to GitHub as a new repo (e.g.
MyProject2
), then start a new conversation by choosing the newly made repo from the homepage, it'll clone down to
/workspace/MyProject2
instead of
/workspace
directly (which is how I was working initially). Does that make sense?
w
Hmm are you reusing the same container between conversations?
I guess, why does that end up being a problem in practice?
But the workflow does make sense, thanks
a
I'm not sure how you would reuse a container between conversations? Doesn't OH automatically create a new container for each conversation? Or is there a way to reuse an existing container?
w
Yeah default behavior is to create new containers, but there is a way (not sure how it works today) to reuse