Refactor schedule service and add cron support

This commit is contained in:
Chris Scott committed 2026-03-22 11:14:30 -04:00
1 parent dbf48d4691
commit 47524876aa
24 files changed
+652 -139

No files matched your search

-12
View File
@@ -1,7 +1,5 @@
import type { paths } from './opencode-types'
import { fetchWrapper } from './fetchWrapper'
import { useQuery } from '@tanstack/react-query'
import { OPENCODE_API_ENDPOINT } from '@/config'
type SessionListResponse = paths['/session']['get']['responses']['200']['content']['application/json']
type SessionResponse = paths['/session/{sessionID}']['get']['responses']['200']['content']['application/json']
@@ -251,13 +249,3 @@ export const createOpenCodeClient = (baseURL: string, directory?: string) => {
return new OpenCodeClient(baseURL, directory)
}
export const useAgents = () => {
return useQuery({
queryKey: ['opencode-agents'],
queryFn: async () => {
const client = createOpenCodeClient(OPENCODE_API_ENDPOINT)
return await client.listAgents()
},
staleTime: 5 * 60 * 1000,
})
}