Remove unused app ID schema (#27105)
This commit is contained in:
parent
2b9af91568
commit
bc4fdb8370
2 changed files with 13 additions and 6 deletions
|
|
@ -1,5 +1,3 @@
|
||||||
import z from "zod"
|
|
||||||
|
|
||||||
const prefixes = {
|
const prefixes = {
|
||||||
session: "ses",
|
session: "ses",
|
||||||
message: "msg",
|
message: "msg",
|
||||||
|
|
@ -15,10 +13,6 @@ let counter = 0
|
||||||
|
|
||||||
type Prefix = keyof typeof prefixes
|
type Prefix = keyof typeof prefixes
|
||||||
export namespace Identifier {
|
export namespace Identifier {
|
||||||
export function schema(prefix: Prefix) {
|
|
||||||
return z.string().startsWith(prefixes[prefix])
|
|
||||||
}
|
|
||||||
|
|
||||||
export function ascending(prefix: Prefix, given?: string) {
|
export function ascending(prefix: Prefix, given?: string) {
|
||||||
return generateID(prefix, false, given)
|
return generateID(prefix, false, given)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue