fix: prefix 32 unused parameters with underscore (#22694)

This commit is contained in:
Kit Langton
2026-04-15 21:56:23 -04:00
committed by GitHub
parent 6625766350
commit d6b14e2467
17 changed files with 30 additions and 30 deletions

View File

@@ -80,7 +80,7 @@ export namespace Agent {
const provider = yield* Provider.Service
const state = yield* InstanceState.make<State>(
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, "*"))]

View File

@@ -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
}}
/>

View File

@@ -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()

View File

@@ -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",

View File

@@ -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<ModelID>()),
})),
)

View File

@@ -49,7 +49,7 @@ export namespace ProviderTransform {
function normalizeMessages(
msgs: ModelMessage[],
model: Provider.Model,
options: Record<string, unknown>,
_options: Record<string, unknown>,
): ModelMessage[] {
// Anthropic rejects messages with empty content - filter out empty string messages
// and remove empty text/reasoning parts from array content

View File

@@ -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")
})

View File

@@ -786,7 +786,7 @@ it.live(
const { task } = yield* registry.named()
const original = task.execute
task.execute = (_args, ctx) =>
Effect.callback<never>((resume) => {
Effect.callback<never>((_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()

View File

@@ -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) {