fix(desktop): disable project deep links

This commit is contained in:
Bohdan Triapitsyn
2026-07-14 13:35:43 +03:00
parent fb98edda45
commit c1069f08f6
2 changed files with 0 additions and 24 deletions
-4
View File
@@ -2074,10 +2074,6 @@ const dispatchDeepLink = (link) => {
emitToAllWindows('openchamber:open-session', { sessionId: link.value });
return;
}
if (link.type === 'project' && link.value) {
emitToAllWindows('openchamber:open-project', { projectPath: link.value });
return;
}
if (link.type === 'host' && link.value) {
void switchToHostById(link.value);
return;
-20
View File
@@ -668,26 +668,6 @@ function App({ apis }: AppProps) {
return () => window.removeEventListener('openchamber:open-draft-session', handler as EventListener);
}, []);
React.useEffect(() => {
if (typeof window === 'undefined') return;
const handler = (event: Event) => {
const detail = (event as CustomEvent<{ projectPath?: string }>).detail;
const projectPath = typeof detail?.projectPath === 'string' ? detail.projectPath.trim() : '';
if (!projectPath) return;
const projectsStore = useProjectsStore.getState();
const existing = projectsStore.projects.find((project) => project.path === projectPath);
if (existing) {
projectsStore.setActiveProject(existing.id);
} else {
projectsStore.addProject(projectPath);
}
};
window.addEventListener('openchamber:open-project', handler as EventListener);
return () => window.removeEventListener('openchamber:open-project', handler as EventListener);
}, []);
React.useEffect(() => {
if (typeof window === 'undefined') return;
if (!isInitialized || isSwitchingDirectory) return;