Bläddra i källkod

Remove unused app ID schema (#27105)

Kit Langton 3 månader sedan
förälder
incheckning
bc4fdb8370

+ 0 - 6
packages/app/src/utils/id.ts

@@ -1,5 +1,3 @@
-import z from "zod"
-
 const prefixes = {
   session: "ses",
   message: "msg",
@@ -15,10 +13,6 @@ let counter = 0
 
 type Prefix = keyof typeof prefixes
 export namespace Identifier {
-  export function schema(prefix: Prefix) {
-    return z.string().startsWith(prefixes[prefix])
-  }
-
   export function ascending(prefix: Prefix, given?: string) {
     return generateID(prefix, false, given)
   }

+ 13 - 0
packages/storybook/.storybook/mocks/app/context/global-sync.ts

@@ -40,3 +40,16 @@ export function useGlobalSync() {
     },
   }
 }
+
+export function useQueryOptions() {
+  return {
+    agents: (directory: string) => ({
+      queryKey: [directory, "agents"],
+      queryFn: async () => [],
+    }),
+    providers: (directory: string | null) => ({
+      queryKey: [directory, "providers"],
+      queryFn: async () => provider,
+    }),
+  }
+}