The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import { |
| 2 | defineSourceControlDriver, |
| 3 | withOwnServices, |
| 4 | } from "@t3tools/source-control-core/server/driver"; |
| 5 | import * as Effect from "effect/Effect"; |
| 6 | import * as Layer from "effect/Layer"; |
| 7 | |
| 8 | import { definition } from "../shared/definition.ts"; |
| 9 | |
| 10 | import * as GitCafeApi from "./GitCafeApi.ts"; |
| 11 | import * as GitCafeCredentials from "./GitCafeCredentials.ts"; |
| 12 | import * as GitCafePullRequestProvider from "./GitCafePullRequestProvider.ts"; |
| 13 | import * as GitCafeSourceControlProvider from "./GitCafeSourceControlProvider.ts"; |
| 14 | |
| 15 | const services = GitCafeApi.layer.pipe(Layer.provideMerge(GitCafeCredentials.layer)); |
| 16 | |
| 17 | const makeInstance = Effect.all({ |
| 18 | sourceControl: GitCafeSourceControlProvider.make, |
| 19 | discovery: GitCafeSourceControlProvider.makeDiscovery, |
| 20 | pullRequests: GitCafePullRequestProvider.make, |
| 21 | }); |
| 22 | |
| 23 | export const driver = defineSourceControlDriver({ |
| 24 | kind: definition.kind, |
| 25 | definition, |
| 26 | make: withOwnServices(makeInstance, services), |
| 27 | }); |