Skip to content
Merged
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
2 changes: 1 addition & 1 deletion packages/opencode/src/agent/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Provider } from "../provider"
import { ModelID, ProviderID } from "../provider/schema"
import { generateObject, streamObject, type ModelMessage } from "ai"
import { Instance } from "../project/instance"
import { Truncate } from "../tool/truncate"
import { Truncate } from "../tool"
import { Auth } from "../auth"
import { ProviderTransform } from "../provider/transform"

Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/cli/cmd/debug/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Provider } from "../../../provider"
import { Session } from "../../../session"
import type { MessageV2 } from "../../../session/message-v2"
import { MessageID, PartID } from "../../../session/schema"
import { ToolRegistry } from "../../../tool/registry"
import { ToolRegistry } from "../../../tool"
import { Instance } from "../../../project/instance"
import { Permission } from "../../../permission"
import { iife } from "../../../util/iife"
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/cli/cmd/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Server } from "../../server/server"
import { Provider } from "../../provider"
import { Agent } from "../../agent/agent"
import { Permission } from "../../permission"
import { Tool } from "../../tool/tool"
import { Tool } from "../../tool"
import { GlobTool } from "../../tool/glob"
import { GrepTool } from "../../tool/grep"
import { ReadTool } from "../../tool/read"
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import type {
} from "@opencode-ai/sdk/v2"
import { useLocal } from "@tui/context/local"
import { Locale } from "@/util"
import type { Tool } from "@/tool/tool"
import type { Tool } from "@/tool"
import type { ReadTool } from "@/tool/read"
import type { WriteTool } from "@/tool/write"
import { BashTool } from "@/tool/bash"
Expand Down
4 changes: 2 additions & 2 deletions packages/opencode/src/effect/app-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import { LSP } from "@/lsp"
import { MCP } from "@/mcp"
import { McpAuth } from "@/mcp/auth"
import { Command } from "@/command"
import { Truncate } from "@/tool/truncate"
import { ToolRegistry } from "@/tool/registry"
import { Truncate } from "@/tool"
import { ToolRegistry } from "@/tool"
import { Format } from "@/format"
import { Project } from "@/project"
import { Vcs } from "@/project"
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/server/instance/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Hono } from "hono"
import { describeRoute, validator, resolver } from "hono-openapi"
import z from "zod"
import { ProviderID, ModelID } from "../../provider/schema"
import { ToolRegistry } from "../../tool/registry"
import { ToolRegistry } from "../../tool"
import { Worktree } from "../../worktree"
import { Instance } from "../../project/instance"
import { Project } from "../../project"
Expand Down
6 changes: 3 additions & 3 deletions packages/opencode/src/session/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { Plugin } from "../plugin"
import PROMPT_PLAN from "../session/prompt/plan.txt"
import BUILD_SWITCH from "../session/prompt/build-switch.txt"
import MAX_STEPS from "../session/prompt/max-steps.txt"
import { ToolRegistry } from "../tool/registry"
import { ToolRegistry } from "../tool"
import { MCP } from "../mcp"
import { LSP } from "../lsp"
import { FileTime } from "../file/time"
Expand All @@ -34,13 +34,13 @@ import { ConfigMarkdown } from "../config"
import { SessionSummary } from "./summary"
import { NamedError } from "@opencode-ai/shared/util/error"
import { SessionProcessor } from "./processor"
import { Tool } from "@/tool/tool"
import { Tool } from "@/tool"
import { Permission } from "@/permission"
import { SessionStatus } from "./status"
import { LLM } from "./llm"
import { Shell } from "@/shell/shell"
import { AppFileSystem } from "@opencode-ai/shared/filesystem"
import { Truncate } from "@/tool/truncate"
import { Truncate } from "@/tool"
import { decodeDataUrl } from "@/util/data-url"
import { Process } from "@/util"
import { Cause, Effect, Exit, Layer, Option, Scope, Context } from "effect"
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/tool/apply_patch.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import z from "zod"
import * as path from "path"
import { Effect } from "effect"
import { Tool } from "./tool"
import * as Tool from "./tool"
import { Bus } from "../bus"
import { FileWatcher } from "../file/watcher"
import { Instance } from "../project/instance"
Expand Down
4 changes: 2 additions & 2 deletions packages/opencode/src/tool/bash.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import z from "zod"
import os from "os"
import { createWriteStream } from "node:fs"
import { Tool } from "./tool"
import * as Tool from "./tool"
import path from "path"
import DESCRIPTION from "./bash.txt"
import { Log } from "../util"
Expand All @@ -15,7 +15,7 @@ import { Flag } from "@/flag/flag"
import { Shell } from "@/shell/shell"

import { BashArity } from "@/permission/arity"
import { Truncate } from "./truncate"
import * as Truncate from "./truncate"
import { Plugin } from "@/plugin"
import { Effect, Stream } from "effect"
import { ChildProcess } from "effect/unstable/process"
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/tool/codesearch.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import z from "zod"
import { Effect } from "effect"
import { HttpClient } from "effect/unstable/http"
import { Tool } from "./tool"
import * as Tool from "./tool"
import * as McpExa from "./mcp-exa"
import DESCRIPTION from "./codesearch.txt"

Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/tool/edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import z from "zod"
import * as path from "path"
import { Effect } from "effect"
import { Tool } from "./tool"
import * as Tool from "./tool"
import { LSP } from "../lsp"
import { createTwoFilesPatch, diffLines } from "diff"
import DESCRIPTION from "./edit.txt"
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/tool/external-directory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from "path"
import { Effect } from "effect"
import { EffectLogger } from "@/effect"
import { InstanceState } from "@/effect"
import type { Tool } from "./tool"
import type * as Tool from "./tool"
import { Instance } from "../project/instance"
import { AppFileSystem } from "@opencode-ai/shared/filesystem"

Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/tool/glob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { AppFileSystem } from "@opencode-ai/shared/filesystem"
import { Ripgrep } from "../file/ripgrep"
import { assertExternalDirectoryEffect } from "./external-directory"
import DESCRIPTION from "./glob.txt"
import { Tool } from "./tool"
import * as Tool from "./tool"

export const GlobTool = Tool.define(
"glob",
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/tool/grep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { AppFileSystem } from "@opencode-ai/shared/filesystem"
import { Ripgrep } from "../file/ripgrep"
import { assertExternalDirectoryEffect } from "./external-directory"
import DESCRIPTION from "./grep.txt"
import { Tool } from "./tool"
import * as Tool from "./tool"

const MAX_LINE_LENGTH = 2000

Expand Down
3 changes: 3 additions & 0 deletions packages/opencode/src/tool/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * as Truncate from "./truncate"
export * as ToolRegistry from "./registry"
export * as Tool from "./tool"
2 changes: 1 addition & 1 deletion packages/opencode/src/tool/invalid.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import z from "zod"
import { Effect } from "effect"
import { Tool } from "./tool"
import * as Tool from "./tool"

export const InvalidTool = Tool.define(
"invalid",
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/tool/lsp.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import z from "zod"
import { Effect } from "effect"
import { Tool } from "./tool"
import * as Tool from "./tool"
import path from "path"
import { LSP } from "../lsp"
import DESCRIPTION from "./lsp.txt"
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/tool/multiedit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import z from "zod"
import { Effect } from "effect"
import { Tool } from "./tool"
import * as Tool from "./tool"
import { EditTool } from "./edit"
import DESCRIPTION from "./multiedit.txt"
import path from "path"
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/tool/plan.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import z from "zod"
import path from "path"
import { Effect } from "effect"
import { Tool } from "./tool"
import * as Tool from "./tool"
import { Question } from "../question"
import { Session } from "../session"
import { MessageV2 } from "../session/message-v2"
Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/tool/question.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import z from "zod"
import { Effect } from "effect"
import { Tool } from "./tool"
import * as Tool from "./tool"
import { Question } from "../question"
import DESCRIPTION from "./question.txt"

Expand Down
2 changes: 1 addition & 1 deletion packages/opencode/src/tool/read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createReadStream } from "fs"
import { open } from "fs/promises"
import * as path from "path"
import { createInterface } from "readline"
import { Tool } from "./tool"
import * as Tool from "./tool"
import { AppFileSystem } from "@opencode-ai/shared/filesystem"
import { LSP } from "../lsp"
import { FileTime } from "../file/time"
Expand Down
Loading
Loading