From 3600bd27f481c461734e517a40e01cd4e899e10f Mon Sep 17 00:00:00 2001
From: Daniel Polito <danielbpolito@gmail.com>
Date: Tue, 13 Jan 2026 15:28:08 -0300
Subject: feat(desktop): Ask Question Tool Support (#8232)

---
 packages/ui/src/components/basic-tool.tsx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'packages/ui/src/components/basic-tool.tsx')

diff --git a/packages/ui/src/components/basic-tool.tsx b/packages/ui/src/components/basic-tool.tsx
index 15b5d4867..725a7d0d6 100644
--- a/packages/ui/src/components/basic-tool.tsx
+++ b/packages/ui/src/components/basic-tool.tsx
@@ -25,6 +25,7 @@ export interface BasicToolProps {
   hideDetails?: boolean
   defaultOpen?: boolean
   forceOpen?: boolean
+  locked?: boolean
   onSubtitleClick?: () => void
 }
 
@@ -35,8 +36,13 @@ export function BasicTool(props: BasicToolProps) {
     if (props.forceOpen) setOpen(true)
   })
 
+  const handleOpenChange = (value: boolean) => {
+    if (props.locked && !value) return
+    setOpen(value)
+  }
+
   return (
-    <Collapsible open={open()} onOpenChange={setOpen}>
+    <Collapsible open={open()} onOpenChange={handleOpenChange}>
       <Collapsible.Trigger>
         <div data-component="tool-trigger">
           <div data-slot="basic-tool-tool-trigger-content">
@@ -95,7 +101,7 @@ export function BasicTool(props: BasicToolProps) {
               </Switch>
             </div>
           </div>
-          <Show when={props.children && !props.hideDetails}>
+          <Show when={props.children && !props.hideDetails && !props.locked}>
             <Collapsible.Arrow />
           </Show>
         </div>
-- 
cgit v1.2.3

