Skip to content

azd ai agent init: Default environment name to directory name #6817

@spboyer

Description

@spboyer

Problem

Unlike \�zd init, which suggests environment names based on the current directory name (e.g., \myapp-dev, \myapp-test), \�zd ai agent init\ has no default for environment name. In non-TTY environments where --no-prompt\ is silently activated, this causes an immediate failure:

\
no default response for prompt 'Enter a unique environment name:'
\\

Proposed Solution

In \�nsureEnvironment()\ (\init.go), when no -e\ flag is provided and no existing environment is found, default to \ ilepath.Base(cwd)\ (matching \�zd init\ behavior) instead of requiring an interactive prompt.

Files

  • \cli/azd/extensions/azure.ai.agents/internal/cmd/init.go\ - \�nsureEnvironment()\ function

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions