Skip to content

feat: all feature working on kde now#10

Open
Dhritikrishna123 wants to merge 11 commits into
Puskar-Roy:devfrom
Dhritikrishna123:main
Open

feat: all feature working on kde now#10
Dhritikrishna123 wants to merge 11 commits into
Puskar-Roy:devfrom
Dhritikrishna123:main

Conversation

@Dhritikrishna123

Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings April 18, 2026 08:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread src/main/transcription.js
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 thread src/main/kde-manager.js
Comment on lines +303 to +304
loadAndRunScript(scriptPath, qdbus);

Comment thread README.md
* **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.
Comment thread README.md

* **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 thread src/main/ipc-handlers.js
Comment on lines +45 to +46
ipcMain.handle('is-native-linux-audio', () => {
// Use native pipewire record on KDE/Linux instead of Chromium WebRTC
Comment thread src/main/shortcuts.js
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) {
Comment thread src/renderer/js/api.js
} 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 thread src/main/kde-manager.js
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 thread src/main/preload.js
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'),
Comment thread src/main/transcription.js
'--format=s16le',
'-d', targetSink
]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants