refactor(plugin): return Effect from ToolContext.ask (#21986)

This commit is contained in:
Kit Langton
2026-04-10 23:50:50 -04:00
committed by GitHub
parent c92c462148
commit d84cc33742
4 changed files with 5 additions and 3 deletions
+1 -2
View File
@@ -30,7 +30,6 @@ import { Glob } from "../util/glob"
import path from "path"
import { pathToFileURL } from "url"
import { Effect, Layer, Context } from "effect"
import { EffectLogger } from "@/effect/logger"
import { FetchHttpClient, HttpClient } from "effect/unstable/http"
import { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner"
import * as CrossSpawnSpawner from "@/effect/cross-spawn-spawner"
@@ -137,7 +136,7 @@ export namespace ToolRegistry {
Effect.gen(function* () {
const pluginCtx: PluginToolContext = {
...toolCtx,
ask: (req) => Effect.runPromise(toolCtx.ask(req).pipe(Effect.provide(EffectLogger.layer))),
ask: (req) => toolCtx.ask(req),
directory: ctx.directory,
worktree: ctx.worktree,
}