Fix JavaDoc. Task priority system. Better precision for computing AI tasks.
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 15 Jun 2025 09:44:19 +0000 (12:44 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 15 Jun 2025 09:44:19 +0000 (12:44 +0300)
16 files changed:
src/main/java/eu/svjatoslav/alyverkko_cli/AiTask.java
src/main/java/eu/svjatoslav/alyverkko_cli/Command.java
src/main/java/eu/svjatoslav/alyverkko_cli/Utils.java
src/main/java/eu/svjatoslav/alyverkko_cli/commands/JoinFilesCommand.java
src/main/java/eu/svjatoslav/alyverkko_cli/commands/ListModelsCommand.java
src/main/java/eu/svjatoslav/alyverkko_cli/commands/WizardCommand.java
src/main/java/eu/svjatoslav/alyverkko_cli/commands/mail_correspondant/MailCorrespondentCommand.java
src/main/java/eu/svjatoslav/alyverkko_cli/commands/mail_correspondant/MailQuery.java
src/main/java/eu/svjatoslav/alyverkko_cli/commands/mail_correspondant/package-info.java
src/main/java/eu/svjatoslav/alyverkko_cli/commands/package-info.java
src/main/java/eu/svjatoslav/alyverkko_cli/configuration/Configuration.java
src/main/java/eu/svjatoslav/alyverkko_cli/configuration/ConfigurationHelper.java
src/main/java/eu/svjatoslav/alyverkko_cli/configuration/package-info.java
src/main/java/eu/svjatoslav/alyverkko_cli/model/Model.java
src/main/java/eu/svjatoslav/alyverkko_cli/model/package-info.java
src/main/java/eu/svjatoslav/alyverkko_cli/package-info.java

index 06bbc74..8df6bd7 100644 (file)
@@ -10,7 +10,7 @@ import static java.lang.String.join;
 
 /**
  * <p>Executes AI inference tasks through llama.cpp CLI. This class handles the complete workflow
- * from prompt construction to response formatting, including temporary file management and process execution.</p>
+ * from prompt construction to response formatting, including temporary file management and process execution.
  * <p>Key processing steps:
  * <ol>
  *   <li>Build standardized input prompt</li>
@@ -19,9 +19,9 @@ import static java.lang.String.join;
  *   <li>Capture and filter output</li>
  *   <li>Perform cleanup operations</li>
  * </ol>
- * </p>
+ * 
  * <p>Temperature settings, context size, and thread counts are all derived from the current configuration.
- * The response is formatted to match org-mode conventions while preserving original conversation structure.</p>
+ * The response is formatted to match org-mode conventions while preserving original conversation structure.
  */
 public class AiTask {
 
@@ -246,15 +246,14 @@ public class AiTask {
                 "--dry-multiplier 0.5",
                 "--presence-penalty 0.1",
                 "--mirostat 0",
-                "--samplers 'top_k;top_p;min_p;temperature;dry;typ_p;xtc'",
-                "--cache-type-k q8_0",
-                "--cache-type-v q8_0",
+             //   "--cache-type-k q8_0",
+             //   "--cache-type-v q8_0",
                 "--no-display-prompt",
                 "--no-warmup",
                 "--flash-attn",
                 "--temp 0.6",
                 "--ctx-size " + mailQuery.model.contextSizeTokens,
-                "--batch-size 8",
+                "--batch-size 512",
                 "--no-conversation",
                 "-n -1",
                 "--file " + inputFile
index fca9e37..01b48b3 100644 (file)
@@ -3,15 +3,15 @@ package eu.svjatoslav.alyverkko_cli;
 import java.io.IOException;
 
 /**
- * <p>Base interface for all subcommands in the Älyverkko CLI. Each command must define its name and execution logic.</p>
+ * <p>Base interface for all subcommands in the Älyverkko CLI. Each command must define its name and execution logic.
  * <p>Commands typically:
  * <ul>
  *   <li>Parse their own specific arguments</li>
  *   <li>Access the global configuration</li>
  *   <li>Handle I/O operations</li>
  * </ul>
- * </p>
- * <p>Commands should be stateless and self-contained, using the configuration object for persistent data when needed.</p>
+ * 
+ * <p>Commands should be stateless and self-contained, using the configuration object for persistent data when needed.
  */
 public interface Command {
 
index 4e0c94d..87e8531 100644 (file)
@@ -2,9 +2,9 @@ package eu.svjatoslav.alyverkko_cli;
 
 /**
  * <p>General utility functions for the Älyverkko CLI application. Currently provides ANSI color output capabilities for
- * console messages.</p>
- * <p>Color formatting follows standard ANSI escape sequences, with specific methods for common message types like errors.</p>
- * <p>For future extensions, this class could include additional helper functions for file operations or string processing.</p>
+ * console messages.
+ * <p>Color formatting follows standard ANSI escape sequences, with specific methods for common message types like errors.
+ * <p>For future extensions, this class could include additional helper functions for file operations or string processing.
  */
 public class Utils {
 
index e74e5a2..622bdc0 100644 (file)
@@ -30,20 +30,6 @@ import static eu.svjatoslav.alyverkko_cli.configuration.ConfigurationHelper.load
  * </pre>
  */
 
-/**
- * <p>Aggregates files from a source directory into a single file for AI processing.
- * This is particularly useful for creating comprehensive inputs from multiple files
- * matching a specified pattern.</p>
- * <p>Features include:
- * <ul>
- *   <li>Recursive file discovery</li>
- *   <li>Glob pattern matching</li>
- *   <li>Header injection for file tracking</li>
- *   <li>Automatic file opening in editor</li>
- * </ul>
- * </p>
- * <p>By default, the output file is saved in the mail directory with a .org extension.</p>
- */
 public class JoinFilesCommand implements Command {
 
     /**
index 177a443..2ad1d7c 100644 (file)
@@ -11,15 +11,15 @@ import static eu.svjatoslav.alyverkko_cli.configuration.ConfigurationHelper.load
 
 /**
  * <p>Displays all available AI models in the configured models directory. This command provides a quick overview of
- * currently available models and their metadata.</p>
+ * currently available models and their metadata.
  * <p>The implementation:
  * <ul>
  *   <li>Loads the configuration</li>
  *   <li>Instantiates ModelLibrary</li>
  *   <li>Prints model details using ModelLibrary's printModels()</li>
  * </ul>
- * </p>
- * <p>This command is primarily intended for administrative use to verify model availability before running tasks.</p>
+ * 
+ * <p>This command is primarily intended for administrative use to verify model availability before running tasks.
  */
 public class ListModelsCommand implements Command {
 
index c9df3ca..f68192f 100644 (file)
@@ -21,7 +21,7 @@ import static eu.svjatoslav.commons.cli_helper.CLIHelper.*;
 /**
  * <p>Interactive configuration wizard that helps users validate and fix their configuration files.
  * It performs system checks and offers to fix any missing or invalid paths, discovers new models,
- * and updates the configuration accordingly.</p>
+ * and updates the configuration accordingly.
  * <p>Key workflow steps:
  * <ol>
  *   <li>Load or create configuration</li>
@@ -29,9 +29,8 @@ import static eu.svjatoslav.commons.cli_helper.CLIHelper.*;
  *   <li>Discover and annotate new models</li>
  *   <li>Save updated configuration</li>
  * </ol>
- * </p>
  * <p>When handling split models (.gguf files with part numbering), the wizard automatically
- * detects base models and only adds part-1 files to the configuration.</p>
+ * detects base models and only adds part-1 files to the configuration.
  */
 public class WizardCommand implements Command {
 
index cb71e41..3956628 100644 (file)
@@ -1,6 +1,7 @@
 package eu.svjatoslav.alyverkko_cli.commands.mail_correspondant;
 
 import eu.svjatoslav.alyverkko_cli.*;
+import eu.svjatoslav.alyverkko_cli.configuration.ConfigurationHelper;
 import eu.svjatoslav.alyverkko_cli.model.Model;
 import eu.svjatoslav.alyverkko_cli.model.ModelLibrary;
 import eu.svjatoslav.commons.cli_helper.parameter_parser.Parser;
@@ -11,34 +12,27 @@ import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
 import java.nio.file.*;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Optional;
+import java.util.*;
 
 import static eu.svjatoslav.alyverkko_cli.Main.configuration;
-import static eu.svjatoslav.alyverkko_cli.configuration.ConfigurationHelper.getConfigurationFile;
-import static eu.svjatoslav.alyverkko_cli.configuration.ConfigurationHelper.loadConfiguration;
 import static eu.svjatoslav.commons.file.IOHelper.getFileContentsAsString;
 import static eu.svjatoslav.commons.file.IOHelper.saveToFile;
 import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE;
 import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY;
 
+
 /**
- * <p>Monitors a designated mail directory for text files containing "TOCOMPUTE:" markers.
- * When new or modified files are detected, it processes them with appropriate AI models
- * and appends the results using a standardized format.</p>
- * <p>The processing pipeline includes:
- * <ol>
- *   <li>Initial scan of existing files</li>
- *   <li>WatchService registration for real-time monitoring</li>
- *   <li>Query construction from file metadata</li>
- *   <li>AI response formatting and appending</li>
- * </ol>
- * </p>
- * <p>This implementation uses a sleep delay (1 second) after detecting file changes to allow complete writes before
- * processing. The response format follows org-mode conventions for easy reading and further processing.</p>
+ * The MailCorrespondentCommand continuously monitors a specified mail
+ * directory for new or modified text files, checks if they have a
+ * "TOCOMPUTE:" marker, and if so, adds them to a priority queue to be
+ * processed in priority order. Once processed, results are appended to
+ * the same file.
+ * <p>
+ * Usage:
+ * <pre>
+ *   alyverkko-cli mail
+ * </pre>
  */
-
 public class MailCorrespondentCommand implements Command {
 
     /**
@@ -69,6 +63,23 @@ public class MailCorrespondentCommand implements Command {
      */
     File mailDir;
 
+    /**
+     * Priority queue of tasks to process, sorted by priority and a
+     * random tiebreaker.
+     */
+    private final PriorityQueue<TaskQueueEntry> taskQueue;
+
+    public MailCorrespondentCommand() {
+        Comparator<TaskQueueEntry> comparator = (a, b) -> {
+            int priorityCompare = Integer.compare(b.priority, a.priority);
+            if (priorityCompare != 0) {
+                return priorityCompare;
+            }
+            return a.tiebreaker.compareTo(b.tiebreaker);
+        };
+        this.taskQueue = new PriorityQueue<>(comparator);
+    }
+
     /**
      * @return the name of this command, i.e., "mail".
      */
@@ -79,8 +90,8 @@ public class MailCorrespondentCommand implements Command {
 
     /**
      * Executes the "mail" command, loading configuration, starting a
-     * WatchService on the mail directory, and running an infinite loop
-     * that processes newly discovered tasks.
+     * WatchService on the mail directory, adding existing files to the
+     * task queue, and processing tasks in priority order.
      *
      * @param cliArguments the command-line arguments following the "mail" subcommand.
      * @throws IOException          if reading/writing tasks fails.
@@ -94,7 +105,7 @@ public class MailCorrespondentCommand implements Command {
             return;
         }
 
-        configuration = loadConfiguration(getConfigurationFile(configFileOption));
+        configuration = ConfigurationHelper.loadConfiguration(ConfigurationHelper.getConfigurationFile(configFileOption));
         if (configuration == null) {
             System.out.println("Failed to load configuration file");
             return;
@@ -106,27 +117,26 @@ public class MailCorrespondentCommand implements Command {
         // Set up directory watch service
         initializeFileWatcher();
 
-        // Process any existing files that might already be in the directory
+        // Add all existing mail files to the queue
         initialMailScanAndReply();
 
         System.out.println("Mail correspondent running. Press CTRL+c to terminate.");
 
-        // Main loop: watch for file events
+        // Main loop: process tasks from the queue in priority order
         while (true) {
-            WatchKey key;
-            try {
-                key = directoryWatcher.take();
-            } catch (InterruptedException e) {
-                System.out.println("Interrupted while waiting for file system events. Exiting.");
-                break;
-            }
+            // Process the highest priority task if available
+            if (!taskQueue.isEmpty()) processTask(taskQueue.poll());
 
-            System.out.println("Detected filesystem event.");
+            // Check for filesystem events
+            WatchKey key = directoryWatcher.poll();
 
             // Sleep briefly to allow the file to be fully written
             Thread.sleep(1000);
 
-            processDetectedFilesystemEvents(key);
+            if (key != null) {
+                System.out.println("Detected filesystem events in mail directory. Processing ... ");
+                processDetectedFilesystemEvents(key);
+            }
 
             if (!key.reset()) {
                 break;
@@ -138,17 +148,18 @@ public class MailCorrespondentCommand implements Command {
 
     /**
      * Performs an initial scan of existing files in the mail directory,
-     * processing those that need AI inference (i.e., that start with "TOCOMPUTE:").
+     * adding those that need processing to the task queue.
      *
-     * @throws IOException          if reading files fails.
-     * @throws InterruptedException if the thread is interrupted.
+     * @throws IOException if file scanning fails.
      */
-    private void initialMailScanAndReply() throws IOException, InterruptedException {
+    private void initialMailScanAndReply() throws IOException {
         File[] files = mailDir.listFiles();
-        if (files == null) return;
+        if (files == null) {
+            return;
+        }
 
         for (File file : files) {
-            processMailIfNeeded(file);
+           considerFileForQueuing(file.toPath());
         }
     }
 
@@ -168,6 +179,11 @@ public class MailCorrespondentCommand implements Command {
             return false;
         }
 
+        // Ensure the file exists
+        if (!file.exists()) {
+            return false;
+        }
+
         // Check if it's a regular file
         if (!file.isFile()) {
             return false;
@@ -185,9 +201,13 @@ public class MailCorrespondentCommand implements Command {
      * @throws IOException if file reading fails.
      */
     private static boolean fileHasToComputeMarker(File file) throws IOException {
+        String firstLine = getFirstLine(file);
+        return firstLine != null && firstLine.startsWith("TOCOMPUTE:");
+    }
+
+    private static String getFirstLine(File file) throws IOException {
         try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
-            String firstLine = reader.readLine();
-            return firstLine != null && firstLine.startsWith("TOCOMPUTE:");
+            return reader.readLine();
         }
     }
 
@@ -217,7 +237,7 @@ public class MailCorrespondentCommand implements Command {
         saveAiResponseToFile(file, mailQuery, aiGeneratedResponse);
     }
 
-    private static void saveAiResponseToFile(File file, MailQuery mailQuery, String aiGeneratedResponse) throws IOException {
+    private static void saveAiResponseToFile(File file, MailQuery mailQuery, String aiResponse) throws IOException {
         // Build new content
         StringBuilder resultFileContent = new StringBuilder();
 
@@ -235,17 +255,53 @@ public class MailCorrespondentCommand implements Command {
         // Append the AI response block
         resultFileContent
                 .append("* ASSISTANT:\n")
-                .append(aiGeneratedResponse)
+                .append(aiResponse)
                 .append("\n");
 
         // Write the combined result back to the same file
         saveToFile(file, resultFileContent.toString());
     }
 
+
+    /**
+     * Processes a task by reading the file, building the MailQuery,
+     * running the AI query, and saving the response.
+     *
+     * @param entry the task entry containing the file path and priority.
+     */
+    private void processTask(TaskQueueEntry entry) throws IOException {
+        Path filePath = entry.getFilePath();
+        File file = filePath.toFile();
+
+        if (!isMailProcessingNeeded(file)) {
+            System.out.println("Ignoring file: " + filePath.getFileName() + " (does not need processing now)");
+            return;
+        }
+
+        try {
+            MailQuery mailQuery = buildMailQueryFromFile(file);
+            AiTask aiTask = new AiTask(mailQuery);
+            String aiGeneratedResponse = aiTask.runAiQuery();
+
+            saveAiResponseToFile(file, mailQuery, aiGeneratedResponse);
+        } catch (IOException | InterruptedException | RuntimeException e) {
+            e.printStackTrace();
+        }
+    }
+
+
+    /**
+     * Builds a string for the first line of the output file indicating
+     * that processing is done.
+     *
+     * @param mailQuery the query that was processed.
+     * @return a string for the first line.
+     */
     private static String getDoneLine(MailQuery mailQuery) {
-        return "DONE: prompt=" + mailQuery.systemPromptName + " model="+ mailQuery.model.alias + " duration=" + getDuration(mailQuery.startTime, mailQuery.endTime) + "\n";
+        return "DONE: prompt=" + mailQuery.systemPromptName + " model=" + mailQuery.model.alias + " duration=" + getDuration(mailQuery.startTime, mailQuery.endTime) + "\n";
     }
 
+
     private static String getDuration(long startTime, long endTime) {
 
         long durationMillis = endTime - startTime;
@@ -264,19 +320,22 @@ public class MailCorrespondentCommand implements Command {
         return durationHours + "h";
     }
 
+    /**
+     * Builds a MailQuery object from the contents of a file.
+     *
+     * @param file the file to read.
+     * @return the constructed MailQuery.
+     * @throws IOException if reading the file fails.
+     */
     private MailQuery buildMailQueryFromFile(File file) throws IOException {
         MailQuery result = new MailQuery();
 
-        // Read the mail content
         String inputFileContent = getFileContentsAsString(file);
-
-        // Split into first line and user prompt
         int firstNewLineIndex = inputFileContent.indexOf('\n');
         if (firstNewLineIndex == -1) {
-            throw new IllegalArgumentException("Input file is only one line long. Content: " + inputFileContent);
+            throw new IllegalArgumentException("Input file is only one line long.");
         }
 
-        // The First line should start with "TOCOMPUTE:" and contain settings
         String firstLine = inputFileContent.substring(0, firstNewLineIndex);
         Map<String, String> fileProcessingSettings = parseSettings(firstLine);
 
@@ -295,9 +354,21 @@ public class MailCorrespondentCommand implements Command {
         }
         result.model = modelOptional.get();
 
+        // Set priority
+        String priorityStr = fileProcessingSettings.get("priority");
+        result.priority = 0;
+        if (priorityStr != null) {
+            try {
+                result.priority = Integer.parseInt(priorityStr);
+            } catch (NumberFormatException e) {
+                System.err.println("Invalid priority in file: " + priorityStr);
+            }
+        }
+
         return result;
     }
 
+
     /**
      * Parses the "TOCOMPUTE:" line, which should look like:
      * <pre>TOCOMPUTE: key1=value1 key2=value2 ...</pre>
@@ -329,18 +400,18 @@ public class MailCorrespondentCommand implements Command {
     }
 
     /**
-     * Handles the filesystem events from the WatchService (e.g. file creation
-     * or modification), then processes those files if necessary.
+     * Handles the filesystem events from the WatchService (e.g., file
+     * creation or modification), then adds the file to the task queue
+     * if it needs processing.
      *
      * @param key the watch key containing the events.
-     * @throws IOException          if file reading/writing fails.
-     * @throws InterruptedException if the AI process is interrupted.
+     * @throws IOException if file processing fails.
      */
-    private void processDetectedFilesystemEvents(WatchKey key) throws IOException, InterruptedException {
+    private void processDetectedFilesystemEvents(WatchKey key) throws IOException {
         for (WatchEvent<?> event : key.pollEvents()) {
             WatchEvent.Kind<?> kind = event.kind();
 
-            // Skip OVERFLOW event
+            // Skip OVERFLOW events
             if (kind == StandardWatchEventKinds.OVERFLOW) {
                 continue;
             }
@@ -349,10 +420,10 @@ public class MailCorrespondentCommand implements Command {
             Path filename = ((WatchEvent<Path>) event).context();
             System.out.println("Event: " + kind + " for file: " + filename);
 
-            // Process the file
+            // Add to task queue if needed
             if (kind == ENTRY_CREATE || kind == ENTRY_MODIFY) {
-                File file = mailDir.toPath().resolve(filename).toFile();
-                processMailIfNeeded(file);
+                Path filePath = mailDir.toPath().resolve(filename);
+                considerFileForQueuing(filePath);
             }
         }
     }
@@ -367,4 +438,66 @@ public class MailCorrespondentCommand implements Command {
         this.directoryWatcher = FileSystems.getDefault().newWatchService();
         Paths.get(mailDir.getAbsolutePath()).register(directoryWatcher, ENTRY_CREATE, ENTRY_MODIFY);
     }
+
+    /**
+     * Adds a file to the task queue if it needs processing.
+     *
+     * @param filePath the path to the file to check.
+     * @throws IOException if reading the first line fails.
+     */
+    private void considerFileForQueuing(Path filePath) throws IOException {
+        File file = filePath.toFile();
+        if (!isMailProcessingNeeded(file)) return;
+
+        String firstLine = getFirstLine(file);
+        Map<String, String> settings = parseSettings(firstLine);
+        int priority = 0;
+        String priorityStr = settings.get("priority");
+        if (priorityStr != null) {
+            try {
+                priority = Integer.parseInt(priorityStr);
+            } catch (NumberFormatException e) {
+                System.err.println("Invalid priority in file " + filePath.getFileName() + ": " + priorityStr);
+            }
+        }
+        taskQueue.offer(new TaskQueueEntry(filePath, priority));
+    }
+
+    /**
+     * A static nested class representing a task in the queue, with a
+     * priority and a tiebreaker for sorting.
+     */
+    private static class TaskQueueEntry implements Comparable<TaskQueueEntry> {
+        private final Path filePath;
+        private final int priority;
+        private final String tiebreaker;
+
+        public TaskQueueEntry(Path filePath, int priority) {
+            this.filePath = filePath;
+            this.priority = priority;
+            this.tiebreaker = UUID.randomUUID().toString();
+        }
+
+        public Path getFilePath() {
+            return filePath;
+        }
+
+        public int getPriority() {
+            return priority;
+        }
+
+        public String getTiebreaker() {
+            return tiebreaker;
+        }
+
+        @Override
+        public int compareTo(TaskQueueEntry other) {
+            int priorityCompare = Integer.compare(this.priority, other.priority);
+            if (priorityCompare != 0) {
+                return -priorityCompare; // higher priority first
+            }
+            return this.tiebreaker.compareTo(other.tiebreaker);
+        }
+    }
+
 }
index 51a3e0b..e17e73d 100644 (file)
@@ -41,6 +41,8 @@ public class MailQuery {
      */
     public long endTime;
 
+    public int priority;
+
     /**
      * Returns a string containing a summary of the {@link MailQuery} object.
      *
index 3bf376d..7aa5003 100644 (file)
@@ -1,13 +1,12 @@
 /**
  * <p>This subpackage implements the mail-based AI task processing functionality. It watches mail directories for
- * new/modified files with specific markers and processes them using AI models.</p>
+ * new/modified files with specific markers and processes them using AI models.
  * <p>Key components:
  * <ul>
  *   <li>File monitoring with WatchService</li>
  *   <li>Prompt parsing and execution logic</li>
  *   <li>Query object for storing processing parameters</li>
  * </ul>
- * </p>
  */
 
 package eu.svjatoslav.alyverkko_cli.commands.mail_correspondant;
\ No newline at end of file
index 33f0c48..871a60b 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * <p>This package implements all subcommands available in the Älyverkko CLI application. Each command class provides a
- * specific functionality through the Command interface.</p>
+ * specific functionality through the Command interface.
  * <p>Available commands include:
  * <ul>
  *   <li>Wizard-style configuration builder</li>
@@ -8,7 +8,6 @@
  *   <li>File joining for multi-file processing</li>
  *   <li>Mail-based AI task processing</li>
  * </ul>
- * </p>
  */
 
 package eu.svjatoslav.alyverkko_cli.commands;
\ No newline at end of file
index d25d723..01ed019 100644 (file)
@@ -10,16 +10,15 @@ import static eu.svjatoslav.commons.file.IOHelper.getFileContentsAsString;
 
 /**
  * <p>Central configuration class storing all application parameters.
- * This class is serialized to YAML format for user editing and persistence.</p>
+ * This class is serialized to YAML format for user editing and persistence.
  * <p>Configuration parameters include:
  * <ul>
  *   <li>Model and prompt directories</li>
  *   <li>Performance tuning parameters</li>
  *   <li>Model-specific configurations</li>
  * </ul>
- * </p>
  * <p>All paths are resolved relative to the user's home directory by default, but can be customized. The class provides
- * direct access to prompt content for AI query construction.</p>
+ * direct access to prompt content for AI query construction.
  */
 @Data
 public class Configuration {
index 7a4a36b..6c39b8a 100644 (file)
@@ -9,14 +9,13 @@ import java.io.IOException;
 
 /**
  * <p>Helper class for configuration file operations. Provides methods for loading configurations
- * and determining the default configuration file path in the user's home directory.</p>
+ * and determining the default configuration file path in the user's home directory.
  * <p>Key functionality includes:
  * <ul>
  *   <li>Configuration file path resolution</li>
  *   <li>YAML deserialization</li>
  *   <li>Error handling for missing configurations</li>
  * </ul>
- * </p>
  */
 public class ConfigurationHelper {
 
index 3fb3ba6..fd21d0b 100644 (file)
@@ -1,14 +1,13 @@
 /**
  * <p>This package handles the configuration system for the Älyverkko CLI application.
  * It provides classes for storing and retrieving application-wide settings, including
- * model configurations, directory paths, and performance parameters.</p>
+ * model configurations, directory paths, and performance parameters.
  * <p>Configuration is stored in YAML format and includes:
  * <ul>
  *   <li>Model directory paths</li>
  *   <li>Mail task directories</li>
  *   <li>Performance settings (thread counts, temperature)</li>
  * </ul>
- * </p>
  */
 
 package eu.svjatoslav.alyverkko_cli.configuration;
\ No newline at end of file
index 8cf7bfd..b5fcf1a 100644 (file)
@@ -4,7 +4,7 @@ import java.io.File;
 
 /**
  * <p>Represents an AI model stored on the filesystem with metadata about its capabilities and identification.
- * This class serves as a lightweight container for model information, enabling quick lookup and validation.</p>
+ * This class serves as a lightweight container for model information, enabling quick lookup and validation.
  * <p>Models are typically discovered through configuration files and stored in the ModelLibrary for easy access.
  * <p>Key fields include:
  * <ul>
@@ -13,7 +13,6 @@ import java.io.File;
  *   <li>alias - User-friendly identifier for the model</li>
  *   <li>endOfTextMarker - Optional response completion marker</li>
  * </ul>
- * </p>
  */
 public class Model {
 
@@ -57,14 +56,13 @@ public class Model {
     /**
      * <p>Prints the model's metadata to standard output in a consistent format. This includes the model's alias,
      * filesystem path, and context token capacity. The output format is designed to be both human-readable and
-     * machine-parsable when needed.</p>
+     * machine-parsable when needed.
      * <p>Typical output:
      * <pre>
      * Model: default
      *   Path: /path/to/model.gguf
      *   Context size: 32768
      * </pre>
-     * </p>
      */
     public void printModelDetails() {
         System.out.println("Model: " + alias);
index 717d44e..5d8b074 100644 (file)
@@ -1,13 +1,12 @@
 /**
  * <p>This package defines the model management system for the Älyverkko CLI.
- * It includes classes for representing AI models and maintaining a library of available models.</p>
+ * It includes classes for representing AI models and maintaining a library of available models.
  * <p>Key features:
  * <ul>
  *   <li>Model metadata storage and validation</li>
  *   <li>Default model selection and management</li>
  *   <li>File system integration for model discovery</li>
  * </ul>
- * </p>
  */
 
 package eu.svjatoslav.alyverkko_cli.model;
\ No newline at end of file
index 491400e..a3057d0 100644 (file)
@@ -1,14 +1,14 @@
 /**
  * <p>This package contains the core components of the Älyverkko CLI application, including the main entry point,
  * command interfaces, and utility classes. It serves as the central hub for orchestrating subcommands and core
- * application behavior.</p>
+ * application behavior.
  * <p>Key responsibilities include:
  * <ul>
  *   <li>Command registration and execution</li>
  *   <li>Configuration loading and management</li>
  *   <li>Basic utility functions for colored console output</li>
  * </ul>
- * </p>
+ *
  */
 
 package eu.svjatoslav.alyverkko_cli;
\ No newline at end of file