mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-26 16:19:40 +00:00
fix: clean up final 16 no-unused-vars warnings (#22751)
This commit is contained in:
parent
bd29004831
commit
9f4b73b6a3
13 changed files with 8 additions and 37 deletions
|
|
@ -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") {
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue