Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 62c35ac

Browse files
committed
capitialize AI group name
1 parent 8c1b6d3 commit 62c35ac

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/main/java/org/springframework/cli/command/AiCommands.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import org.springframework.shell.command.annotation.Option;
3333
import org.springframework.shell.standard.commands.Help;
3434

35-
@Command(command = "ai", group = "Ai")
35+
@Command(command = "ai", group = "AI")
3636
public class AiCommands implements ApplicationContextAware {
3737

3838
private final TerminalMessage terminalMessage;
@@ -54,23 +54,13 @@ public AiCommands(OpenAiHandler openAiHandler, TerminalMessage terminalMessage)
5454

5555
@Command(command = "add", description = "Add code to the project from AI for a Spring Project project.")
5656
public void aiAdd(
57-
@Option(description = "The description of the code to create, this can be as short as a well known Spring project name, e.g JPA.") String description,
57+
@Option(description = "The description of the code to create, this can be as short as a well known Spring project name, e.g JPA.", required = true) String description,
5858
@Option(description = "Path to run the command in, most of the time this is not necessary to specify and the default value is the current working directory.") String path,
5959
@Option(description = "Create the README.md file, but do not apply the changes to the code base.") boolean preview,
6060
@Option(description = "Rewrite the 'description' option the README.md file, but do not apply the changes to the code base.") boolean rewrite) {
61-
handleNullDescription(description); // TODO Push this functinality into spring shell
62-
6361
this.openAiHandler.add(description, path, preview, rewrite, terminalMessage);
6462
}
6563

66-
private void handleNullDescription(String description) {
67-
if (description == null) {
68-
69-
printMissingDescriptionMessage();
70-
throw new SpringCliException("Try again" + System.lineSeparator());
71-
}
72-
}
73-
7464
private void printMissingDescriptionMessage() {
7565
AttributedStringBuilder sb = new AttributedStringBuilder();
7666
sb.style(sb.style().foreground(AttributedStyle.WHITE));

0 commit comments

Comments
 (0)