Skip to content

armgit / Orkas

Public Imported from GitHub
0

Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.

Add a Data root row to the settings page (path display + Open in file manager)

wyt1ecea84ce5da
diff --git a/src/main/ipc/index.ts b/src/main/ipc/index.ts
index 64af0a10..0fc8ab10 100644
--- a/src/main/ipc/index.ts
+++ b/src/main/ipc/index.ts
@@ -43,6 +43,7 @@ import { createLogger, logFromRenderer } from '../logger';
import * as path from 'node:path';
import * as fs from 'node:fs';
import { shell } from 'electron';
+import { WS_ROOT } from '../paths';
const log = createLogger('ipc');
@@ -685,6 +686,20 @@ const invokeHandlers: Record<string, InvokeHandler> = {
return { path: norm };
},
+ // Read the install data root (`<container>/data`) — read-only display
+ // for the settings page "Data root" row. WS_ROOT is process-stable so
+ // no async work is needed.
+ 'app.dataRootPath': async () => ({ ok: true, path: WS_ROOT }),
+
+ // Open the install data root in the OS file manager. WS_ROOT is the
+ // only path this opens — no caller-supplied path, so no sandbox check.
+ 'app.openDataRoot': async () => {
+ const target = WS_ROOT;
+ if (!fs.existsSync(target)) throw new Error('data root not found');
+ shell.openPath(target);
+ return { ok: true, path: target };
+ },
+
// Local CLI agent discovery (claude / codex / openclaw / opencode / hermes).
// Discovery + model catalogs only; actual spawning happens inside group_chat
// dispatch via `features/local_agents/runner.ts`, never as a standalone IPC.
diff --git a/src/renderer/index.html b/src/renderer/index.html
index 8d2d86bf..a984c360 100644
--- a/src/renderer/index.html
+++ b/src/renderer/index.html
@@ -516,6 +516,16 @@
<div class="settings-section-head" data-i18n="settings.section.data">Data</div>
<div class="settings-section-note" data-i18n="settings.section.data_note">Maintenance actions on local data. These cannot be undone.</div>
+ <div class="settings-group">
+ <div class="settings-group-head">
+ <div class="settings-group-title" data-i18n="settings.data_root.title">Data root</div>
+ <div class="settings-group-sub" data-i18n="settings.data_root.sub">All conversations, agents, skills, and KB content live under this directory. Click the path to open it in the OS file manager.</div>
+ </div>
+ <div class="settings-row">
+ <button class="btn btn-sm" id="settings-data-root-btn" type="button" title="" data-i18n-title="settings.data_root.open_tooltip"><span id="settings-data-root-path" class="muted"></span></button>
+ </div>
+ </div>
+
<div class="settings-group">
<div class="settings-group-head">
<div class="settings-group-title" data-i18n="settings.clear_all_convs.title">Clear all conversations</div>
diff --git a/src/renderer/locales/en.json b/src/renderer/locales/en.json
index 2898ea44..4ce49a4d 100644
--- a/src/renderer/locales/en.json
+++ b/src/renderer/locales/en.json
@@ -366,6 +366,9 @@
"settings.image.confirm_delete": "Delete the {provider} image API key?",
"settings.section.data": "Data",
"settings.section.data_note": "Maintenance actions on local data. These cannot be undone.",
+ "settings.data_root.title": "Data root",
+ "settings.data_root.sub": "All conversations, agents, skills, and KB content live under this directory. Click the path to open it in the OS file manager.",
+ "settings.data_root.open_tooltip": "Open in file manager",
"settings.clear_all_convs.title": "Clear all conversations",
"settings.clear_all_convs.sub": "Deletes every conversation. Skills and agents are NOT touched.",
"settings.clear_all_convs.btn": "Clear all conversations",
diff --git a/src/renderer/locales/zh.json b/src/renderer/locales/zh.json
index 6a0e3cbf..e809f149 100644
--- a/src/renderer/locales/zh.json
+++ b/src/renderer/locales/zh.json
@@ -366,6 +366,9 @@
"settings.image.confirm_delete": "确认删除 {provider} 的图片 API Key?",
"settings.section.data": "数据",
"settings.section.data_note": "对本地数据的维护操作,无法撤销。",
+ "settings.data_root.title": "数据根目录",
+ "settings.data_root.sub": "所有对话、智能体、技能和知识库内容都保存在该目录下。点击路径可在系统文件管理器中打开。",
+ "settings.data_root.open_tooltip": "在文件管理器中打开",
"settings.clear_all_convs.title": "清空所有对话",
"settings.clear_all_convs.sub": "删除全部对话记录。技能和智能体不受影响。",
"settings.clear_all_convs.btn": "清空所有对话",
diff --git a/src/renderer/modules/settings.js b/src/renderer/modules/settings.js
index 314576fe..f43d0b5f 100644
--- a/src/renderer/modules/settings.js
+++ b/src/renderer/modules/settings.js
@@ -33,6 +33,7 @@ async function loadSettings() {
_settingsRefreshImageProfiles(),
_settingsRefreshCommanderAvatar(),
_settingsRefreshMetacognition(),
+ _settingsRefreshDataRoot(),
]);
_settingsRenderPicker();
_settingsRenderEntries();
@@ -41,6 +42,7 @@ async function loadSettings() {
_settingsRenderImageSection();
_settingsRenderCommanderAvatar();
_settingsRenderMetacognition();
+ _settingsRenderDataRoot();
}
// ── Commander avatar ──
@@ -197,6 +199,36 @@ function _settingsRenderMetacognition() {
}
}
+// ── Data root row ──
+// Read-only display of the unified data root path; click to open it in
+// the OS file manager via the `app.openDataRoot` IPC.
+
+async function _settingsRefreshDataRoot() {
+ try {
+ const res = await window.orkas.invoke('app.dataRootPath');
+ _settingsState.dataRoot = (res && res.ok && res.path) ? String(res.path) : '';
+ } catch (_) {
+ _settingsState.dataRoot = '';
+ }
+}
+
+function _settingsRenderDataRoot() {
+ const btn = document.getElementById('settings-data-root-btn');
+ const span = document.getElementById('settings-data-root-path');
+ if (!btn || !span) return;
+ span.textContent = _settingsState.dataRoot || '';
+ if (!btn.dataset.bound) {
+ btn.addEventListener('click', async () => {
+ try {
+ await window.orkas.invoke('app.openDataRoot');
+ } catch (err) {
+ _settingsLog.warn('open data root failed', { error: (err && err.message) || String(err) });
+ }
+ });
+ btn.dataset.bound = '1';
+ }
+}
+
// ── Language radio (zh / en) ──
// Bound once; `loadSettings` just re-syncs the checked state each time the
// panel is opened so the radio reflects whatever setLang() last persisted.