Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/opencode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
},
"devDependencies": {
"@babel/core": "7.28.4",
"@babel/types": "7.29.0",
"@effect/language-service": "0.84.2",
"@octokit/webhooks-types": "7.6.1",
"@opencode-ai/script": "workspace:*",
Expand Down
7 changes: 7 additions & 0 deletions packages/opencode/src/tool/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { PlanExitTool } from "./plan"
import { Session } from "../session"
import { QuestionTool } from "./question"
import { BashTool } from "./bash"
import { TerminalTool } from "./terminal"
import { EditTool } from "./edit"
import { GlobTool } from "./glob"
import { GrepTool } from "./grep"
Expand Down Expand Up @@ -30,6 +31,7 @@ import { Glob } from "@opencode-ai/shared/util/glob"
import path from "path"
import { pathToFileURL } from "url"
import { Effect, Layer, Context } from "effect"
import { Pty } from "@/pty"
import { FetchHttpClient, HttpClient } from "effect/unstable/http"
import { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner"
import * as CrossSpawnSpawner from "@/effect/cross-spawn-spawner"
Expand Down Expand Up @@ -84,6 +86,7 @@ export const layer: Layer.Layer<
| Bus.Service
| HttpClient.HttpClient
| ChildProcessSpawner
| Pty.Service
| Ripgrep.Service
| Format.Service
| Truncate.Service
Expand All @@ -106,6 +109,7 @@ export const layer: Layer.Layer<
const webfetch = yield* WebFetchTool
const websearch = yield* WebSearchTool
const bash = yield* BashTool
const terminal = yield* TerminalTool
const codesearch = yield* CodeSearchTool
const globtool = yield* GlobTool
const writetool = yield* WriteTool
Expand Down Expand Up @@ -179,6 +183,7 @@ export const layer: Layer.Layer<
const tool = yield* Effect.all({
invalid: Tool.init(invalid),
bash: Tool.init(bash),
terminal: Tool.init(terminal),
read: Tool.init(read),
glob: Tool.init(globtool),
grep: Tool.init(greptool),
Expand All @@ -202,6 +207,7 @@ export const layer: Layer.Layer<
tool.invalid,
...(questionEnabled ? [tool.question] : []),
tool.bash,
tool.terminal,
tool.read,
tool.glob,
tool.grep,
Expand Down Expand Up @@ -334,6 +340,7 @@ export const defaultLayer = Layer.suspend(() =>
Layer.provide(Format.defaultLayer),
Layer.provide(CrossSpawnSpawner.defaultLayer),
Layer.provide(Ripgrep.defaultLayer),
Layer.provide(Pty.defaultLayer),
Layer.provide(Truncate.defaultLayer),
),
)
Loading
Loading