diff --git a/packages/console/app/src/component/icon.tsx b/packages/console/app/src/component/icon.tsx index 4627c00845..da2e87ef4c 100644 --- a/packages/console/app/src/component/icon.tsx +++ b/packages/console/app/src/component/icon.tsx @@ -1,6 +1,6 @@ import { JSX } from "solid-js" -export function IconZen(props: JSX.SvgSVGAttributes) { +export function IconZen(_props: JSX.SvgSVGAttributes) { return ( @@ -13,7 +13,7 @@ export function IconZen(props: JSX.SvgSVGAttributes) { ) } -export function IconGo(props: JSX.SvgSVGAttributes) { +export function IconGo(_props: JSX.SvgSVGAttributes) { return ( diff --git a/packages/console/app/src/routes/auth/status.ts b/packages/console/app/src/routes/auth/status.ts index 215cae698f..ed522d7404 100644 --- a/packages/console/app/src/routes/auth/status.ts +++ b/packages/console/app/src/routes/auth/status.ts @@ -1,7 +1,7 @@ import { APIEvent } from "@solidjs/start" import { useAuthSession } from "~/context/auth" -export async function GET(input: APIEvent) { +export async function GET(_input: APIEvent) { const session = await useAuthSession() return Response.json(session.data) } diff --git a/packages/console/app/src/routes/debug/index.ts b/packages/console/app/src/routes/debug/index.ts index 2bdd269e78..4bfb633944 100644 --- a/packages/console/app/src/routes/debug/index.ts +++ b/packages/console/app/src/routes/debug/index.ts @@ -3,7 +3,7 @@ import { json } from "@solidjs/router" import { Database } from "@opencode-ai/console-core/drizzle/index.js" import { UserTable } from "@opencode-ai/console-core/schema/user.sql.js" -export async function GET(evt: APIEvent) { +export async function GET(_evt: APIEvent) { return json({ data: await Database.use(async (tx) => { const result = await tx.$count(UserTable) diff --git a/packages/console/app/src/routes/zen/util/provider/openai-compatible.ts b/packages/console/app/src/routes/zen/util/provider/openai-compatible.ts index e05f0d6c0b..97b0abc64f 100644 --- a/packages/console/app/src/routes/zen/util/provider/openai-compatible.ts +++ b/packages/console/app/src/routes/zen/util/provider/openai-compatible.ts @@ -30,7 +30,7 @@ export const oaCompatHelper: ProviderHelper = ({ adjustCacheUsage, safetyIdentif headers.set("authorization", `Bearer ${apiKey}`) headers.set("x-session-affinity", headers.get("x-opencode-session") ?? "") }, - modifyBody: (body: Record, workspaceID?: string) => { + modifyBody: (body: Record, _workspaceID?: string) => { return { ...body, ...(body.stream ? { stream_options: { include_usage: true } } : {}), diff --git a/packages/console/app/src/routes/zen/v1/models.ts b/packages/console/app/src/routes/zen/v1/models.ts index d2592d20b0..6b4a878fc7 100644 --- a/packages/console/app/src/routes/zen/v1/models.ts +++ b/packages/console/app/src/routes/zen/v1/models.ts @@ -5,7 +5,7 @@ import { WorkspaceTable } from "@opencode-ai/console-core/schema/workspace.sql.j import { ModelTable } from "@opencode-ai/console-core/schema/model.sql.js" import { ZenData } from "@opencode-ai/console-core/model.js" -export async function OPTIONS(input: APIEvent) { +export async function OPTIONS(_input: APIEvent) { return new Response(null, { status: 200, headers: { diff --git a/packages/console/app/src/routes/zen/v1/models/[model].ts b/packages/console/app/src/routes/zen/v1/models/[model].ts index a4edd5861a..bc1168eb0c 100644 --- a/packages/console/app/src/routes/zen/v1/models/[model].ts +++ b/packages/console/app/src/routes/zen/v1/models/[model].ts @@ -6,8 +6,8 @@ export function POST(input: APIEvent) { format: "google", modelList: "full", parseApiKey: (headers: Headers) => headers.get("x-goog-api-key") ?? undefined, - parseModel: (url: string, body: any) => url.split("/").pop()?.split(":")?.[0] ?? "", - parseIsStream: (url: string, body: any) => + parseModel: (url: string, _body: any) => url.split("/").pop()?.split(":")?.[0] ?? "", + parseIsStream: (url: string, _body: any) => // ie. url: https://opencode.ai/zen/v1/models/gemini-3-pro:streamGenerateContent?alt=sse' url.split("/").pop()?.split(":")?.[1]?.startsWith("streamGenerateContent") ?? false, }) diff --git a/packages/function/src/api.ts b/packages/function/src/api.ts index 54b93ad715..d6565b2870 100644 --- a/packages/function/src/api.ts +++ b/packages/function/src/api.ts @@ -49,9 +49,9 @@ export class SyncServer extends DurableObject { }) } - async webSocketMessage(ws, message) {} + async webSocketMessage(_ws, _message) {} - async webSocketClose(ws, code, reason, wasClean) { + async webSocketClose(ws, code, _reason, _wasClean) { ws.close(code, "Durable Object is closing WebSocket") } diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.ts index 8e6bfe5e9b..8d11a93b39 100644 --- a/packages/opencode/src/agent/agent.ts +++ b/packages/opencode/src/agent/agent.ts @@ -80,7 +80,7 @@ export namespace Agent { const provider = yield* Provider.Service const state = yield* InstanceState.make( - Effect.fn("Agent.state")(function* (ctx) { + Effect.fn("Agent.state")(function* (_ctx) { const cfg = yield* config.get() const skillDirs = yield* skill.dirs() const whitelistedDirs = [Truncate.GLOB, ...skillDirs.map((dir) => path.join(dir, "*"))] diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-mcp.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-mcp.tsx index 9cfa30d4df..173c5ff60c 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-mcp.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-mcp.tsx @@ -78,7 +78,7 @@ export function DialogMcp() { title="MCPs" options={options()} keybind={keybinds()} - onSelect={(option) => { + onSelect={(_option) => { // Don't close on select, only on escape }} /> diff --git a/packages/opencode/src/cli/cmd/tui/ui/dialog-confirm.tsx b/packages/opencode/src/cli/cmd/tui/ui/dialog-confirm.tsx index ef75764a29..48adddaedc 100644 --- a/packages/opencode/src/cli/cmd/tui/ui/dialog-confirm.tsx +++ b/packages/opencode/src/cli/cmd/tui/ui/dialog-confirm.tsx @@ -54,7 +54,7 @@ export function DialogConfirm(props: DialogConfirmProps) { paddingLeft={1} paddingRight={1} backgroundColor={key === store.active ? theme.primary : undefined} - onMouseUp={(evt) => { + onMouseUp={(_evt) => { if (key === "confirm") props.onConfirm?.() if (key === "cancel") props.onCancel?.() dialog.clear() diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index f35e8c83df..63e41f4455 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -510,7 +510,7 @@ export const Agent = z permission: Permission.optional(), }) .catchall(z.any()) - .transform((agent, ctx) => { + .transform((agent, _ctx) => { const knownKeys = new Set([ "name", "model", diff --git a/packages/opencode/src/provider/schema.ts b/packages/opencode/src/provider/schema.ts index 4490ca2898..702616018a 100644 --- a/packages/opencode/src/provider/schema.ts +++ b/packages/opencode/src/provider/schema.ts @@ -30,7 +30,7 @@ const modelIdSchema = Schema.String.pipe(Schema.brand("ModelID")) export type ModelID = typeof modelIdSchema.Type export const ModelID = modelIdSchema.pipe( - withStatics((schema: typeof modelIdSchema) => ({ + withStatics((_schema: typeof modelIdSchema) => ({ zod: z.string().pipe(z.custom()), })), ) diff --git a/packages/opencode/src/provider/transform.ts b/packages/opencode/src/provider/transform.ts index 3138f8e293..7b83c245f4 100644 --- a/packages/opencode/src/provider/transform.ts +++ b/packages/opencode/src/provider/transform.ts @@ -49,7 +49,7 @@ export namespace ProviderTransform { function normalizeMessages( msgs: ModelMessage[], model: Provider.Model, - options: Record, + _options: Record, ): ModelMessage[] { // Anthropic rejects messages with empty content - filter out empty string messages // and remove empty text/reasoning parts from array content diff --git a/packages/opencode/src/v2/session.ts b/packages/opencode/src/v2/session.ts index 97df0a2207..ce1b39031f 100644 --- a/packages/opencode/src/v2/session.ts +++ b/packages/opencode/src/v2/session.ts @@ -40,11 +40,11 @@ export namespace SessionV2 { Effect.gen(function* () { const session = yield* Session.Service - const create: Interface["create"] = Effect.fn("Session.create")(function* (input) { + const create: Interface["create"] = Effect.fn("Session.create")(function* (_input) { throw new Error("Not implemented") }) - const prompt: Interface["prompt"] = Effect.fn("Session.prompt")(function* (input) { + const prompt: Interface["prompt"] = Effect.fn("Session.prompt")(function* (_input) { throw new Error("Not implemented") }) diff --git a/packages/opencode/test/session/prompt-effect.test.ts b/packages/opencode/test/session/prompt-effect.test.ts index 91297aed1d..7a118cb050 100644 --- a/packages/opencode/test/session/prompt-effect.test.ts +++ b/packages/opencode/test/session/prompt-effect.test.ts @@ -786,7 +786,7 @@ it.live( const { task } = yield* registry.named() const original = task.execute task.execute = (_args, ctx) => - Effect.callback((resume) => { + Effect.callback((_resume) => { ready.resolve() ctx.abort.addEventListener("abort", () => aborted.resolve(), { once: true }) return Effect.sync(() => aborted.resolve()) @@ -856,7 +856,7 @@ it.live( it.live("concurrent loop callers get same result", () => provideTmpdirInstance( - (dir) => + (_dir) => Effect.gen(function* () { const { prompt, run, chat } = yield* boot() yield* seed(chat.id, { finish: "stop" }) @@ -997,7 +997,7 @@ it.live( it.live("assertNotBusy succeeds when idle", () => provideTmpdirInstance( - (dir) => + (_dir) => Effect.gen(function* () { const run = yield* SessionRunState.Service const sessions = yield* Session.Service @@ -1042,7 +1042,7 @@ it.live( unix("shell captures stdout and stderr in completed tool output", () => provideTmpdirInstance( - (dir) => + (_dir) => Effect.gen(function* () { const { prompt, run, chat } = yield* boot() const result = yield* prompt.shell({ @@ -1117,7 +1117,7 @@ unix("shell lists files from the project directory", () => unix("shell captures stderr from a failing command", () => provideTmpdirInstance( - (dir) => + (_dir) => Effect.gen(function* () { const { prompt, run, chat } = yield* boot() const result = yield* prompt.shell({ @@ -1143,7 +1143,7 @@ unix( () => withSh(() => provideTmpdirInstance( - (dir) => + (_dir) => Effect.gen(function* () { const { prompt, chat } = yield* boot() @@ -1255,7 +1255,7 @@ unix( () => withSh(() => provideTmpdirInstance( - (dir) => + (_dir) => Effect.gen(function* () { const { prompt, run, chat } = yield* boot() @@ -1292,7 +1292,7 @@ unix( () => withSh(() => provideTmpdirInstance( - (dir) => + (_dir) => Effect.gen(function* () { const { prompt, chat } = yield* boot() @@ -1374,7 +1374,7 @@ unix( "cancel interrupts loop queued behind shell", () => provideTmpdirInstance( - (dir) => + (_dir) => Effect.gen(function* () { const { prompt, chat } = yield* boot() @@ -1403,7 +1403,7 @@ unix( () => withSh(() => provideTmpdirInstance( - (dir) => + (_dir) => Effect.gen(function* () { const { prompt, chat } = yield* boot() diff --git a/packages/opencode/test/session/retry.test.ts b/packages/opencode/test/session/retry.test.ts index 2d01a8f354..ade2647869 100644 --- a/packages/opencode/test/session/retry.test.ts +++ b/packages/opencode/test/session/retry.test.ts @@ -239,7 +239,7 @@ describe("session.message-v2.fromError", () => { using server = Bun.serve({ port: 0, idleTimeout: 8, - async fetch(req) { + async fetch(_req) { return new Response( new ReadableStream({ async pull(controller) { diff --git a/packages/plugin/src/example.ts b/packages/plugin/src/example.ts index 1cf042fe96..9d7e178a96 100644 --- a/packages/plugin/src/example.ts +++ b/packages/plugin/src/example.ts @@ -1,7 +1,7 @@ import { Plugin } from "./index.js" import { tool } from "./tool.js" -export const ExamplePlugin: Plugin = async (ctx) => { +export const ExamplePlugin: Plugin = async (_ctx) => { return { tool: { mytool: tool({