= {
Card: 'card',
Toggle: 'toggle',
getCloudSyncPreviewScenario: () => undefined,
- isTauriHost: () => true,
+ isNativeDesktopHost: () => true,
listenEncryptedSyncStateChanges: (callback) => listen('cloud-sync-e2ee:state', callback),
listenEncryptedSyncConflicts: (callback) => listen('cloud-sync-e2ee:conflict', callback),
listenEncryptedSyncRestores: (callback) => listen('cloud-sync-e2ee:restored', callback),
diff --git a/openless-all/app/src/features/cloud-sync/CloudSyncSection.tsx b/openless-all/app/src/features/cloud-sync/CloudSyncSection.tsx
index bb217ba9c..842e3118f 100644
--- a/openless-all/app/src/features/cloud-sync/CloudSyncSection.tsx
+++ b/openless-all/app/src/features/cloud-sync/CloudSyncSection.tsx
@@ -28,7 +28,7 @@ import { Toggle } from '../../ui/controls/SettingRow';
import { useHotkeySettings } from '../../data/preferences';
import { marketplaceAuthStatus } from '../../api/marketplace';
import { readCredential } from '../../api/providers';
-import { isTauriHost } from '../../runtime/environment';
+import { isNativeDesktopHost } from '../../runtime/environment';
import { getCloudSyncPreviewScenario } from '../../preview/cloud-sync';
import {
CLOUD_SYNC_E2EE_CONSENT_VERSION as CONSENT_VERSION,
@@ -555,7 +555,7 @@ export function CloudSyncSection() {
window.addEventListener('openless:sync-ui-persistence-failed', uiPersistenceFailed);
void (async () => {
try {
- if (isTauriHost()) {
+ if (isNativeDesktopHost()) {
const subscriptions = [
() =>
listenEncryptedSyncStateChanges((event) => {
@@ -997,7 +997,7 @@ export function CloudSyncSection() {
title={t('emptyStates.noAccess.cloudSyncSignedOutTitle')}
primaryAction={{
label: t('emptyStates.noAccess.cloudSyncSignIn'),
- disabled: !isTauriHost() || !available || working,
+ disabled: !isNativeDesktopHost() || !available || working,
onClick: () => setShowLogin(true),
}}
/>
diff --git a/openless-all/app/src/features/cloud-sync/RestoreReview.tsx b/openless-all/app/src/features/cloud-sync/RestoreReview.tsx
index 368876904..2b3af7551 100644
--- a/openless-all/app/src/features/cloud-sync/RestoreReview.tsx
+++ b/openless-all/app/src/features/cloud-sync/RestoreReview.tsx
@@ -168,6 +168,11 @@ export function RestoreReview({
category: t(`cloudSyncE2ee.categories.${categoryKey(conflict.kind)}`),
})}
+ {(conflict.localLabel || conflict.cloudLabel) && (
+
+ {conflict.localLabel || conflict.cloudLabel}
+
+ )}
{t(
`cloudSyncE2ee.conflictReasons.${['both_modified', 'delete_modify', 'no_common_baseline'].includes(conflict.reason) ? conflict.reason : 'other'}`,
@@ -186,6 +191,11 @@ export function RestoreReview({
}}
/>{' '}
{t(`cloudSyncE2ee.conflict${side === 'local' ? 'Local' : 'Cloud'}`)}
+ {(side === 'local' ? conflict.localLabel : conflict.cloudLabel) && (
+
+ · {side === 'local' ? conflict.localLabel : conflict.cloudLabel}
+
+ )}
))}
diff --git a/openless-all/app/src/features/corrections/Corrections.tsx b/openless-all/app/src/features/corrections/Corrections.tsx
index ed09b66c8..7abff2ac8 100644
--- a/openless-all/app/src/features/corrections/Corrections.tsx
+++ b/openless-all/app/src/features/corrections/Corrections.tsx
@@ -73,7 +73,7 @@ export function Corrections() {
className="ol-correction-add ol-col-2"
onClick={() => void onAddCorrectionRule()}
disabled={busy}
- style={mobile ? { justifySelf: 'start' } : undefined}
+ style={{ justifySelf: mobile ? 'start' : 'end', width: 'max-content', maxWidth: '100%', justifyContent: 'center' }}
>
{t('common.add')}
diff --git a/openless-all/app/src/features/input/LinuxGlobalShortcutsSection.tsx b/openless-all/app/src/features/input/LinuxGlobalShortcutsSection.tsx
new file mode 100644
index 000000000..9fd3c5258
--- /dev/null
+++ b/openless-all/app/src/features/input/LinuxGlobalShortcutsSection.tsx
@@ -0,0 +1,88 @@
+import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import {
+ getLinuxGlobalShortcutsStatus,
+ enableLinuxGlobalShortcuts,
+ disableLinuxGlobalShortcuts,
+ type LinuxGlobalShortcutsStatus,
+} from '../../api/permissions';
+import { Icon } from '../../components/Icon';
+import { Button } from '../../ui/controls/Button';
+import { Pill } from '../../ui/controls/Pill';
+import { SettingRow } from '../../ui/controls/SettingRow';
+import { useInteraction } from '../../ui/overlays/InteractionProvider';
+
+export function LinuxGlobalShortcutsSection() {
+ const { i18n } = useTranslation();
+ const zh = i18n.language.startsWith('zh');
+ const { notify } = useInteraction('linux-global-shortcuts');
+ const [status, setStatus] = useState(null);
+ const [busy, setBusy] = useState(false);
+
+ useEffect(() => {
+ let active = true;
+ void getLinuxGlobalShortcutsStatus()
+ .then((value) => {
+ if (active) setStatus(value);
+ })
+ .catch(() => {});
+ return () => {
+ active = false;
+ };
+ }, []);
+
+ const enabled = Boolean(status?.enabled);
+ const desc = status?.error
+ ? status.error
+ : zh
+ ? 'Wayland 桌面全局快捷键授权;已授权动作自动接管,不会与 Fcitx5 重复触发'
+ : 'Wayland desktop global shortcut authorization; replaces Fcitx5 for authorized actions without double-triggering';
+
+ return (
+
+
+
+ {enabled && }
+ {enabled
+ ? zh
+ ? `已授权 (${status?.shortcuts.length ?? 0})`
+ : `Authorized (${status?.shortcuts.length ?? 0})`
+ : zh
+ ? '未启用'
+ : 'Not enabled'}
+
+ {enabled ? (
+
+ ) : (
+
+ )}
+
+
+ );
+}
diff --git a/openless-all/app/src/features/input/LinuxTextAccessSection.tsx b/openless-all/app/src/features/input/LinuxTextAccessSection.tsx
new file mode 100644
index 000000000..3e44a3cba
--- /dev/null
+++ b/openless-all/app/src/features/input/LinuxTextAccessSection.tsx
@@ -0,0 +1,67 @@
+import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import {
+ getLinuxTextAccessStatus,
+ enableLinuxTextAccess,
+ disableLinuxTextAccess,
+ type LinuxTextAccessStatus,
+} from '../../api/permissions';
+import { Icon } from '../../components/Icon';
+import { Button } from '../../ui/controls/Button';
+import { Pill } from '../../ui/controls/Pill';
+import { SettingRow } from '../../ui/controls/SettingRow';
+import { useInteraction } from '../../ui/overlays/InteractionProvider';
+
+export function LinuxTextAccessSection() {
+ const { i18n } = useTranslation();
+ const zh = i18n.language.startsWith('zh');
+ const { notify } = useInteraction('linux-text-access');
+ const [status, setStatus] = useState(null);
+ const [busy, setBusy] = useState(false);
+
+ useEffect(() => {
+ let active = true;
+ void getLinuxTextAccessStatus()
+ .then((value) => {
+ if (active) setStatus(value);
+ })
+ .catch(() => {});
+ return () => {
+ active = false;
+ };
+ }, []);
+
+ const enabled = Boolean(status?.enabled);
+
+ return (
+
+
+
+ {enabled && }
+ {enabled ? (zh ? '已启用' : 'Enabled') : zh ? '未启用' : 'Not enabled'}
+
+
+
+
+ );
+}
diff --git a/openless-all/app/src/features/input/PermissionsSection.tsx b/openless-all/app/src/features/input/PermissionsSection.tsx
index 2050fb9d6..2cc299408 100644
--- a/openless-all/app/src/features/input/PermissionsSection.tsx
+++ b/openless-all/app/src/features/input/PermissionsSection.tsx
@@ -6,6 +6,8 @@ import { useTranslation } from 'react-i18next';
import { AndroidPermissionsPanel } from '@android/components/AndroidPermissionsPanel';
import { Icon } from '../../components/Icon';
import {
+ getLinuxInputPluginStatus,
+ type LinuxInputPluginStatus,
checkAccessibilityPermission,
checkMicrophonePermission,
openSystemSettings,
@@ -18,6 +20,9 @@ import { getHotkeyStatus, getWindowsImeStatus } from '../../api/hotkeys';
import type { NetworkCheckResult } from '../../api/input';
import { emitSaved } from '../../lib/savedEvent';
import { getPlatformCapabilities } from '../../runtime/platform';
+import { isLinuxHost } from '../../runtime/environment';
+import { LinuxTextAccessSection } from './LinuxTextAccessSection';
+import { LinuxGlobalShortcutsSection } from './LinuxGlobalShortcutsSection';
import { useLayoutStack, useConservativeLayout } from '../../lib/useMobileLayout';
import {
checkAndroidMicrophoneAccess,
@@ -39,7 +44,20 @@ import { SettingRow } from '../../ui/controls/SettingRow';
const ANDROID_SETUP_WIZARD_COMPLETE_KEY = 'openless.androidSetupWizardComplete';
export function PermissionsSection() {
- const { t } = useTranslation();
+ const { t, i18n } = useTranslation();
+ const linux = isLinuxHost();
+ const zh = i18n.language.startsWith('zh');
+ const [plugin, setPlugin] = useState(null);
+ const [pluginBusy, setPluginBusy] = useState(false);
+ const [pluginError, setPluginError] = useState(false);
+ const refreshPlugin = async () => {
+ setPluginBusy(true);
+ setPluginError(false);
+ try { setPlugin(await getLinuxInputPluginStatus()); }
+ catch { setPluginError(true); }
+ finally { setPluginBusy(false); }
+ };
+ useEffect(() => { if (linux) void refreshPlugin(); }, [linux]);
const active = useRef(false);
const pendingPermissions = useRef | null>(null);
const recheckOnReturn = useRef(false);
@@ -105,7 +123,7 @@ export function PermissionsSection() {
if (!platformCaps) return;
active.current = true;
void refreshPermissions();
- if (platformCaps?.supportsDesktopHotkey === true) {
+ if (!linux && platformCaps?.supportsDesktopHotkey === true) {
refreshHotkey();
}
if (platformCaps?.platform !== 'android') {
@@ -260,7 +278,53 @@ export function PermissionsSection() {
)}
- {platformCaps?.supportsDesktopHotkey === true && (
+ {linux && (
+
+
+
+ {plugin?.insertionReady && plugin?.hotkeysReady && }
+ {pluginBusy
+ ? t('settings.permissions.checking')
+ : pluginError
+ ? zh
+ ? '检查失败'
+ : 'Check failed'
+ : plugin?.insertionReady && plugin?.hotkeysReady
+ ? zh
+ ? '已就绪'
+ : 'Ready'
+ : !plugin?.installed
+ ? zh
+ ? '未安装'
+ : 'Not installed'
+ : !plugin?.daemonRunning
+ ? zh
+ ? '未运行'
+ : 'Not running'
+ : !plugin?.loaded
+ ? zh
+ ? '未加载'
+ : 'Not loaded'
+ : zh
+ ? '需重载插件'
+ : 'Reload required'}
+
+
void refreshPlugin()}>
+ {zh ? '重新检测' : 'Check again'}
+
+
+
+ )}
+ {linux && }
+ {linux && }
+ {!linux && platformCaps?.supportsDesktopHotkey === true && (
{hotkey?.state === 'failed' && hotkey.message && (
diff --git a/openless-all/app/src/features/input/RecordingInputSection.tsx b/openless-all/app/src/features/input/RecordingInputSection.tsx
index d8dd5dd78..1132c9bd7 100644
--- a/openless-all/app/src/features/input/RecordingInputSection.tsx
+++ b/openless-all/app/src/features/input/RecordingInputSection.tsx
@@ -18,7 +18,7 @@ import {
isPlainTextInsertionActive,
pasteShortcutForPlainTextToggle,
} from '../../lib/plainTextInsertion';
-import { isTauriHost } from '../../runtime/environment';
+import { isNativeDesktopHost, isTauriHost } from '../../runtime/environment';
import {
getAutostartEnabled,
getMacosMicrophoneMode,
@@ -287,6 +287,10 @@ export function RecordingInputSection({
}
const isAndroid = platformCaps?.platform === 'android';
+ // 「插入与剪贴板」整组在 Linux 上还没实现(要补「写剪贴板 → 模拟粘贴」通道),
+ // 按约定先显示、整块置灰并标注「即将支持」,而不是直接藏掉。
+ const clipboardInsertComingSoon =
+ platformCaps?.supportsClipboardPasteInsertion === false;
const showDesktopInsert = showDesktopHotkey;
const showDesktopStartup = showDesktopHotkey;
const plainTextInsertionOn = isPlainTextInsertionActive(os === 'win', prefs.pasteShortcut);
@@ -694,11 +698,12 @@ export function RecordingInputSection({
onToggle={(next) => savePrefs({ ...prefs, stableTranscriptionEnabled: next })}
/>
- {showDesktopHotkey && os === 'win' && (
+ {/* 低延迟听写由 Windows 和 Linux 宿主实现;语音唤醒仍只在 Windows 可用。 */}
+ {showDesktopHotkey && (os === 'win' || os === 'linux') && (
<>
@@ -714,7 +720,7 @@ export function RecordingInputSection({
onToggle={(next) => savePrefs({ ...prefs, voiceActivationEnabled: next })}
/>
- {prefs.voiceActivationEnabled && (
+ {os === 'win' && prefs.voiceActivationEnabled && (
@@ -883,6 +890,7 @@ export function RecordingInputSection({
{t('settings.recording.startupGroupTitle')}
-
+
@@ -1053,7 +1065,7 @@ function AutostartRow() {
const [error, setError] = useState(null);
useEffect(() => {
- if (!isTauriHost()) {
+ if (!isNativeDesktopHost()) {
setLoaded(true);
return;
}
@@ -1067,7 +1079,7 @@ function AutostartRow() {
})
.catch((err: unknown) => {
console.error('[autostart] isEnabled failed', err);
- if (!cancelled) setLoaded(true);
+ if (!cancelled) setError(err instanceof Error ? err.message : String(err));
});
return () => {
cancelled = true;
diff --git a/openless-all/app/src/features/input/SelectionWorkspaceSection.tsx b/openless-all/app/src/features/input/SelectionWorkspaceSection.tsx
index f49f26108..391fbc311 100644
--- a/openless-all/app/src/features/input/SelectionWorkspaceSection.tsx
+++ b/openless-all/app/src/features/input/SelectionWorkspaceSection.tsx
@@ -7,7 +7,9 @@ import { ShortcutRecorder } from '../../components/ShortcutRecorder';
import { defaultSelectionPolishShortcut, getHotkeyStartStopLabel } from '../../lib/hotkey';
import { ASK_ANYTHING_AVAILABLE } from '../../lib/appVersion';
import { openVoiceEditWindow } from '../../api/voice-edit';
+import { getLinuxTextAccessStatus } from '../../api/permissions';
import { setSelectionPolishHotkey } from '../../api/hotkeys';
+import { listenHostEvent } from '../../lib/hostEventBus';
import { getPlatformCapabilities } from '../../runtime/platform';
import { useHotkeySettings } from '../../data/preferences';
import { Card } from '../../ui/layout/Card';
@@ -21,6 +23,8 @@ export function SelectionWorkspaceSection({ showShortcut = true }: { showShortcu
const { prefs, capability, refresh, updatePrefs } = useHotkeySettings();
const [platformCaps, setPlatformCaps] = useState(null);
const [extraControlsOpen, setExtraControlsOpen] = useState(false);
+ const [voiceEditNotice, setVoiceEditNotice] = useState('');
+ const [fullField, setFullField] = useState(false);
const [openPanelBusy, setOpenPanelBusy] = useState(false);
const [openPanelError, setOpenPanelError] = useState('');
@@ -29,7 +33,10 @@ export function SelectionWorkspaceSection({ showShortcut = true }: { showShortcu
setOpenPanelBusy(true);
setOpenPanelError('');
try {
+ const access = platformCaps?.linuxHost ? await getLinuxTextAccessStatus() : null;
+ if (access) setFullField(access.enabled);
await openVoiceEditWindow();
+ setVoiceEditNotice(platformCaps?.linuxHost && !access?.enabled ? t('voiceEditLinuxHint') : '');
} catch (error) {
setOpenPanelError(error instanceof Error ? error.message : String(error));
} finally {
@@ -38,9 +45,19 @@ export function SelectionWorkspaceSection({ showShortcut = true }: { showShortcu
};
useEffect(() => {
- void getPlatformCapabilities().then(setPlatformCaps);
+ void getPlatformCapabilities().then((caps) => {
+ setPlatformCaps(caps);
+ if (caps.linuxHost) void getLinuxTextAccessStatus().then((status) => setFullField(status.enabled)).catch(() => {});
+ });
}, []);
+ useEffect(() => {
+ if (!platformCaps?.linuxHost) return;
+ const show = listenHostEvent('voice-edit:show', () => setVoiceEditNotice(''));
+ const error = listenHostEvent('voice-edit:error', (message) => setOpenPanelError(String(message)));
+ return () => { show(); error(); };
+ }, [platformCaps?.linuxHost]);
+
if (
!prefs ||
!capability ||
@@ -84,12 +101,13 @@ export function SelectionWorkspaceSection({ showShortcut = true }: { showShortcu
+ {voiceEditNotice && {voiceEditNotice}}
{openPanelError ? (
{t('common.operationFailed')}: {openPanelError}
diff --git a/openless-all/app/src/features/local-asr/index.tsx b/openless-all/app/src/features/local-asr/index.tsx
index 54ba9f4f9..ff174be1f 100644
--- a/openless-all/app/src/features/local-asr/index.tsx
+++ b/openless-all/app/src/features/local-asr/index.tsx
@@ -86,7 +86,7 @@ import { Card } from '../../ui/layout/Card';
import { Collapsible } from '../../ui/controls/Collapsible';
import { PageHeader } from '../../ui/layout/PageHeader';
import { Pill } from '../../ui/controls/Pill';
-import { getRuntimeOS, isTauriHost } from '../../runtime/environment';
+import { getRuntimeOS, isLinuxHost, isTauriHost } from '../../runtime/environment';
import { getPlatformCapabilities } from '../../runtime/platform';
import {
DownloadDialog,
@@ -121,7 +121,7 @@ const IS_WINDOWS = OS === 'win';
const IS_QWEN_PLATFORM = OS === 'mac';
// sherpa-onnx models: Windows and arm64 Android (this page only shows where
// the backend reports local ASR support). Foundry stays Windows-only.
-const IS_SHERPA_PLATFORM = IS_WINDOWS || OS === 'android';
+const IS_SHERPA_PLATFORM = IS_WINDOWS || OS === 'android' || isLinuxHost();
function effectiveModelMirror(modelId: string, mirror: string): LocalAsrMirror {
if (mirror === 'modelscope' && !modelId.startsWith('qwen3-asr-')) return 'huggingface';
@@ -713,7 +713,7 @@ export function LocalAsr({ embedded = false }: LocalAsrProps = {}) {
}, []);
useEffect(() => {
- if (!isTauriHost() || !IS_SHERPA_PLATFORM) return;
+ if (!(isTauriHost() || isLinuxHost()) || !IS_SHERPA_PLATFORM) return;
let unlisten: undefined | (() => void);
let cancelled = false;
(async () => {
@@ -743,7 +743,7 @@ export function LocalAsr({ embedded = false }: LocalAsrProps = {}) {
}, []);
useEffect(() => {
- if (!isTauriHost() || !IS_SHERPA_PLATFORM) return;
+ if (!(isTauriHost() || isLinuxHost()) || !IS_SHERPA_PLATFORM) return;
let unlisten: undefined | (() => void);
let cancelled = false;
(async () => {
@@ -1623,7 +1623,7 @@ export function LocalAsr({ embedded = false }: LocalAsrProps = {}) {
isActive:
sherpaStatus?.activeModel === c.alias && activeAsrProvider === 'sherpa-onnx-local',
engine: 'sherpa',
- runtimeLabel: OS === 'android' ? 'Android · sherpa-onnx' : 'Windows · sherpa-onnx',
+ runtimeLabel: `${OS === 'android' ? 'Android' : isLinuxHost() ? 'Linux' : 'Windows'} · sherpa-onnx`,
downloadError:
sherpaDownloadProgress[c.alias]?.phase === 'failed'
? sherpaDownloadProgress[c.alias]?.error || t('localAsr.failed')
diff --git a/openless-all/app/src/features/providers/ChannelList.test.ts b/openless-all/app/src/features/providers/ChannelList.test.ts
index fb14001bd..7dbb5e7a2 100644
--- a/openless-all/app/src/features/providers/ChannelList.test.ts
+++ b/openless-all/app/src/features/providers/ChannelList.test.ts
@@ -41,6 +41,7 @@ const expectedByPlatform: Record
= {
// arm64 Android links sherpa-onnx; Foundry stays Windows-only.
android: ['sherpa-onnx-local'],
harmony: [],
+ linux: ['sherpa-onnx-local'],
};
// Production receives this catalog from Core. The test supplies only the
@@ -99,11 +100,10 @@ if (intelMacIds.has('local-qwen3-mlx') || intelMacIds.has('local-qwen3-c')) {
throw new Error('legacy models must not be offered on either Intel or Apple Silicon macOS');
}
-const unsupportedAndroidIds = new Set(
- asrPresets('android', true, undefined, false).map((preset) => preset.id),
-);
-if (unsupportedAndroidIds.has('sherpa-onnx-local')) {
- throw new Error('sherpa-onnx must stay hidden on Android ABIs without the native runtime');
+for (const os of ['android', 'linux'] as const) {
+ if (asrPresets(os, true, undefined, false).some((preset) => preset.id === 'sherpa-onnx-local')) {
+ throw new Error(`sherpa-onnx must stay hidden on ${os} builds without the native runtime`);
+ }
}
const legacyQwenEditIds = new Set(
diff --git a/openless-all/app/src/features/providers/channelCatalog.ts b/openless-all/app/src/features/providers/channelCatalog.ts
index 6b2e26ede..b46b8d248 100644
--- a/openless-all/app/src/features/providers/channelCatalog.ts
+++ b/openless-all/app/src/features/providers/channelCatalog.ts
@@ -2,6 +2,7 @@ import { useTranslation } from 'react-i18next';
import { type ProviderDescriptor } from '../../api/providers';
import { isExperimentalAsrProvider, isRetiredMacAsrProvider } from '../../lib/experimentalAsr';
import { type OS } from '../../runtime/environment';
+import { supportsSherpaRuntime } from '../../runtime/platform';
import { ASR_LABELS, LLM_LABELS } from './labels';
export type ChannelKind = 'llm' | 'asr';
@@ -50,9 +51,9 @@ export function presetsFor(
if (p.id === 'local-qwen3-c') return os === 'mac';
if (p.id === 'local-qwen3') return false;
if (p.id === 'foundry-local-whisper') return os === 'win';
- // sherpa-onnx also runs on arm64 Android; the capability is ABI-aware.
+ // Linux and Android availability depends on the installed build/ABI.
if (p.id === 'sherpa-onnx-local') {
- return os === 'win' || (os === 'android' && supportsLocalAsr);
+ return supportsSherpaRuntime(os, supportsLocalAsr);
}
// The two old Bailian ids are historical aliases; the unified entry is `bailian`, so new cards must not pick them.
if (p.id === 'bailian-qwen3-realtime' || p.id === 'bailian-fun-asr-flash') return false;
diff --git a/openless-all/app/src/features/qa/AskTool.tsx b/openless-all/app/src/features/qa/AskTool.tsx
new file mode 100644
index 000000000..fd25aebf1
--- /dev/null
+++ b/openless-all/app/src/features/qa/AskTool.tsx
@@ -0,0 +1,17 @@
+import { useEffect, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import { openAskWindow } from '../../api/ask-window';
+import { Button } from '../../ui/controls/Button';
+import { Card } from '../../ui/layout/Card';
+import { PageHeader } from '../../ui/layout/PageHeader';
+
+export function AskTool() {
+ const { t } = useTranslation();
+ const [error, setError] = useState('');
+ const open = () => { setError(''); void openAskWindow().catch((reason) => setError(String(reason))); };
+ useEffect(() => { open(); }, []);
+ return <>
+
+ {error && {error}
}
+ >;
+}
diff --git a/openless-all/app/src/features/qa/LinuxQaWindow.tsx b/openless-all/app/src/features/qa/LinuxQaWindow.tsx
new file mode 100644
index 000000000..407dbbe96
--- /dev/null
+++ b/openless-all/app/src/features/qa/LinuxQaWindow.tsx
@@ -0,0 +1,76 @@
+import { useEffect, useRef, useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import { invokeOrPreview, listenTauriEvent } from '../../runtime/transport';
+import { copyTextToClipboard } from '../../api/files';
+import { AssistantMarkdown } from './chat/markdown';
+import { Button } from '../../ui/controls/Button';
+import { useInteraction } from '../../ui/overlays/InteractionProvider';
+
+interface Snapshot {
+ phase: string;
+ sessionId?: string;
+ messages: { id: string; role: string; content: string }[];
+ lastError?: string;
+}
+
+/** View only. Core's existing QA service owns recording, turns and cancellation.
+ * No attachment/system-context promises: those require the separate Ask host. */
+export function LinuxQaWindow() {
+ const { i18n } = useTranslation();
+ const zh = i18n.language.startsWith('zh');
+ const { notify } = useInteraction('linux-qa');
+ const [snapshot, setSnapshot] = useState({ phase: 'idle', messages: [] });
+ const [draft, setDraft] = useState('');
+ const [pending, setPending] = useState(false);
+ const refresh = useRef<() => Promise>(async () => {});
+ useEffect(() => {
+ let active = true, requested = 0, unsubscribe = () => {};
+ refresh.current = async () => {
+ const request = ++requested;
+ try {
+ const next = await invokeOrPreview('qa_get_snapshot', undefined, () => ({ phase: 'idle', messages: [] }));
+ if (active && request === requested) setSnapshot(next);
+ } catch (error) {
+ if (active) notify({ key: 'linux-qa-load', state: 'failed', message: String(error) });
+ }
+ };
+ void listenTauriEvent('qa:state', () => { void refresh.current(); }).then((off) => {
+ if (!active) off(); else { unsubscribe = off; void refresh.current(); }
+ }).catch((error) => { if (active) notify({ state: 'failed', message: String(error) }); });
+ return () => { active = false; unsubscribe(); };
+ }, [notify]);
+ const run = async (command: string, args?: Record) => {
+ try { await invokeOrPreview(command, args, () => undefined); }
+ catch (error) { notify({ state: 'failed', message: String(error) }); }
+ finally { await refresh.current(); }
+ };
+ const working = snapshot.phase === 'thinking' || snapshot.phase === 'recording';
+ return (
+
+
+ {zh ? '问答' : 'Questions'}
+
+
+
+ {!snapshot.messages.length &&
{zh ? '输入问题或点击语音开始提问。' : 'Type a question or start a voice question.'}
}
+ {snapshot.messages.map((message) =>
+ {message.role === 'user' ? (zh ? '你' : 'You') : 'OpenLess'}
+
+ {message.content && }
+ )}
+ {snapshot.lastError &&
{snapshot.lastError}
}
+
+
+ );
+}
diff --git a/openless-all/app/src/features/remote-input/useRemoteInputStatus.ts b/openless-all/app/src/features/remote-input/useRemoteInputStatus.ts
index bda341945..79bb5839c 100644
--- a/openless-all/app/src/features/remote-input/useRemoteInputStatus.ts
+++ b/openless-all/app/src/features/remote-input/useRemoteInputStatus.ts
@@ -7,7 +7,7 @@ import {
type RemoteInputStartError,
type RemoteInputStatus,
} from '../../api/input';
-import { isTauriHost } from '../../runtime/environment';
+import { isNativeDesktopHost } from '../../runtime/environment';
export function useRemoteInputStatus(locale: string) {
const [status, setStatus] = useState(null);
@@ -39,7 +39,7 @@ export function useRemoteInputStatus(locale: string) {
else stop();
};
void (async () => {
- if (isTauriHost()) {
+ if (isNativeDesktopHost()) {
const listeners = await Promise.allSettled([
listenRemoteInputStatusChanges(() => {
if (!active) return;
diff --git a/openless-all/app/src/features/settings/sections/AboutSection.tsx b/openless-all/app/src/features/settings/sections/AboutSection.tsx
index d1301271a..7e4c8a744 100644
--- a/openless-all/app/src/features/settings/sections/AboutSection.tsx
+++ b/openless-all/app/src/features/settings/sections/AboutSection.tsx
@@ -88,7 +88,9 @@ export function AboutSection() {
{/* Top right of the icon: stable-channel check-updates button. The Beta section has its own channel check. */}
- {platformCaps?.supportsAutoUpdate === true && (
+ {/* Linux installs deb/rpm packages, so there is no in-app installer: the
+ native host checks the same manifest and notifies instead. */}
+ {platformCaps?.supportsAutoUpdate === true && platformCaps.linuxHost !== true && (
)}
diff --git a/openless-all/app/src/features/settings/sections/BetaChannelSection.tsx b/openless-all/app/src/features/settings/sections/BetaChannelSection.tsx
index 913f603dc..d6820e385 100644
--- a/openless-all/app/src/features/settings/sections/BetaChannelSection.tsx
+++ b/openless-all/app/src/features/settings/sections/BetaChannelSection.tsx
@@ -60,9 +60,11 @@ export function BetaChannelSection() {
-
-
-
+ {platformCaps?.linuxHost !== true && (
+
+
+
+ )}
);
}
diff --git a/openless-all/app/src/features/settings/shell/navigation.ts b/openless-all/app/src/features/settings/shell/navigation.ts
index 0bb01ac64..152f47212 100644
--- a/openless-all/app/src/features/settings/shell/navigation.ts
+++ b/openless-all/app/src/features/settings/shell/navigation.ts
@@ -122,7 +122,9 @@ export function visibleGeneralPages(
if ((page.id === 'askEntry' || page.id === 'askHistory') && !ASK_ANYTHING_AVAILABLE) return false;
if (page.id === 'translation') return platform == null || platform === 'desktop';
if (page.id === 'askEntry') return unifiedAsk;
- if (page.id === 'askHistory') return !unifiedAsk;
+ // This page controls the new Tauri Ask host's context/read permissions,
+ // not the legacy Core QA view. Linux has no such read adapter yet.
+ if (page.id === 'askHistory') return !unifiedAsk && os !== 'linux';
if (page.id === 'phone') return platform === 'desktop';
if (page.id === 'capsule') return platform == null || platform === 'desktop';
return true;
@@ -138,7 +140,7 @@ export function visibleAdvancedPages(
if (page.id === 'dictationReferences')
return platform === 'desktop' && dictationReferencesSupported;
if (page.id === 'intentRouting') return platform === 'desktop' && (os === 'mac' || os === 'win');
- if (page.id === 'liveInput') return platform === 'desktop' && os === 'win';
+ if (page.id === 'liveInput') return platform === 'desktop' && os !== 'mac';
if (page.id === 'localModels') return platform === 'desktop' && os === 'mac';
if (page.id === 'debug')
return platform === 'desktop' || platform === 'android' || platform === 'harmony';
@@ -146,12 +148,13 @@ export function visibleAdvancedPages(
});
}
-// Native readers exist on macOS, Windows, and Android. Generic mobile and Harmony
-// have no cursor-context capture, so the toggle stays hidden there.
+// Native readers exist on macOS, Windows, Android and the Linux host (the fcitx5
+// plugin reports surrounding text). Generic mobile and Harmony have no cursor-context
+// capture, so the toggle stays hidden there.
export function showsCursorContextControl(platform: PlatformKind | undefined, os: OS): boolean {
if (platform === 'mobile' || platform === 'harmony' || os === 'harmony') return false;
if (platform === 'android' || os === 'android') return true;
- return os === 'mac' || os === 'win';
+ return os === 'mac' || os === 'win' || os === 'linux';
}
export interface SettingsNavigationItem {
diff --git a/openless-all/app/src/features/style-packs/AppStyleRouting.tsx b/openless-all/app/src/features/style-packs/AppStyleRouting.tsx
index b178470af..2be5e4001 100644
--- a/openless-all/app/src/features/style-packs/AppStyleRouting.tsx
+++ b/openless-all/app/src/features/style-packs/AppStyleRouting.tsx
@@ -192,7 +192,8 @@ export function AppStyleRouting() {
const identifiable = platform.isMac
? ids.macosBundleIds.length ||
(ids.macosBundlePrefixes?.length && ids.installedWebAppNames.length)
- : platform.isWindows && ids.windowsExecutableStems.length;
+ : platform.isWindows ? ids.windowsExecutableStems.length
+ : (ids.linuxProgramNames?.length ?? 0) + (ids.linuxDesktopIds?.length ?? 0);
if (!identifiable) continue;
const id = `catalog:${client.id}`;
const category =
diff --git a/openless-all/app/src/features/updates/AutoUpdateGate.tsx b/openless-all/app/src/features/updates/AutoUpdateGate.tsx
index 6bbefa411..f263292fd 100644
--- a/openless-all/app/src/features/updates/AutoUpdateGate.tsx
+++ b/openless-all/app/src/features/updates/AutoUpdateGate.tsx
@@ -14,7 +14,9 @@ export function AutoUpdateGate() {
const { prefs } = useHotkeySettings();
const u = useAutoUpdate(true);
const [platformCaps, setPlatformCaps] = useState(null);
- const enabled = prefs?.autoUpdateCheck === true && platformCaps?.supportsAutoUpdate === true;
+ // Linux checks from the native host, including when the window is hidden.
+ // Do not offer the Tauri installer for deb/rpm packages.
+ const enabled = prefs?.autoUpdateCheck === true && platformCaps?.supportsAutoUpdate === true && !platformCaps.linuxHost;
useEffect(() => {
let mounted = true;
@@ -57,7 +59,7 @@ export function AutoUpdateGate() {
};
}, [enabled]);
- if (platformCaps?.supportsAutoUpdate !== true) return null;
+ if (platformCaps?.supportsAutoUpdate !== true || platformCaps.linuxHost) return null;
return (
- phase === 'completed' || phase === 'cancelled';
+ phase === 'completed' || phase === 'cancelled' || phase === 'outcome_unknown';
const errorDetail = (reason: unknown) =>
reason instanceof Error ? reason.message : String(reason);
@@ -38,8 +42,11 @@ export function VoiceEditPanel({
onRequestClose,
onRequestDismiss,
}: VoiceEditPanelProps) {
- const { t } = useTranslation();
+ const { t, i18n } = useTranslation();
const modalActive = useModalActive();
+ const linux = isLinuxHost();
+ const [fullField, setFullField] = useState(false);
+ const selectionOnly = linux && !fullField;
const [snapshot, setSnapshot] = useState(null);
const [busy, setBusy] = useState(false);
const [closing, setClosing] = useState(false);
@@ -68,15 +75,21 @@ export function VoiceEditPanel({
setBusy(false);
if (!active) return;
setSnapshot(null);
+ const refreshCapabilities = () => {
+ if (linux) void getLinuxTextAccessStatus().then((status) => setFullField(status.enabled)).catch(() => setFullField(false));
+ };
+ const unlisten = linux ? listenHostEvent('voice-edit:show', () => { refreshCapabilities(); void refresh(); }) : undefined;
+ refreshCapabilities();
void refresh();
- const timer = window.setInterval(() => void refresh(), 500);
+ const timer = linux ? undefined : window.setInterval(() => void refresh(), 500);
return () => {
generation.current += 1;
runningAction.current = undefined;
closingRef.current = false;
- window.clearInterval(timer);
+ if (timer !== undefined) window.clearInterval(timer);
+ unlisten?.();
};
- }, [active, refresh]);
+ }, [active, refresh, linux]);
useEffect(() => {
if (closeError) setError(closeError);
@@ -173,7 +186,7 @@ export function VoiceEditPanel({
title={t('emptyStates.firstUse.voiceEditTitle')}
description={t(embedded ? 'voiceEdit.androidTargetHint' : 'emptyStates.firstUse.voiceEditDesc')}
primaryAction={
- !embedded
+ !embedded && !selectionOnly
? {
label: t('emptyStates.firstUse.voiceEditStart'),
icon: 'mic',
@@ -183,12 +196,17 @@ export function VoiceEditPanel({
: undefined
}
/>
+ {linux && fullField && (
+
+ )}
) : (
<>
- {t('voiceEdit.status', { phase: t(`voiceEdit.phase.${snapshot.phase}`) })}
+ {t('voiceEdit.status', { phase: t(`voiceEdit.phase.${snapshot.phase}`, { defaultValue: 'Write outcome unknown' }) })}
{t('voiceEdit.turns', { count: context?.turns.length ?? 0 })}
@@ -288,7 +306,7 @@ export function VoiceEditPanel({
{t(`voiceEdit.errors.${error.split(':')[0]}`, { defaultValue: error })}
) : null}
- {!embedded && snapshot && isTerminal(snapshot.phase) ? (
+ {!embedded && !selectionOnly && snapshot && isTerminal(snapshot.phase) ? (