mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-18 01:58:43 +00:00
Merge branch 'dev' into kit/effect-sync-event
This commit is contained in:
1
bun.lock
1
bun.lock
@@ -450,6 +450,7 @@
|
||||
"version": "1.4.3",
|
||||
"dependencies": {
|
||||
"@opencode-ai/sdk": "workspace:*",
|
||||
"effect": "catalog:",
|
||||
"zod": "catalog:",
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"@opencode-ai/sdk": "workspace:*",
|
||||
"effect": "catalog:",
|
||||
"zod": "catalog:"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod"
|
||||
import { Effect } from "effect"
|
||||
|
||||
export type ToolContext = {
|
||||
sessionID: string
|
||||
@@ -16,7 +17,7 @@ export type ToolContext = {
|
||||
worktree: string
|
||||
abort: AbortSignal
|
||||
metadata(input: { title?: string; metadata?: { [key: string]: any } }): void
|
||||
ask(input: AskInput): Promise<void>
|
||||
ask(input: AskInput): Effect.Effect<void>
|
||||
}
|
||||
|
||||
type AskInput = {
|
||||
|
||||
Reference in New Issue
Block a user