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.

fix(voice): remove recurring recording introduction dialog

BlueSkyID666a04fcb6823f6
diff --git a/src/renderer/modules/voice-input.js b/src/renderer/modules/voice-input.js
index 947c4743..e6c2ef8a 100644
--- a/src/renderer/modules/voice-input.js
+++ b/src/renderer/modules/voice-input.js
@@ -362,7 +362,6 @@
let active = null;
- let introShown = false;
const tr = (key) => t('chat.mic_' + key);
const invoke = (name) => window.orkas.invoke('voice.' + name);
@@ -459,12 +458,6 @@
if (attempt !== current) return;
if (!status?.ok) { reset(current); await guidance('unavailable'); return; }
if (!status.configured) { reset(current); await guidance('api_key_required'); return; }
- if (!introShown) {
- const agreed = await uiConfirm({ message: tr('intro'), okLabel: tr('start') });
- if (attempt !== current) return;
- if (!agreed) { cancel(); return; }
- introShown = true;
- }
const permission = await invoke('ensureMicrophoneAccess');
if (attempt !== current) return;
if (!permission?.ok || !permission.granted) {
diff --git a/test/e2e/voice_input_e2e_lifecycle.spec.ts b/test/e2e/voice_input_e2e_lifecycle.spec.ts
index 06a13491..2948af8b 100644
--- a/test/e2e/voice_input_e2e_lifecycle.spec.ts
+++ b/test/e2e/voice_input_e2e_lifecycle.spec.ts
@@ -105,7 +105,6 @@ test.describe('API-key voice input', () => {
const w = window as any; w.composerSetSelection(element, w.composerText(element).length);
});
await page.locator('#new-chat-mic-btn').click();
- await page.locator('.ui-dialog-overlay.open [data-act="ok"]').click();
const mic = page.locator('#new-chat-mic-btn');
const expectActiveIcon = async () => {
await expect(mic).toHaveCSS('color', 'rgb(220, 38, 38)');
@@ -116,6 +115,7 @@ test.describe('API-key voice input', () => {
await expectActiveIcon();
await page.screenshot({ path: testInfo.outputPath('voice-connecting-en.png') });
await expect.poll(() => !!sendReady).toBe(true);
+ await expect(page.locator('.ui-dialog-overlay.open')).toHaveCount(0);
sendReady!();
await expect(mic).toHaveAttribute('data-voice-phase', 'recording');
await expectActiveIcon();
diff --git a/test/renderer/voice-input.test.ts b/test/renderer/voice-input.test.ts
index d6281465..029c57a4 100644
--- a/test/renderer/voice-input.test.ts
+++ b/test/renderer/voice-input.test.ts
@@ -72,6 +72,8 @@ describe('voice input user journey', () => {
};
expectState('idle', false, false);
await h.button.dispatch('click'); await flush();
+ expect(h.context.uiConfirm).not.toHaveBeenCalled();
+ expect(h.invoke).toHaveBeenCalledWith('voice.ensureMicrophoneAccess');
expectState('connecting', true, false);
expect(h.button.title).toBe('chat.mic_stop_title');
h.socket().open(); await flush();