fix(desktop): respect local-origin tauri shell for directory access (#391)

* feat: enable local-origin desktop features and copy in terminal support

- Enable arbitrary web loads in desktop web content for TAURI apps.
- Guard directory dialog access behind local-origin origin check.
- Add copy-to-clipboard support for terminal selections via common shortcuts.

* fix: improve initial directory resolution and persistence in directory store
This commit is contained in:
Bohdan Triapitsyn
2026-02-11 20:07:44 +02:00
committed by GitHub
parent 844562749d
commit 3afe0bb45d
7 changed files with 111 additions and 22 deletions
+2 -2
View File
@@ -201,8 +201,8 @@ export const getDesktopHomeDirectory = async (): Promise<string | null> => {
export const requestDirectoryAccess = async (
directoryPath: string
): Promise<{ success: boolean; path?: string; projectId?: string; error?: string }> => {
// Desktop shell: use native folder picker.
if (isTauriShell()) {
// Desktop shell on local instance: use native folder picker.
if (isTauriShell() && isDesktopLocalOriginActive()) {
try {
const tauri = (window as unknown as { __TAURI__?: TauriGlobal }).__TAURI__;
const selected = await tauri?.dialog?.open?.({