feat: all feature working on kde now#10
Open
Dhritikrishna123 wants to merge 11 commits into
Open
Conversation
Feat/memory context
Feat/memory context
Feat/memory context
Feat/memory context
There was a problem hiding this comment.
Pull request overview
This PR adds KDE-specific integrations to improve “stealth” window behavior and system-audio transcription on KDE/Wayland, plus some smaller UX/error-message improvements in the renderer.
Changes:
- Add KDE Plasma stealth support via a KWin scripting helper (ExcludeFromCapture + skipTaskbar/skipPager).
- Add KDE-native system audio capture in the main process (via
parec) and bypass WebRTC capture in the renderer when on KDE. - Improve model-add validation messaging and provider error extraction; tweak Island subtitle timing/styling.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| src/renderer/js/assembly-service.js | Bypass WebRTC display capture on KDE and rely on backend-native audio capture. |
| src/renderer/js/app.js | More specific validation alerts when adding custom models. |
| src/renderer/js/api.js | Centralize provider error-message extraction and truncation for noisy/HTML errors. |
| src/renderer/island.html | Adjust transcript display behavior for partial vs final turns and timing. |
| src/main/transcription.js | Add KDE-native audio capture via parec and update AssemblyAI WS params. |
| src/main/shortcuts.js | Add KDE/Wayland snip capture path using Spectacle with fallback to desktopCapturer. |
| src/main/preload.js | Expose isNativeLinuxAudio() to renderer via contextBridge. |
| src/main/kde-manager.js | New KDE manager to load/unload a KWin script for stealth behavior (Plasma 6.6+). |
| src/main/ipc-handlers.js | Add IPC capability check and apply KDE stealth toggling with app mode changes. |
| src/main/index.js | Ensure KDE stealth cleanup runs on app quit. |
| README.md | Update docs to mention KDE stealth and Linux audio changes. |
| .kwin_debug.js | Add a small KWin debug helper script for inspecting window properties. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+138
to
+140
| if (data.type === 'Turn') { | ||
| console.log(`[TRANSCRIPTION] Received Turn: "${data.transcript}" (end_of_turn: ${data.end_of_turn})`); | ||
| } |
Comment on lines
+303
to
+304
| loadAndRunScript(scriptPath, qdbus); | ||
|
|
| * **Stealth Window**: Hardware-level DRM protection makes the AI invisible to screen-sharing, screenshots, and meeting platforms (Zoom, Teams). | ||
| * **Voice Transcription**: Real-time system audio capture streamed to AssemblyAI for live results. | ||
| * **Stealth Window**: Hardware-level DRM protection (Windows/macOS) and KWin Scripting (Linux KDE) makes the AI invisible to screen-sharing, screenshots, and meeting platforms (Zoom, Teams). | ||
| * **Voice Transcription**: Real-time system audio capture via browser WebRTC (Windows/macOS) and native zero-latency PipeWire integration (Linux) streamed to AssemblyAI. |
|
|
||
| * **Hardware DRM**: Blocks all standard capture APIs. | ||
| * **Hardware DRM**: Blocks all standard capture APIs on Windows and macOS. | ||
| * **KDE Plasma Stealth**: Native compositor integration via KWin scripting for true invisibility on Linux (KDE 6.6+). Hides from screen capture, taskbar, and alt-tab menus. |
Comment on lines
+45
to
+46
| ipcMain.handle('is-native-linux-audio', () => { | ||
| // Use native pipewire record on KDE/Linux instead of Chromium WebRTC |
Comment on lines
+75
to
+82
| const tmpPath = '/tmp/imposter_snip.png'; | ||
| try { | ||
| execSync(`spectacle -b -n -o ${tmpPath}`, { stdio: 'ignore' }); | ||
| const imgData = fs.readFileSync(tmpPath); | ||
| screenSource = `data:image/png;base64,${imgData.toString('base64')}`; | ||
| // Clean up the temporary file silently | ||
| fs.unlink(tmpPath, () => {}); | ||
| } catch (err) { |
| } catch (e) { | ||
| // It's not JSON, so it's probably raw HTML or plain text. If it's long HTML, truncate it. | ||
| if (result.message.includes('<html') || result.message.length > 150) { | ||
| return `${providerName} is currently unavailable (Status: ${result.status}). Please try again in a moment.`; |
Comment on lines
+260
to
+276
| try { | ||
| // Always unload any previous instance of our script | ||
| unloadStealthScript(qdbus); | ||
|
|
||
| // Write the script to disk | ||
| const scriptPath = getScriptPath(); | ||
| const scriptContent = generateStealthScript(enable); | ||
| fs.writeFileSync(scriptPath, scriptContent, 'utf-8'); | ||
|
|
||
| // Load and run | ||
| const success = loadAndRunScript(scriptPath, qdbus); | ||
|
|
||
| if (success) { | ||
| console.log(`[KDE] Stealth mode ${enable ? 'ENABLED' : 'DISABLED'} — ExcludeFromCapture = ${enable}`); | ||
| } else { | ||
| console.error('[KDE] Failed to apply stealth mode'); | ||
| } |
Comment on lines
+23
to
26
| isNativeLinuxAudio: () => ipcRenderer.invoke('is-native-linux-audio'), | ||
| getDesktopSourceId: () => ipcRenderer.invoke('get-desktop-source-id'), | ||
| startTranscription: (apiKey) => ipcRenderer.invoke('start-transcription', apiKey), | ||
| stopTranscription: () => ipcRenderer.send('stop-transcription'), |
| '--format=s16le', | ||
| '-d', targetSink | ||
| ]); | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.