Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
a0daae5
Fixed logo error with the updater.
HackusatePvP May 9, 2026
2983b46
Increased avatar size and added image smoothing.
HackusatePvP May 10, 2026
9cb8f31
Removed system print line.
HackusatePvP May 10, 2026
0477767
Deleted default model option and added coloring to icons.
HackusatePvP May 11, 2026
db5465f
Refactored ImageLoader from RenEngine changes.
HackusatePvP May 12, 2026
85943a0
Fixed issue where VRAM would not be properly calculated due to old ll…
HackusatePvP May 12, 2026
88a1758
Added URISyntaxException catch.
HackusatePvP May 13, 2026
2a7cd8f
Removed qodana.
HackusatePvP May 13, 2026
1c2e221
Added force disable reasoning to fix issues with unsupported models.
HackusatePvP May 13, 2026
101dfe6
Added missing URISyntaxException.
HackusatePvP May 13, 2026
64ae5f3
Added missing initial value for forceDisableReasoning.
HackusatePvP May 14, 2026
c0079c3
Fixed issues with new llama.cpp version where the server process woul…
HackusatePvP May 14, 2026
7327d17
Added process verification before killing it.
HackusatePvP May 16, 2026
bbbd8eb
Finished implementation of chat importer and exporter.
HackusatePvP May 16, 2026
be4ce41
Removed old User creator.
HackusatePvP May 16, 2026
580bc89
Fixed display issues for user templates.
HackusatePvP May 16, 2026
697a011
Removed debugger line.
HackusatePvP May 16, 2026
3f1f424
Fixed issues where global memory wouldn't be set.
HackusatePvP May 16, 2026
a85c80c
Fixed issues when deleting user.
HackusatePvP May 16, 2026
19aafdf
Added body text when no users exist.
HackusatePvP May 16, 2026
b5dd5a0
Removed stage parameter.
HackusatePvP May 17, 2026
763bc06
Added concurrent character loading.
HackusatePvP May 17, 2026
c7d892f
Fixed issue where character view would load while characters were loa…
HackusatePvP May 19, 2026
9760776
Removed unused application updater.
HackusatePvP May 19, 2026
e1bfe74
Fixed duplicated App constructor.
HackusatePvP May 23, 2026
7a0f6ea
Updated log4j api to match core version.
HackusatePvP May 23, 2026
d2b3b40
Fixed issue where backend server wouldn't start on newer llama.cpp ve…
HackusatePvP May 23, 2026
6bf9e8e
Updated RenEngine > 1.0.8
HackusatePvP May 23, 2026
c22aeaf
Added reset button for fixing corrupted installations.
HackusatePvP May 23, 2026
dc6fc76
Improved loading times and fixed desync issues.
HackusatePvP May 23, 2026
23c41df
Fixed ui layout issues.
HackusatePvP May 28, 2026
65366ce
Added error catch if the backend version file is not uploaded.
HackusatePvP May 28, 2026
7e5c7d6
Fixed scroll position issues.
HackusatePvP May 31, 2026
b4efc71
Added model reasoning options.
HackusatePvP May 31, 2026
30c4f44
Moved ServerSettings to configuration package.
HackusatePvP May 31, 2026
c7cf87a
Fixed issues with scroll position.
HackusatePvP May 31, 2026
fe85b32
Moved order of model selection.
HackusatePvP May 31, 2026
ed7a3a8
Fixed null exception issue when a chat message was queued before the …
HackusatePvP May 31, 2026
5c43a09
Fixed issues where server would not output model info causing VRAM an…
HackusatePvP May 31, 2026
e0115e0
Cleaned up code.
HackusatePvP May 31, 2026
2e6da78
Fixed height issues with views.
HackusatePvP May 31, 2026
13df286
Fixed issues where vram-per-layer was not calculated correctly.
HackusatePvP Jun 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions .github/workflows/qodana_code_quality.yml

This file was deleted.

6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.piitex.app</groupId>
<artifactId>character-chat-app</artifactId>
<version>1.1.3.1105</version>
<version>1.1.4</version>
<name>character-chat-app</name>

<properties>
Expand All @@ -25,7 +25,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.25.2</version>
<version>2.25.4</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand All @@ -42,7 +42,7 @@
<dependency>
<groupId>me.piitex.engine</groupId>
<artifactId>ren-engine</artifactId>
<version>1.0.7-SNAPSHOT</version>
<version>1.0.8-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
46 changes: 0 additions & 46 deletions qodana.yaml

This file was deleted.

93 changes: 59 additions & 34 deletions src/main/java/me/piitex/app/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,19 @@
import me.piitex.app.backend.User;
import me.piitex.app.backend.server.DeviceProcess;
import me.piitex.app.backend.server.ServerProcess;
import me.piitex.app.backend.server.ServerSettings;
import me.piitex.app.configuration.ServerSettings;
import me.piitex.app.configuration.AppSettings;
import me.piitex.app.updater.ApplicationUpdater;
import me.piitex.app.updater.LLamaBackendUpdater;
import me.piitex.app.views.HomeView;
import me.piitex.app.views.Positions;
import me.piitex.engine.WindowBuilder;
import me.piitex.engine.loaders.image.BaseImageLoader;
import me.piitex.os.OSPathing;
import me.piitex.os.OSUtil;
import me.piitex.os.configurations.InfoFile;
import me.piitex.engine.Window;
import me.piitex.engine.containers.EmptyContainer;
import me.piitex.engine.fxloader.FXLoad;
import me.piitex.engine.loaders.ImageLoader;
import me.piitex.engine.overlays.AlertOverlay;
import me.piitex.engine.overlays.ButtonBuilder;
import me.piitex.engine.overlays.ButtonOverlay;
Expand All @@ -41,8 +40,11 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.util.*;
import java.util.List;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.Future;

public class App extends FXLoad {
private ServerSettings settings;
Expand Down Expand Up @@ -70,6 +72,7 @@ public class App extends FXLoad {

public static final Logger logger = LogManager.getLogger(App.class);

private final ConcurrentLinkedQueue<String> characterLoadQueue = new ConcurrentLinkedQueue<>();
private volatile boolean loading = true;
private volatile boolean error = false;

Expand Down Expand Up @@ -122,13 +125,12 @@ public void preInitialization() {
loadUserTemplates();
loadCharacters();
App.logger.info("Finished pre-initialization.");
loading = false;
});
threadPoolManager.submitTask(this::loadBackendServer);
}

@Override
public void initialization(Stage initialStage) {
public void initialization() {
// Error will pass if another instance is running,
if (error) return;
App.logger.info("Loading app from '{}'", getAppDirectory().getAbsolutePath());
Expand Down Expand Up @@ -207,7 +209,7 @@ public void initialization(Stage initialStage) {
logger.info("Screen Size ({},{})", dimension.width, dimension.height);

File logo = new File(getExecutedDirectory(), "logo.png");
window = new WindowBuilder("Chat App").setIcon(new ImageLoader(logo)).setScale((appSettings.isWindowScaling()) && !mobile).setAntiAliasing(false).setDimensions(setWidth, setHeight).build();
window = new WindowBuilder("Chat App").setIcon(new BaseImageLoader(logo)).setScale((appSettings.isWindowScaling()) && !mobile).setAntiAliasing(false).setDimensions(setWidth, setHeight).build();

// Initialize global positions. Needed for the rendering process.
Positions.initialize();
Expand Down Expand Up @@ -342,20 +344,44 @@ public void loadCharacters() {
logger.error("Could not initialize characters directory. Program may lack permission to access file system.");
return;
}

Collection<Future<?>> tasks = new HashSet<>();

for (File file : files) {
logger.info("Loading character '{}'...", file.getName());
if (file.isDirectory()) {
String id = file.getName();
// Check if info file exists
File info = new File(file, "character.info");
if (info.exists()) {
InfoFile infoFile = new InfoFile(info, true);
characters.put(id, new Character(id, infoFile));
} else {
logger.error("Character file does not exist for '{}'", file.getName());
}
tasks.add(App.getThreadPoolManager().submitTask(() -> {
characterLoadQueue.add(file.getName());
logger.info("Loading character '{}'...", file.getName());
String id = file.getName();
// Check if info file exists
File info = new File(file, "character.info");
if (info.exists()) {
InfoFile infoFile = new InfoFile(info, true);
characters.put(id, new Character(id, infoFile));
} else {
logger.error("Character file does not exist for '{}'", file.getName());
}

characterLoadQueue.remove(file.getName());
}));
}
}

int total = tasks.size();
Collection<Future<?>> completed;
do {
completed = new HashSet<>();
for (Future<?> task : tasks) {
if (task.isDone()) {
completed.add(task);
}
}

if (completed.size() == total) {
loading = false;
}
} while (loading);

}

public void loadUserTemplates() {
Expand Down Expand Up @@ -399,26 +425,21 @@ public void performUpdates() {

logger.info("Model list updated.");
downloader.shutdown();
} catch (IOException e) {
} catch (IOException | URISyntaxException e) {
App.logger.error("Failed to fetch download size.", e);
}

// Microslop, the multi trillion dollar company that can't handle more than 50 API requests.
App.logger.info("Checking for application updates...");
ApplicationUpdater applicationUpdater = new ApplicationUpdater(getVersion());
//applicationUpdater.checkForUpdates();

App.logger.info("Checking for backend version...");

if (settings.getDevice().equals("error")) {
App.logger.info("Could not load backend devices. Force checking updates...");
settings.setDevice("Auto");
lLamaBackendUpdater = new LLamaBackendUpdater("0");
} else {
File backendVersionFile = Arrays.stream(getBackendDirectory().listFiles()).filter(file -> file.getName().endsWith(".txt")).findAny().orElse(null);
File backendVersionFile = Arrays.stream(Objects.requireNonNull(getBackendDirectory().listFiles())).filter(file -> file.getName().endsWith(".txt")).findAny().orElse(null);
if (backendVersionFile != null) {
lLamaBackendUpdater = new LLamaBackendUpdater(backendVersionFile.getName().split(".txt")[0]);
} else {
App.logger.info("No update file found.");
lLamaBackendUpdater = new LLamaBackendUpdater("0");
}
}
Expand Down Expand Up @@ -469,7 +490,7 @@ public Window buildErrorWindow(String message) {

Application.setUserAgentStylesheet(new PrimerDark().getUserAgentStylesheet());
File logo = new File(getExecutedDirectory(), "logo.png");
window = new WindowBuilder("Error").setDimensions(400, 150).setIcon(new ImageLoader(logo)).build();
window = new WindowBuilder("Error").setDimensions(400, 150).setIcon(new BaseImageLoader(logo)).build();

EmptyContainer emptyContainer = new EmptyContainer(window.getWidth(), window.getHeight());
window.addContainer(emptyContainer);
Expand All @@ -484,15 +505,19 @@ public Window buildErrorWindow(String message) {
emptyContainer.addElement(kill);
kill.onClick(event -> {
App.logger.info("Killing old process.");
if (ProcessUtil.killProcess(Long.parseLong(settings.getInfoFile().get("main-pid")))) {
App.logger.info("Old process was destroyed gracefully.");
Platform.exit();
System.exit(0);
} else {
App.logger.info("Forcefully killing old process.");
ProcessUtil.terminateProcess(Long.parseLong(settings.getInfoFile().get("main-pid")));
}

Optional<ProcessHandle> handle = ProcessUtil.getRunningProcess(Long.parseLong(settings.getInfoFile().get("main-pid")));
handle.ifPresent(processHandle -> {
if (processHandle.info().toString().contains("java.exe") || processHandle.info().toString().contains("javaw.exe") || processHandle.info().toString().contains("CCA.exe")) {
if (ProcessUtil.killProcess(Long.parseLong(settings.getInfoFile().get("main-pid")))) {
App.logger.info("Old process was destroyed gracefully.");
Platform.exit();
System.exit(0);
} else {
App.logger.info("Forcefully killing old process.");
ProcessUtil.terminateProcess(Long.parseLong(settings.getInfoFile().get("main-pid")));
}
}
});
appSettings.getInfoFile().set("main-pid", "");
});

Expand Down
1 change: 0 additions & 1 deletion src/main/java/me/piitex/app/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public static void main(String[] args) {
if (Arrays.asList(args).contains("--force-updates")) {
forceUpdate = true;
}
new App();
Application.launch(App.class);
}
}
6 changes: 2 additions & 4 deletions src/main/java/me/piitex/app/backend/Character.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,8 @@ private void loadChats() {
if (getChatDirectory() == null || !getChatDirectory().exists()) return;
for (File file : getChatDirectory().listFiles()) {
if (file.isDirectory()) continue;
App.getThreadPoolManager().submitTask(() -> {
Chat chat = new Chat(file);
chats.add(chat);
});
Chat chat = new Chat(file);
chats.add(chat);
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/me/piitex/app/backend/User.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package me.piitex.app.backend;

import me.piitex.engine.loaders.image.BaseImageLoader;
import me.piitex.engine.loaders.image.ImageLoader;
import org.jetbrains.annotations.Nullable;
import me.piitex.app.App;
import me.piitex.os.configurations.InfoFile;
import me.piitex.engine.loaders.ImageLoader;
import me.piitex.engine.overlays.ImageOverlay;

import java.io.File;
Expand Down Expand Up @@ -141,7 +142,7 @@ public static ImageOverlay getUserAvatar(String iconPath, double width, double h
}


ImageLoader loader = new ImageLoader(file);
ImageLoader loader = new BaseImageLoader(file);
loader.setWidth(width);
loader.setHeight(height);

Expand Down
Loading