Class AddTaskHeaderCommand
java.lang.Object
eu.svjatoslav.alyverkko_cli.commands.AddTaskHeaderCommand
- All Implemented Interfaces:
Command
This command recursively adds a TOCOMPUTE header to all non-hidden files in the current directory
that do not already have one. It prompts the user for skill, model, priority values,
and optional custom processing instructions, validates their existence in the configuration,
and then processes the files accordingly.
Usage:
alyverkko-cli addheaderThe command will interactively prompt for: - Skill name (must exist in skills directory) - Model alias (must exist in configuration models) - Priority value (integer, defaults to 0) - Custom processing instructions (optional, multi-line input; press Enter twice to finish)
After validation, it will process all non-hidden files in the current directory and subdirectories, adding the TOCOMPUTE header followed by custom instructions (if provided) and the original content.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteCommand(String[] cliArguments) Executes the addheader command.
-
Constructor Details
-
AddTaskHeaderCommand
public AddTaskHeaderCommand()
-
-
Method Details
-
getCommandName
- Specified by:
getCommandNamein interfaceCommand- Returns:
- the subcommand's name.
-
executeCommand
Executes the addheader command. Loads configuration, prompts user for skill, model, priority, and optional custom instructions, validates them, and processes all files in the current directory recursively.- Specified by:
executeCommandin interfaceCommand- Parameters:
cliArguments- command-line arguments (unused in this command)- Throws:
IOException- if file operations failInterruptedException- if interrupted during processing
-