refactor: redesign plugin system and enhance message handling

- Move plugin and tool-related classes to a dedicated `Plugin-API` module.
- Introduce a new plugin lifecycle (`onInit`, `onEnable`, `onDisable`) and a more robust `Tool` API.
- Refactor `Core` to use `PrintAdvanceMessageHandler` for improved handling of assistant messages, tool responses, and errors.
- Rename `PluginLoader` to `Loader` and migrate it to `me.zacharias.chat.plugin.loader`.
- Update build configurations and Java toolchains across modules.
- Clean up obsolete plugin annotations and interfaces in the `Core` module.
This commit is contained in:
2026-05-26 16:28:02 +02:00
parent 339b176480
commit f6610777ae
37 changed files with 510 additions and 132 deletions
+3 -2
View File
@@ -6,6 +6,7 @@ import me.zacharias.chat.ollama.OllamaPerameter;
import me.zacharias.chat.ollama.OllamaToolRespnce;
import me.zacharias.chat.plugin.annotation.OllamaTool;
import me.zacharias.chat.plugin.annotation.injectons.InjectPlugin;
import org.jetbrains.annotations.NotNull;
@OllamaTool
public class Tool extends OllamaFunctionTool {
@@ -13,7 +14,7 @@ public class Tool extends OllamaFunctionTool {
Test core;
@Override
public String name() {
public @NotNull String name() {
return "";
}
@@ -23,7 +24,7 @@ public class Tool extends OllamaFunctionTool {
}
@Override
public OllamaPerameter parameters() {
public @NotNull OllamaPerameter parameters() {
return null;
}