Skip to content

feat(projects): working_dir = "{prompt}" — a generic project that asks for its directory#49

Open
milehimikey wants to merge 1 commit into
cloudmanic:mainfrom
milehimikey:pr-prompt-working-dir
Open

feat(projects): working_dir = "{prompt}" — a generic project that asks for its directory#49
milehimikey wants to merge 1 commit into
cloudmanic:mainfrom
milehimikey:pr-prompt-working-dir

Conversation

@milehimikey

Copy link
Copy Markdown

What

A project whose working_dir is the sentinel {prompt} asks for its directory when activated instead of pinning one in the TOML. This makes a single config a universal template — one entry opens any repo with the project's tabs:

name = "project"
description = "Open any project — prompts for its path"
working_dir = "{prompt}"

[[tabs]]
name = "claude"
command = "claude"

[[tabs]]
name = "terminal"

Behavior

  • Enter on such a project opens a path input instead of a workspace. ~ and $VAR expand exactly like a configured working_dir (shared expandPath helper, same Windows-aware resolution as feat: Windows support #45). A path that doesn't name an existing directory shows an inline error and keeps the prompt up; esc backs out to the list.
  • The opened workspace takes the directory's basename as its label, so opening ~/dev/options-cafe yields a workspace labeled options-cafe, not project.
  • ctrl+g (worktree) asks for the path first, then the branch — the existing branch prompt is unchanged.
  • The detail bar shows "asks for a path" for these projects instead of a literal {prompt}.

Testing

  • go test -race ./... passes; five new model tests cover enter-opens-prompt, valid path (stamps dir + renames), invalid path (inline error, prompt stays), the ctrl+g path→branch chain, and esc.
  • Exercised live in herdr: picking the entry, typing a repo path, and getting the labeled workspace with both tabs running.

🤖 Generated with Claude Code

…ject

A project whose working_dir is the sentinel {prompt} asks for its directory
when activated instead of pinning one in the TOML, so a single config can open
any repo. Enter on such a project (or ctrl+g, before the branch prompt) opens
a path input; ~ and $VARS expand exactly like a configured working_dir, the
path must name an existing directory (inline error otherwise), and the opened
workspace takes the directory's basename as its label.

Co-Authored-By: Claude Fable 5 <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