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.

Restore synced agent and settings surfaces

wyt281e87428bf7
diff --git a/src/main/smoke.ts b/src/main/smoke.ts
index b8d68101..3adb11a4 100644
--- a/src/main/smoke.ts
+++ b/src/main/smoke.ts
@@ -33,7 +33,8 @@ async function section(name: string, fn: () => void | Promise<void>): Promise<vo
const { prompts, safeSubstitute } = await import('./prompts/loader');
console.log('[smoke] paths');
- await section('PC_ROOT ends with /PC', () => assert.ok(paths.PC_ROOT.endsWith('/PC')));
+ await section('PC_ROOT is the flat app root', () =>
+ assert.strictEqual(paths.PC_ROOT, path.resolve(__dirname, '..', '..')));
await section('APP_ROOT === PC_ROOT (flat layout)', () => assert.ok(paths.APP_ROOT === paths.PC_ROOT));
await section('WS_ROOT derivable', () => assert.ok(paths.WS_ROOT.length > 0));
await section('USERS_FILE at data root', () =>
diff --git a/src/renderer/index.html b/src/renderer/index.html
index 80674fd4..15252c97 100644
--- a/src/renderer/index.html
+++ b/src/renderer/index.html
@@ -433,7 +433,10 @@
<!-- Grid view (default) -->
<div class="agents-grid-view" id="agents-grid-view">
<div class="agents-grid-header">
- <span data-i18n="agents.title">Agents</span>
+ <div class="agents-grid-header-titles">
+ <span class="agents-grid-title" data-i18n="agents.title">AI Team</span>
+ <span class="agents-grid-subtitle" data-i18n="agents.subtitle">Every member is an agent — @ it, form squads, assign tasks.</span>
+ </div>
<div class="header-actions">
<button class="btn btn-sm" id="create-agent-btn" data-i18n="agents.create_btn">+ Create</button>
<button class="btn btn-sm" id="agents-more-btn" data-i18n="agents.more_btn">More</button>
@@ -471,30 +474,56 @@
</div>
</div>
<div class="agents-detail-body">
- <div class="agents-detail-section" id="agents-detail-runtime-section" style="display:none">
- <div class="agents-detail-label" data-i18n="agents.label_runtime">External agent</div>
- <div class="agents-detail-runtime" id="agents-detail-runtime"></div>
+ <div class="agents-detail-hero">
+ <div class="agents-detail-section" id="agents-detail-runtime-section" style="display:none">
+ <div class="agents-detail-label" data-i18n="agents.label_runtime">External agent</div>
+ <div class="agents-detail-runtime" id="agents-detail-runtime"></div>
+ </div>
+ <div class="agents-detail-section agents-detail-intro-section" id="agents-detail-intro-section">
+ <div class="agents-detail-label" data-i18n="agents.label_desc">Summary</div>
+ <div class="agents-detail-desc" id="agents-detail-desc" contenteditable="false"></div>
+ </div>
+ <div class="agents-detail-section agents-detail-stats-section" id="agents-detail-stats-section" style="display:none">
+ <div class="agents-detail-label" data-i18n="agents.label_runtime_stats">Runtime data</div>
+ <div class="agents-detail-stats" id="agents-detail-stats"></div>
+ </div>
+ </div>
+ <div class="agents-detail-section" id="agents-detail-memory-section" style="display:none">
+ <div class="agents-detail-label" data-i18n="agents.label_core_memory">Core memory</div>
+ <p class="agents-detail-section-desc" data-i18n="agents.core_memory_desc">Persistent memory this agent has built with you.</p>
+ <div class="agents-detail-list" id="agents-detail-memory"></div>
+ </div>
+ <div class="agents-detail-section" id="agents-detail-knowhow-section" style="display:none">
+ <div class="agents-detail-label" data-i18n="agents.label_knowhow">Know-how</div>
+ <p class="agents-detail-section-desc" data-i18n="agents.knowhow_desc">Task areas this agent is better at.</p>
+ <div class="agents-detail-list" id="agents-detail-knowhow"></div>
</div>
<div class="agents-detail-section" id="agents-detail-project-dir-section" style="display:none">
<div class="agents-detail-label" data-i18n="agents.label_project_dir">Project directory</div>
<div class="agents-detail-project-dir" id="agents-detail-project-dir"></div>
</div>
- <div class="agents-detail-section">
- <div class="agents-detail-label" data-i18n="agents.label_desc">Summary</div>
- <div class="agents-detail-desc" id="agents-detail-desc" contenteditable="false"></div>
- </div>
- <div class="agents-detail-section" id="agents-detail-category-section">
- <div class="agents-detail-label" data-i18n="agents.label_category">Category</div>
- <div class="agents-detail-category" id="agents-detail-category"></div>
+ <div class="agents-detail-section" id="agents-detail-output-standards-section" style="display:none">
+ <div class="agents-detail-label" data-i18n="agents.label_delivery_standards">Delivery standards</div>
+ <p class="agents-detail-section-desc" data-i18n="agents.delivery_standards_desc">Standards this agent checks before delivering.</p>
+ <div class="agents-detail-list" id="agents-detail-output-standards"></div>
+ </div>
+ <div class="agents-detail-section" id="agents-detail-input-output-section" style="display:none">
+ <div class="agents-detail-label" data-i18n="agents.label_input_output">Input / output</div>
+ <div class="agents-detail-io" id="agents-detail-input-output">
+ <div class="agents-detail-io-row" id="agents-detail-inputs-row">
+ <div class="agents-detail-io-label" data-i18n="agents.label_inputs">Inputs</div>
+ <div class="agents-detail-tag-row" id="agents-detail-inputs"></div>
+ </div>
+ <div class="agents-detail-io-row" id="agents-detail-output-format-control">
+ <div class="agents-detail-io-label" data-i18n="agents.label_output_format">Output format</div>
+ <div class="agents-detail-output-format" id="agents-detail-output-format"></div>
+ </div>
+ </div>
</div>
<div class="agents-detail-section agents-detail-section-workflow">
<div class="agents-detail-label" data-i18n="agents.label_workflow">Workflow</div>
<div class="agents-detail-workflow markdown-body" id="agents-detail-workflow" contenteditable="false"></div>
</div>
- <div class="agents-detail-section" id="agents-detail-output-format-section">
- <div class="agents-detail-label" data-i18n="agents.label_output_format">Output format</div>
- <div class="agents-detail-output-format" id="agents-detail-output-format"></div>
- </div>
</div>
</div>
</div>
@@ -886,7 +915,7 @@
<div class="settings-group">
<div class="settings-group-head">
<div class="settings-group-title" data-i18n="settings.commander_avatar.title">Commander avatar</div>
- <div class="settings-group-sub" data-i18n="settings.commander_avatar.sub">Click the avatar to pick a new icon and color.</div>
+ <div class="settings-group-sub" data-i18n="settings.commander_avatar.sub">Click the avatar to pick a new color.</div>
</div>
<div class="settings-row">
<span class="settings-commander-avatar-slot" id="settings-commander-avatar"></span>
@@ -901,24 +930,24 @@
</div>
<div class="settings-row settings-mode-list" id="settings-localexec-modes">
<label class="settings-mode-opt">
- <input type="radio" name="localexec-mode" value="off" />
+ <input type="radio" name="localexec-mode" value="workspace_approval" />
<span class="settings-mode-text">
- <span class="settings-mode-label" data-i18n="settings.localexec.mode.off">Read-only</span>
- <span class="settings-mode-desc" data-i18n="settings.localexec.mode.off_desc">Agents can only read and analyze files. They cannot run commands or modify files.</span>
+ <span class="settings-mode-label" data-i18n="settings.localexec.mode.workspace_approval">Cautious</span>
+ <span class="settings-mode-desc" data-i18n="settings.localexec.mode.workspace_approval_desc">Workspace files only, approve sensitive actions</span>
</span>
</label>
<label class="settings-mode-opt">
- <input type="radio" name="localexec-mode" value="risk_prompt" />
+ <input type="radio" name="localexec-mode" value="all_files_approval" />
<span class="settings-mode-text">
- <span class="settings-mode-label" data-i18n="settings.localexec.mode.risk_prompt">On, ask before risky actions (recommended)</span>
- <span class="settings-mode-desc" data-i18n="settings.localexec.mode.risk_prompt_desc">Agents can run commands and modify files. They ask for your approval before risky actions such as going online, deleting, or escalating privileges.</span>
+ <span class="settings-mode-label" data-i18n="settings.localexec.mode.all_files_approval">Standard</span>
+ <span class="settings-mode-desc" data-i18n="settings.localexec.mode.all_files_approval_desc">All files, approve sensitive actions</span>
</span>
</label>
<label class="settings-mode-opt">
- <input type="radio" name="localexec-mode" value="allow_all" />
+ <input type="radio" name="localexec-mode" value="all_files_auto" />
<span class="settings-mode-text">
- <span class="settings-mode-label" data-i18n="settings.localexec.mode.allow_all">Always allow</span>
- <span class="settings-mode-desc" data-i18n="settings.localexec.mode.allow_all_desc">Agents run any action without asking. Use this only when you fully trust the current task.</span>
+ <span class="settings-mode-label" data-i18n="settings.localexec.mode.all_files_auto">Trusted</span>
+ <span class="settings-mode-desc" data-i18n="settings.localexec.mode.all_files_auto_desc">All files, no sensitive approvals</span>
</span>
</label>
</div>
diff --git a/src/renderer/locales/en.json b/src/renderer/locales/en.json
index 94534d0d..49fbd481 100644
--- a/src/renderer/locales/en.json
+++ b/src/renderer/locales/en.json
@@ -1648,5 +1648,8 @@
"skills.global_group_expand": "Expand",
"skills.global_group_collapse": "Collapse",
"skills.source_external": "Package",
- "skills.source_global": "Global"
+ "skills.source_global": "Global",
+ "settings.commander_avatar.title": "Commander avatar",
+ "settings.commander_avatar.sub": "Click the avatar to pick a new color.",
+ "settings.commander_avatar.hint": "Click the avatar on the left to change it"
}
diff --git a/src/renderer/locales/ja.json b/src/renderer/locales/ja.json
index 99d37a18..df3d966e 100644
--- a/src/renderer/locales/ja.json
+++ b/src/renderer/locales/ja.json
@@ -1648,5 +1648,8 @@
"skills.global_group_expand": "展開",
"skills.global_group_collapse": "折りたたむ",
"skills.source_external": "パッケージ",
- "skills.source_global": "グローバル"
+ "skills.source_global": "グローバル",
+ "settings.commander_avatar.title": "コマンダーのアバター",
+ "settings.commander_avatar.sub": "アバターをクリックして色を変更できます。",
+ "settings.commander_avatar.hint": "左のアバターをクリックして変更"
}
diff --git a/src/renderer/locales/pt.json b/src/renderer/locales/pt.json
index f8b6dc34..e06db3aa 100644
--- a/src/renderer/locales/pt.json
+++ b/src/renderer/locales/pt.json
@@ -1643,5 +1643,8 @@
"settings.video.sub": "",
"settings.entries.oauth_badge": "OAuth",
"devtools.skill_metrics.system_unknown": "?",
- "bash.permission.reason_sep": ", "
+ "bash.permission.reason_sep": ", ",
+ "settings.commander_avatar.title": "Avatar do comandante",
+ "settings.commander_avatar.sub": "Clique no avatar para escolher uma nova cor.",
+ "settings.commander_avatar.hint": "Clique no avatar à esquerda para alterar"
}
diff --git a/src/renderer/locales/zh.json b/src/renderer/locales/zh.json
index 64a0e27a..8698fa8d 100644
--- a/src/renderer/locales/zh.json
+++ b/src/renderer/locales/zh.json
@@ -1648,5 +1648,8 @@
"skills.global_group_expand": "展开",
"skills.global_group_collapse": "收起",
"skills.source_external": "包",
- "skills.source_global": "全局"
+ "skills.source_global": "全局",
+ "settings.commander_avatar.title": "指挥官头像",
+ "settings.commander_avatar.sub": "点击头像可更换颜色。",
+ "settings.commander_avatar.hint": "点击左侧头像进行更换"
}
diff --git a/src/renderer/modules/settings.js b/src/renderer/modules/settings.js
index 42de8ed0..73b0d24f 100644
--- a/src/renderer/modules/settings.js
+++ b/src/renderer/modules/settings.js
@@ -160,18 +160,18 @@ function _settingsRenderCommanderAvatar() {
// ── Tool execution access permission ──
-const _LOCALEXEC_MODES = ['off', 'risk_prompt', 'allow_all'];
+const _LOCALEXEC_MODES = ['workspace_approval', 'all_files_approval', 'all_files_auto'];
async function _settingsRefreshLocalExec() {
const res = await window.orkas.invoke('permissions.getLocalExec');
- const mode = (res && res.ok && _LOCALEXEC_MODES.includes(res.mode)) ? res.mode : 'risk_prompt';
+ const mode = (res && res.ok && _LOCALEXEC_MODES.includes(res.mode)) ? res.mode : 'all_files_approval';
_settingsState.localExec = { mode };
}
function _settingsRenderLocalExec() {
const container = document.getElementById('settings-localexec-modes');
if (!container) return;
- const mode = (_settingsState.localExec && _settingsState.localExec.mode) || 'risk_prompt';
+ const mode = (_settingsState.localExec && _settingsState.localExec.mode) || 'all_files_approval';
const radios = container.querySelectorAll('input[name="localexec-mode"]');
radios.forEach((r) => { r.checked = (r.value === mode); });
if (!container.dataset.bound) {
@@ -179,7 +179,7 @@ function _settingsRenderLocalExec() {
radio.addEventListener('change', async () => {
if (!radio.checked) return;
const next = radio.value;
- const prev = (_settingsState.localExec && _settingsState.localExec.mode) || 'risk_prompt';
+ const prev = (_settingsState.localExec && _settingsState.localExec.mode) || 'all_files_approval';
try {
const res = await window.orkas.invoke('permissions.setLocalExecMode', { mode: next });
if (res && res.ok && res.mode) {
diff --git a/src/renderer/style.css b/src/renderer/style.css
index fba26324..910ecf33 100644
--- a/src/renderer/style.css
+++ b/src/renderer/style.css
@@ -9272,11 +9272,14 @@ body.model-not-configured .main-content { flex-direction: column; }
}
.agents-detail-label {
- font-size: 11px;
+ display: inline-flex;
+ align-items: center;
+ gap: 7px;
+ font-size: 12px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.6px;
- color: #9ca3af;
+ color: var(--primary-text);
}
/* Shared look-and-feel for the two editable text boxes. Only dimensions
@@ -9284,9 +9287,9 @@ body.model-not-configured .main-content { flex-direction: column; }
.agents-detail-desc,
.agents-detail-workflow {
width: 100%;
- font-size: 13px;
+ font-size: 14px;
line-height: 1.65;
- color: #374151;
+ color: var(--text);
padding: 10px 12px;
border-radius: 8px;
outline: none;
@@ -9315,10 +9318,904 @@ body.model-not-configured .main-content { flex-direction: column; }
min-height: 0;
}
-/* Edit-mode treatment (same for both fields). */
-.agents-detail-desc.is-editing,
-.agents-detail-workflow.is-editing {
+.agents-detail-profile {
+ display: flex;
+ flex-direction: column;
+ gap: 12px;
+}
+
+.agents-profile-block {
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+ padding: 12px;
+ border-radius: 8px;
+ background: rgba(15, 23, 42, 0.02);
+ border: 1px solid rgba(148, 163, 184, 0.18);
+}
+
+.agents-profile-block.is-memory {
+ background: rgba(244, 63, 94, 0.05);
+ border-color: rgba(244, 63, 94, 0.14);
+}
+
+.agents-profile-block.is-nested {
+ height: 100%;
+ background: #fff;
+}
+
+.agents-profile-block-head {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ font-size: 12px;
+ font-weight: 700;
+ color: #334155;
+}
+
+.agents-profile-block-count {
+ min-width: 22px;
+ padding: 1px 7px;
+ border-radius: 999px;
+ background: rgba(79, 70, 229, 0.10);
+ color: #4f46e5;
+ font-size: 11px;
+ text-align: center;
+}
+
+.agents-profile-two-col {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 12px;
+}
+
+.agents-profile-stack {
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
+}
+
+.agents-profile-entry-list {
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+}
+
+.agents-profile-entry-list.is-memory {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+}
+
+.agents-profile-entry {
+ min-width: 0;
+ padding: 9px 10px;
+ border-radius: 8px;
+ background: #fff;
+ border: 1px solid rgba(148, 163, 184, 0.16);
+}
+
+.agents-profile-entry-title {
+ font-size: 14px;
+ line-height: 1.65;
+ font-weight: 700;
+ color: var(--text);
+ word-break: break-word;
+}
+
+.agents-profile-entry-desc {
+ margin-top: 4px;
+ font-size: 14px;
+ line-height: 1.65;
+ color: var(--text);
+ word-break: break-word;
+}
+
+.agents-profile-entry-meta,
+.agents-profile-chip-row {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 6px;
+}
+
+.agents-profile-entry-meta { margin-top: 8px; }
+
+.agents-profile-chip {
+ display: inline-flex;
+ align-items: center;
+ max-width: 100%;
+ padding: 2px 9px;
+ border-radius: 999px;
+ background: #eef2f7;
+ color: #273449;
+ font-size: 12px;
+ line-height: 1.5;
+ font-weight: 600;
+ word-break: break-word;
+}
+
+.agents-profile-chip.is-muted {
+ background: #f3f5f8;
+ color: #475569;
+ font-weight: 500;
+}
+
+.agents-profile-stats {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
+ gap: 8px;
+}
+
+.agents-profile-stat {
+ min-width: 0;
+ padding: 9px 10px;
+ border-radius: 8px;
+ background: #fff;
+ border: 1px solid rgba(148, 163, 184, 0.16);
+}
+
+.agents-profile-stat b {
+ font-size: 18px;
+ color: #111827;
+}
+
+.agents-profile-stat span {
+ margin-left: 2px;
+ font-size: 11px;
+ color: #64748b;
+}
+
+.agents-profile-stat em {
+ display: block;
+ margin-top: 2px;
+ font-style: normal;
+ font-size: 11.5px;
+ color: #64748b;
+}
+
+.agents-profile-scope {
+ display: flex;
+ flex-direction: column;
+ gap: 6px;
+ font-size: 14px;
+ line-height: 1.65;
+ color: var(--text);
+}
+
+.agents-profile-scope b {
+ margin-right: 6px;
+ color: var(--text);
+}
+
+.agents-detail-content {
+ background: #fff;
+}
+
+.agents-detail-header {
+ padding: 14px 20px;
+ border-bottom: 1px solid var(--border);
background: #fff;
+ flex-shrink: 0;
+}
+
+.agents-detail-title-row {
+ align-items: center;
+ gap: 8px;
+}
+
+.agents-detail-name {
+ font-size: 16px;
+ line-height: 1.4;
+ font-weight: 600;
+ color: var(--text);
+ padding: 2px 4px;
+ margin-left: -4px;
+ min-height: 22px;
+}
+
+.agents-detail-name-input {
+ height: 32px;
+ min-width: 160px;
+ max-width: 460px;
+ font-size: 16px;
+ font-weight: 600;
+}
+
+.agents-detail-title-row > .detail-actions {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ flex-wrap: nowrap;
+ justify-content: flex-end;
+ flex-shrink: 0;
+ margin-left: auto;
+}
+
+.agents-detail-desc {
+ margin-top: 0;
+ padding: 0;
+ border: 0;
+ border-radius: 0;
+ background: transparent;
+ max-width: none;
+ font-size: 14px;
+ line-height: 1.65;
+ font-weight: 400;
+ color: var(--text);
+}
+
+.agents-detail-stats {
+ display: grid;
+ grid-template-columns: repeat(4, minmax(0, 1fr));
+ gap: 10px;
+ margin-top: 0;
+}
+
+.agents-detail-stat {
+ min-width: 0;
+ padding: 13px 15px;
+ border-radius: 8px;
+ border: 1px solid #e2e8f0;
+ background: transparent;
+}
+
+.agents-detail-stat.is-memory {
+ background: transparent;
+ border-color: #e2e8f0;
+}
+
+.agents-detail-stat-value {
+ font-size: 23px;
+ line-height: 1.1;
+ font-weight: 800;
+ color: #0f172a;
+}
+
+.agents-detail-stat.is-memory .agents-detail-stat-value {
+ color: #0f172a;
+}
+
+.agents-detail-stat-value small {
+ margin-left: 2px;
+ font-size: 12px;
+ font-weight: 650;
+ color: #64748b;
+}
+
+.agents-detail-stat-label {
+ margin-top: 5px;
+ font-size: 11.5px;
+ line-height: 1.4;
+ color: #64748b;
+}
+
+.agents-detail-section-desc {
+ max-width: 760px;
+ margin: 0;
+ color: #64748b;
+ font-size: 14px;
+ line-height: 1.75;
+}
+
+.agents-detail-list {
+ display: grid;
+ gap: 12px;
+ max-width: 860px;
+}
+
+.agents-detail-list-item {
+ display: grid;
+ grid-template-columns: 18px minmax(0, 1fr) auto;
+ gap: 12px;
+ align-items: start;
+ min-width: 0;
+}
+
+.agents-detail-list-icon {
+ width: 18px;
+ height: 18px;
+ margin-top: 4px;
+ color: var(--primary);
+}
+
+.agents-detail-list-icon svg {
+ width: 18px;
+ height: 18px;
+ display: block;
+}
+
+.agents-detail-list-text {
+ min-width: 0;
+ color: #243044;
+ font-size: 14px;
+ line-height: 1.8;
+ font-weight: 650;
+ word-break: break-word;
+}
+
+.agents-detail-list-text.is-action {
+ padding: 0;
+ border: 0;
+ background: transparent;
+ font: inherit;
+ color: #243044;
+ text-align: left;
+ cursor: pointer;
+}
+
+.agents-detail-list-text.is-action:hover {
+ color: var(--primary);
+}
+
+.agents-detail-io {
+ display: grid;
+ gap: 14px;
+ max-width: 860px;
+}
+
+.agents-detail-io-row {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ flex-wrap: wrap;
+}
+
+.agents-detail-io-label {
+ flex: 0 0 auto;
+ color: var(--text);
+ font-size: 13px;
+ line-height: 1.5;
+ font-weight: 700;
+}
+
+.agents-input-chip {
+ gap: 6px;
+}
+
+.agents-input-chip small {
+ color: #64748b;
+ font-size: 11px;
+ font-weight: 600;
+}
+
+.agents-detail-memory-detail {
+ grid-column: 1 / -1;
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+ min-width: 0;
+ margin-top: 2px;
+}
+
+.agents-detail-subsection {
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+ min-width: 0;
+ margin-top: 8px;
+}
+
+#agents-detail-output-format-control {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 12px;
+}
+
+#agents-detail-output-format-control .agents-detail-subtitle {
+ flex: 0 0 auto;
+}
+
+.agents-detail-subtitle,
+.agents-detail-memory-title {
+ display: inline-flex;
+ align-items: center;
+ gap: 8px;
+ font-size: 13px;
+ line-height: 1.5;
+ font-weight: 700;
+ color: var(--text);
+}
+
+.agents-detail-tag-row,
+.agents-detail-memory-tags {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 6px;
+ min-width: 0;
+}
+
+.agents-memory-add {
+ border: 1px solid var(--border, #e5e7eb);
+ background: #fff;
+ color: #475569;
+ border-radius: 999px;
+ padding: 1px 8px;
+ font-size: 12px;
+ line-height: 1.5;
+ cursor: pointer;
+ font-family: inherit;
+}
+.agents-memory-add:hover {
+ border-color: #cbd5e1;
+ background: #f8fafc;
+}
+.agents-memory-chip {
+ gap: 5px;
+}
+.agents-editable-chip {
+ gap: 5px;
+}
+.agents-chip-text-btn {
+ min-width: 0;
+ max-width: 100%;
+ padding: 0;
+ border: 0;
+ background: transparent;
+ color: inherit;
+ font: inherit;
+ font-weight: inherit;
+ line-height: inherit;
+ text-align: left;
+ cursor: pointer;
+ word-break: break-word;
+}
+.agents-chip-text-btn:hover {
+ color: var(--text);
+}
+.agents-memory-chip-remove {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ width: 15px;
+ height: 15px;
+ margin-right: -4px;
+ border: 0;
+ border-radius: 999px;
+ background: transparent;
+ color: #64748b;
+ cursor: pointer;
+ font: inherit;
+ line-height: 1;
+}
+.agents-memory-chip-remove:hover {
+ background: rgba(15, 23, 42, 0.08);
+ color: #0f172a;
+}
+
+.agents-detail-body {
+ align-items: center;
+ padding: 0 0 56px;
+ gap: 22px;
+ background: #fff;
+}
+
+.agents-detail-hero {
+ width: 100%;
+ padding: 28px 24px 16px;
+ background: #fff;
+ border-bottom: 0;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 18px;
+}
+
+.agents-detail-body > .agents-detail-section {
+ width: min(900px, calc(100% - 48px));
+ max-width: 900px;
+ margin: 0;
+}
+
+.agents-detail-hero > .agents-detail-section {
+ width: min(900px, 100%);
+ max-width: 900px;
+ margin: 0;
+}
+
+.agents-detail-body > .agents-detail-section + .agents-detail-section {
+ margin-top: 0;
+}
+
+.agents-detail-intro-section .agents-detail-label,
+.agents-detail-stats-section .agents-detail-label {
+ display: none;
+}
+
+.agents-detail-intro-section + .agents-detail-stats-section {
+ margin-top: 0;
+}
+
+.agents-detail-label {
+ gap: 8px;
+ color: var(--primary);
+ font-size: 15px;
+ line-height: 1.35;
+ font-weight: 800;
+ text-transform: none;
+ letter-spacing: 0;
+}
+
+.agents-detail-label::before {
+ width: 5px;
+ height: 5px;
+}
+
+.agents-detail-section-desc {
+ max-width: 860px;
+ margin: 6px 0 0;
+ color: #5f6b7d;
+ font-size: 14px;
+ line-height: 1.85;
+}
+
+.agents-detail-desc {
+ max-width: 900px;
+ margin: 0;
+ color: #111827;
+ font-size: 15px;
+ line-height: 1.8;
+ font-weight: 400;
+}
+
+.agents-detail-stats {
+ grid-template-columns: repeat(4, minmax(0, 1fr));
+ gap: 12px;
+ margin-top: 0;
+}
+
+.agents-detail-stat {
+ min-height: 78px;
+ padding: 14px 16px;
+ border-radius: 10px;
+ border-color: #d8e0ec;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+}
+
+.agents-detail-stat-value {
+ display: flex;
+ align-items: baseline;
+ gap: 3px;
+ font-size: 26px;
+ letter-spacing: 0;
+}
+
+.agents-detail-stat-label {
+ margin-top: 8px;
+ color: #5f6b7d;
+ font-size: 12px;
+}
+
+.agents-detail-list {
+ margin-top: 8px;
+ gap: 14px;
+ max-width: 860px;
+}
+
+.agents-detail-list-item {
+ grid-template-columns: 18px minmax(0, 1fr) auto;
+ gap: 12px;
+}
+
+.agents-detail-list-icon {
+ margin-top: 4px;
+ color: var(--primary);
+}
+
+.agents-detail-list-text {
+ color: #243044;
+ font-size: 14px;
+ line-height: 1.8;
+ font-weight: 700;
+}
+
+.agents-detail-io {
+ gap: 16px;
+ max-width: 860px;
+ margin-top: 20px;
+}
+
+.agents-detail-io-row {
+ gap: 12px;
+}
+
+.agents-detail-io-label {
+ color: #111827;
+ font-size: 13px;
+ font-weight: 800;
+}
+
+.agents-detail-tag-row {
+ gap: 8px;
+}
+
+.agents-detail-section > .agents-detail-tag-row {
+ margin-top: 16px;
+}
+
+.agents-profile-chip {
+ min-height: 26px;
+ padding: 4px 10px;
+ background: #edf1f6;
+ color: #334155;
+ font-weight: 650;
+}
+
+.agents-detail-section-workflow {
+ flex: 0 0 auto;
+ min-height: 0;
+}
+
+.agents-detail-workflow {
+ max-width: 860px;
+ margin-top: 20px;
+ padding: 0 0 0 20px;
+ border: 0;
+ border-left: 1px solid var(--primary);
+ border-radius: 0;
+ background: transparent;
+ overflow: visible;
+}
+
+.agents-detail-workflow.markdown-body > :first-child {
+ margin-top: 0;
+}
+
+.agents-detail-workflow.markdown-body h1,
+.agents-detail-workflow.markdown-body h2,
+.agents-detail-workflow.markdown-body h3,
+.agents-detail-workflow.markdown-body h4 {
+ margin: 0 0 4px;
+ color: #111827;
+ font-size: 14px;
+ line-height: 1.6;
+ font-weight: 400;
+}
+.agents-detail-workflow.markdown-body h1:not(:first-child),
+.agents-detail-workflow.markdown-body h2:not(:first-child),
+.agents-detail-workflow.markdown-body h3:not(:first-child),
+.agents-detail-workflow.markdown-body h4:not(:first-child) {
+ margin-top: 16px;
+}
+
+.agents-detail-workflow.markdown-body p {
+ margin: 0 0 10px;
+ color: #1f2937;
+ line-height: 1.85;
+}
+
+.agents-detail-workflow.markdown-body ul,
+.agents-detail-workflow.markdown-body ol {
+ margin: 0 0 18px;
+ padding-left: 20px;
+ color: #1f2937;
+ line-height: 1.85;
+}
+
+.agents-detail-workflow.markdown-body li + li {
+ margin-top: 4px;
+}
+
+.agents-detail-workflow.is-editing {
+ min-height: 220px;
+ padding: 12px;
+ border-radius: 8px;
+ background: #fff;
+ border: 1px solid var(--border-strong);
+ overflow-y: auto;
+}
+
+.agents-detail-profile {
+ display: flex;
+ flex-direction: column;
+ gap: 24px;
+}
+
+.agents-profile-label {
+ display: inline-flex;
+ align-items: center;
+ gap: 7px;
+ margin-bottom: 8px;
+ font-size: 12px;
+ font-weight: 700;
+ letter-spacing: 0.6px;
+ line-height: 1.4;
+ text-transform: uppercase;
+ color: var(--primary-text);
+}
+
+.agents-memory-panel {
+ min-width: 0;
+}
+
+.agents-memory-panel h3,
+.agents-profile-narr h3 {
+ margin: 0;
+ color: var(--text);
+ font-size: 16px;
+ line-height: 1.4;
+ font-weight: 600;
+}
+
+.agents-memory-panel h3 span {
+ color: var(--text);
+ font-size: 14px;
+}
+
+.agents-profile-lead {
+ max-width: 680px;
+ margin: 9px 0 20px;
+ font-size: 14px;
+ line-height: 1.65;
+ color: var(--text);
+}
+
+.agents-memory-grid {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 12px;
+}
+
+.agents-memory-card {
+ min-width: 0;
+ padding: 13px 15px;
+ border-radius: 8px;
+ border: 1px solid rgba(244, 63, 94, 0.16);
+ background: #fff;
+}
+
+.agents-memory-card-head {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ margin-bottom: 7px;
+}
+
+.agents-memory-dot {
+ width: 7px;
+ height: 7px;
+ border-radius: 999px;
+ background: #e11d48;
+ flex: 0 0 auto;
+}
+
+.agents-memory-title {
+ min-width: 0;
+ font-size: 14px;
+ font-weight: 700;
+ color: var(--text);
+}
+
+.agents-memory-card p {
+ margin: 0 0 10px 15px;
+ color: var(--text);
+ font-size: 14px;
+ line-height: 1.65;
+}
+
+.agents-memory-meta {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 6px;
+ margin-left: 15px;
+}
+
+.agents-memory-footer {
+ display: grid;
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ gap: 18px;
+ margin-top: 20px;
+ padding-top: 18px;
+ border-top: 1px solid rgba(244, 63, 94, 0.16);
+}
+
+.agents-profile-mini-title {
+ display: inline-flex;
+ align-items: center;
+ gap: 7px;
+ margin-bottom: 8px;
+ color: var(--primary-text);
+ font-size: 12px;
+ font-weight: 700;
+ letter-spacing: 0.6px;
+ text-transform: uppercase;
+}
+
+.agents-profile-narr {
+ min-width: 0;
+}
+
+.agents-profile-kv-list {
+ display: flex;
+ flex-direction: column;
+ gap: 11px;
+ margin-top: 16px;
+}
+
+.agents-profile-kv {
+ display: grid;
+ grid-template-columns: 128px minmax(0, 1fr);
+ gap: 14px;
+ align-items: start;
+}
+
+.agents-profile-kv b {
+ font-size: 14px;
+ line-height: 1.65;
+ color: var(--text);
+}
+
+.agents-profile-kv span {
+ font-size: 14px;
+ line-height: 1.65;
+ color: var(--text);
+}
+
+.agents-profile-two-col {
+ gap: 30px;
+}
+
+.agents-profile-stack {
+ gap: 24px;
+}
+
+.agents-profile-narr .agents-profile-entry-list,
+.agents-profile-narr .agents-profile-scope {
+ margin-top: 14px;
+}
+
+.agents-profile-narr .agents-profile-chip-row {
+ margin-top: 3px;
+}
+
+.agents-profile-narr .agents-profile-entry {
+ border-radius: 8px;
+ background: #f8fafc;
+}
+
+.agents-profile-chip {
+ background: #eef2f7;
+ color: #273449;
+}
+
+@media (max-width: 820px) {
+ .agents-detail-header,
+ .agents-detail-body {
+ padding-left: 20px;
+ padding-right: 20px;
+ }
+
+ .agents-detail-stats,
+ .agents-memory-grid,
+ .agents-memory-footer {
+ grid-template-columns: 1fr;
+ }
+
+ .agents-profile-kv {
+ grid-template-columns: 1fr;
+ gap: 4px;
+ }
+
+ .agents-profile-two-col,
+ .agents-profile-entry-list.is-memory {
+ grid-template-columns: 1fr;
+ }
+
+ .agents-detail-io-row {
+ align-items: flex-start;
+ flex-direction: column;
+ gap: 8px;
+ }
+}
+
+/* Edit-mode treatment (same for both fields). */
+.agents-detail-desc.is-editing,
+.agents-detail-workflow.is-editing {
+ padding: 12px;
+ border-radius: 8px;
+ background: #fff;
+ border: 1px solid var(--border-strong);
border-color: var(--border-strong);
}
.agents-detail-desc.is-editing:focus,
diff --git a/test/renderer/synced-surface-regression.test.ts b/test/renderer/synced-surface-regression.test.ts
index 5e206e73..099bbba8 100644
--- a/test/renderer/synced-surface-regression.test.ts
+++ b/test/renderer/synced-surface-regression.test.ts
@@ -8,6 +8,10 @@ function read(rel: string) {
return fs.readFileSync(path.join(root, rel), 'utf8');
}
+function readJson(rel: string) {
+ return JSON.parse(read(rel));
+}
+
function cssBlock(css: string, selector: RegExp) {
return css.match(selector)?.[1] || '';
}
@@ -80,6 +84,7 @@ describe('synced PC surface regressions', () => {
it('exposes the local Commander profile to the renderer', () => {
const ipc = read('src/main/ipc/index.ts');
const profile = read('src/main/data/commander.json');
+ const parsed = JSON.parse(profile);
const fromToken = ['fr', 'om'].join('');
const commanderProfileImport = ['im', 'port * as commanderProfile ', fromToken, " '", '..', "/features/commander_profile'"].join('');
@@ -87,6 +92,47 @@ describe('synced PC surface regressions', () => {
expect(ipc).toContain("'commander.getProfile'");
expect(ipc).toContain("'commander.runtimeStats.get'");
expect(profile).toContain('Orkas 的总调度者');
+ expect(parsed.knowhow.zh.length).toBeGreaterThan(0);
+ expect(parsed.standards.zh.length).toBeGreaterThan(0);
+ expect(parsed.workflow.zh.length).toBeGreaterThan(0);
+ });
+
+ it('keeps the synced Agent detail shell that can render the Commander profile', () => {
+ const html = read('src/renderer/index.html');
+ const css = read('src/renderer/style.css');
+
+ for (const marker of [
+ 'agents-grid-header-titles',
+ 'agents-grid-subtitle',
+ 'agents-detail-hero',
+ 'agents-detail-stats-section',
+ 'agents-detail-memory-section',
+ 'agents-detail-knowhow-section',
+ 'agents-detail-output-standards-section',
+ 'agents-detail-input-output-section',
+ 'agents-detail-output-format-control',
+ ]) {
+ expect(html).toContain(marker);
+ }
+
+ for (const staleMarker of [
+ 'agents-detail-category-section',
+ 'agents-detail-output-format-section',
+ ]) {
+ expect(html).not.toContain(staleMarker);
+ }
+
+ for (const selector of [
+ '.agents-detail-hero',
+ '.agents-detail-stats',
+ '.agents-detail-list',
+ '.agents-detail-io',
+ '.agents-profile-chip',
+ '.agents-memory-grid',
+ '.agents-detail-label::before',
+ ]) {
+ expect(css).toContain(selector);
+ }
});
it('restores user-owned speech key configuration without exposing managed Orkas voice', () => {
@@ -119,4 +165,50 @@ describe('synced PC surface regressions', () => {
expect(ttsAuth).not.toContain('ORKAS_VOICE');
expect(ttsAuth).not.toContain('Orkas · Voice');
});
+
+ it('keeps Settings local execution modes and Open commander avatar copy usable', () => {
+ const html = read('src/renderer/index.html');
+ const settings = read('src/renderer/modules/settings.js');
+ const locales = ['en', 'zh', 'ja', 'pt'].map((lang) => readJson(`src/renderer/locales/${lang}.json`));
+
+ for (const marker of [
+ 'value="workspace_approval"',
+ 'value="all_files_approval"',
+ 'value="all_files_auto"',
+ 'settings.localexec.mode.workspace_approval',
+ 'settings.localexec.mode.all_files_approval',
+ 'settings.localexec.mode.all_files_auto',
+ ]) {
+ expect(html).toContain(marker);
+ }
+
+ for (const marker of [
+ 'value="off"',
+ 'value="risk_prompt"',
+ 'value="allow_all"',
+ 'settings.localexec.mode.off',
+ 'settings.localexec.mode.risk_prompt',
+ 'settings.localexec.mode.allow_all',
+ ]) {
+ expect(html).not.toContain(marker);
+ }
+
+ expect(settings).toContain("const _LOCALEXEC_MODES = ['workspace_approval', 'all_files_approval', 'all_files_auto'];");
+ expect(settings).toContain("'all_files_approval'");
+ expect(settings).not.toContain("const _LOCALEXEC_MODES = ['off', 'risk_prompt', 'allow_all'];");
+
+ for (const locale of locales) {
+ for (const key of [
+ 'settings.commander_avatar.title',
+ 'settings.commander_avatar.sub',
+ 'settings.commander_avatar.hint',
+ 'settings.localexec.mode.workspace_approval',
+ 'settings.localexec.mode.all_files_approval',
+ 'settings.localexec.mode.all_files_auto',
+ ]) {
+ expect(locale[key]).toEqual(expect.any(String));
+ expect(locale[key].length).toBeGreaterThan(0);
+ }
+ }
+ });
});