From 5cf235fa6cf7b4c890c68f8ff68a96fcae992abf Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Wed, 4 Mar 2026 15:12:34 +0800 Subject: desktop: add electron version (#15663) --- packages/ui/src/styles/base.css | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'packages/ui/src') diff --git a/packages/ui/src/styles/base.css b/packages/ui/src/styles/base.css index 33a245705..b5604ad61 100644 --- a/packages/ui/src/styles/base.css +++ b/packages/ui/src/styles/base.css @@ -86,6 +86,17 @@ a { app-region: drag; } +*[data-tauri-drag-region] button, +*[data-tauri-drag-region] a, +*[data-tauri-drag-region] input, +*[data-tauri-drag-region] textarea, +*[data-tauri-drag-region] select, +*[data-tauri-drag-region] [role="button"], +*[data-tauri-drag-region] [role="menuitem"], +*[data-tauri-drag-region] [contenteditable] { + app-region: no-drag; +} + /* Add the correct font weight in Edge and Safari. */ -- cgit v1.2.3 From db3eddc51f97ab58b20d3230a42591738c4d6a7b Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Wed, 4 Mar 2026 16:41:20 +0800 Subject: ui: rely on task part href instead of onClick handler (#15978) --- packages/ui/src/components/message-part.tsx | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'packages/ui/src') diff --git a/packages/ui/src/components/message-part.tsx b/packages/ui/src/components/message-part.tsx index a97b38671..aecdbc8e4 100644 --- a/packages/ui/src/components/message-part.tsx +++ b/packages/ui/src/components/message-part.tsx @@ -1494,27 +1494,6 @@ ToolRegistry.register({ return `${path.slice(0, idx)}/session/${sessionId}` }) - const handleLinkClick = (e: MouseEvent) => { - const sessionId = childSessionId() - const url = href() - if (!sessionId || !url) return - - e.stopPropagation() - - if (e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return - - const nav = data.navigateToSession - if (!nav || typeof window === "undefined") return - - e.preventDefault() - const before = window.location.pathname + window.location.search + window.location.hash - nav(sessionId) - setTimeout(() => { - const after = window.location.pathname + window.location.search + window.location.hash - if (after === before) window.location.assign(url) - }, 50) - } - const titleContent = () => const trigger = () => ( @@ -1531,7 +1510,7 @@ ToolRegistry.register({ data-slot="basic-tool-tool-subtitle" class="clickable subagent-link" href={url()} - onClick={handleLinkClick} + onClick={(e) => e.stopPropagation()} > {description()} -- cgit v1.2.3