mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-01 02:06:41 +00:00
refactor: remove makeRuntime facades from File and Ripgrep (#22513)
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user