refactor: remove makeRuntime facades from File and Ripgrep (#22513)

This commit is contained in:
Kit Langton
2026-04-15 21:22:18 -04:00
committed by GitHub
parent 02f2cf439e
commit 0fb0135e51
5 changed files with 130 additions and 213 deletions

View File

@@ -4,7 +4,7 @@ import { fileURLToPath } from "url"
import z from "zod"
import { Cause, Context, Effect, Layer, Queue, Stream } from "effect"
import { ripgrep } from "ripgrep"
import { makeRuntime } from "@/effect/run-service"
import { Filesystem } from "@/util/filesystem"
import { Log } from "@/util/log"
@@ -572,18 +572,4 @@ export namespace Ripgrep {
)
export const defaultLayer = layer
const { runPromise } = makeRuntime(Service, defaultLayer)
export function files(input: FilesInput) {
return runPromise((svc) => Stream.toAsyncIterableEffect(svc.files(input)))
}
export function tree(input: TreeInput) {
return runPromise((svc) => svc.tree(input))
}
export function search(input: SearchInput) {
return runPromise((svc) => svc.search(input))
}
}