fix: clean up final 16 no-unused-vars warnings (#22751)

This commit is contained in:
Kit Langton 2026-04-15 23:54:21 -04:00 committed by GitHub
parent bd29004831
commit 9f4b73b6a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 8 additions and 37 deletions

View file

@ -68,23 +68,6 @@ function findBinary() {
}
}
function prepareBinDirectory(binaryName) {
const binDir = path.join(__dirname, "bin")
const targetPath = path.join(binDir, binaryName)
// Ensure bin directory exists
if (!fs.existsSync(binDir)) {
fs.mkdirSync(binDir, { recursive: true })
}
// Remove existing binary/symlink if it exists
if (fs.existsSync(targetPath)) {
fs.unlinkSync(targetPath)
}
return { binDir, targetPath }
}
async function main() {
try {
if (os.platform() === "win32") {

View file

@ -1297,7 +1297,7 @@ export const layer: Layer.Layer<
yield* Effect.promise(() => Npm.install(dir))
})
const installDependencies = Effect.fn("Config.installDependencies")(function* (dir: string, input?: InstallInput) {
const installDependencies = Effect.fn("Config.installDependencies")(function* (dir: string, _input?: InstallInput) {
if (
!(yield* fs.access(dir, { writable: true }).pipe(
Effect.as(true),

View file

@ -277,11 +277,10 @@ export namespace LLM {
}
const id = PermissionID.ascending()
let reply: Permission.Reply | undefined
let unsub: (() => void) | undefined
try {
unsub = Bus.subscribe(Permission.Event.Replied, (evt) => {
if (evt.properties.requestID === id) reply = evt.properties.reply
if (evt.properties.requestID === id) void evt.properties.reply
})
const toolPatterns = approvalTools.map((t: { name: string; args: string }) => {
try {

View file

@ -463,9 +463,9 @@ describe("acp.agent event subscription", () => {
// Make permission request for session A block until we release it
const originalRequestPermission = connection.requestPermission.bind(connection)
let permissionCalls = 0
let _permissionCalls = 0
connection.requestPermission = async (params: RequestPermissionParams) => {
permissionCalls++
_permissionCalls++
if (params.sessionId.endsWith("1")) {
await permissionABlocking
}

View file

@ -858,7 +858,6 @@ it.live("dedupes concurrent config dependency installs for the same dir", () =>
let calls = 0
const online = spyOn(Network, "online").mockReturnValue(false)
const ready = Deferred.makeUnsafe<void>()
const blocked = Deferred.makeUnsafe<void>()
const hold = Deferred.makeUnsafe<void>()
const target = path.normalize(dir)
const run = spyOn(Npm, "install").mockImplementation(async (d: string) => {
@ -921,7 +920,6 @@ it.live("serializes config dependency installs across dirs", () =>
let open = 0
let peak = 0
const ready = Deferred.makeUnsafe<void>()
const blocked = Deferred.makeUnsafe<void>()
const hold = Deferred.makeUnsafe<void>()
const online = spyOn(Network, "online").mockReturnValue(false)

View file

@ -395,7 +395,6 @@ describe("Runner", () => {
Effect.gen(function* () {
const s = yield* Scope.Scope
const runner = Runner.make<string>(s)
const gate = yield* Deferred.make<void>()
const sh = yield* runner.startShell(Effect.never.pipe(Effect.as("aborted"))).pipe(Effect.forkChild)
yield* Effect.sleep("10 millis")

View file

@ -652,9 +652,8 @@ test("McpOAuthCallback.cancelPending is keyed by mcpName but pendingAuths uses o
// The callback should still be pending because cancelPending looked up
// "my-mcp-server" in a map keyed by "abc123hexstate"
let resolved = false
let rejected = false
callbackPromise.then(() => (resolved = true)).catch(() => (rejected = true))
callbackPromise.then(() => {}).catch(() => (rejected = true))
// Give it a tick
await new Promise((r) => setTimeout(r, 50))