Skip to content

Commit 42d1915

Browse files
committed
fix: add back --name to agent create, fix docs
1 parent 21c78cc commit 42d1915

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

crates/chat-cli/src/cli/agent/root_command_args.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pub enum AgentSubcommands {
3636
/// global agent directory
3737
Create {
3838
/// Name of the agent to be created
39+
#[arg(long, short)]
3940
name: String,
4041
/// The directory where the agent will be saved. If not provided, the agent will be saved in
4142
/// the global agent directory
@@ -358,7 +359,17 @@ mod tests {
358359
#[test]
359360
fn test_agent_subcommand_create() {
360361
assert_parse!(
361-
["agent", "create", "some_agent", "--from", "some_old_agent"],
362+
["agent", "create", "--name", "some_agent", "--from", "some_old_agent"],
363+
RootSubcommand::Agent(AgentArgs {
364+
cmd: Some(AgentSubcommands::Create {
365+
name: "some_agent".to_string(),
366+
directory: None,
367+
from: Some("some_old_agent".to_string())
368+
})
369+
})
370+
);
371+
assert_parse!(
372+
["agent", "create", "-n", "some_agent", "--from", "some_old_agent"],
362373
RootSubcommand::Agent(AgentArgs {
363374
cmd: Some(AgentSubcommands::Create {
364375
name: "some_agent".to_string(),

crates/chat-cli/src/cli/chat/cli/profile.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ pub enum AgentSubcommand {
5454
/// Create a new agent with the specified name
5555
Create {
5656
/// Name of the agent to be created
57+
#[arg(long, short)]
5758
name: String,
5859
/// The directory where the agent will be saved. If not provided, the agent will be saved in
5960
/// the global agent directory

docs/agent-format.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ The `name` field specifies the name of the agent. This is used for identificatio
2626
}
2727
```
2828

29-
Note: While this field can be included in the configuration file, it will be overridden by the filename when the agent is loaded.
30-
3129
## Description Field
3230

3331
The `description` field provides a description of what the agent does. This is primarily for human readability and helps users distinguish between different agents.

0 commit comments

Comments
 (0)