feat: add button to open logs folder

This commit is contained in:
Draculabo committed 2026-01-21 00:42:49 +08:00
1 parent e927ac9506
commit a438070268
4 files changed
+28 -1

No files matched your search

+8
View File
@@ -1,6 +1,8 @@
import { os } from '@orpc/server';
import { z } from 'zod';
import { networkInterfaces } from 'os';
import { shell } from 'electron';
import { getAgentDir } from '../../utils/paths';
// Schema for IP info
const IpInfoSchema = z.object({
@@ -61,4 +63,10 @@ export const systemHandler = os.router({
return results;
}),
// Open log directory in file explorer
openLogDirectory: os.output(z.void()).handler(async () => {
const logDir = getAgentDir();
await shell.openPath(logDir);
}),
});