From bd0a4f7bbef079265289e9a83f43273f489ca6f9 Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Mon, 3 Nov 2025 15:42:01 -0600
Subject: wip: desktop work

---
 packages/desktop/src/context/local.tsx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'packages/desktop/src/context/local.tsx')

diff --git a/packages/desktop/src/context/local.tsx b/packages/desktop/src/context/local.tsx
index 283dddc2c..db4699150 100644
--- a/packages/desktop/src/context/local.tsx
+++ b/packages/desktop/src/context/local.tsx
@@ -325,7 +325,10 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
         })
       }
 
-      const search = (query: string) => sdk.client.find.files({ query: { query } }).then((x) => x.data!)
+      const searchFiles = (query: string) =>
+        sdk.client.find.files({ query: { query, dirs: false } }).then((x) => x.data!)
+      const searchFilesAndDirectories = (query: string) =>
+        sdk.client.find.files({ query: { query, dirs: true } }).then((x) => x.data!)
 
       sdk.event.listen((e) => {
         const event = e.details
@@ -411,7 +414,8 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
               !x.path.replace(new RegExp(`^${path + "/"}`), "").includes("/"),
           )
         },
-        search,
+        searchFiles,
+        searchFilesAndDirectories,
         relative,
         // active,
         // opened,
-- 
cgit v1.2.3

