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

@ -191,7 +191,7 @@ export const Terminal = (props: TerminalProps) => {
const scrollY = typeof local.pty.scrollY === "number" ? local.pty.scrollY : undefined const scrollY = typeof local.pty.scrollY === "number" ? local.pty.scrollY : undefined
let ws: WebSocket | undefined let ws: WebSocket | undefined
let term: Term | undefined let term: Term | undefined
let ghostty: Ghostty let _ghostty: Ghostty
let serializeAddon: SerializeAddon let serializeAddon: SerializeAddon
let fitAddon: FitAddon let fitAddon: FitAddon
let handleResize: () => void let handleResize: () => void
@ -372,7 +372,7 @@ export const Terminal = (props: TerminalProps) => {
cleanup() cleanup()
return return
} }
ghostty = g _ghostty = g
term = t term = t
output = terminalWriter((data, done) => output = terminalWriter((data, done) =>
t.write(data, () => { t.write(data, () => {

View file

@ -1,5 +1,3 @@
import { dict as en } from "./en"
export const dict = { export const dict = {
"command.category.suggested": "추천", "command.category.suggested": "추천",
"command.category.view": "보기", "command.category.view": "보기",

View file

@ -432,7 +432,6 @@ export default function Page() {
const info = createMemo(() => (params.id ? sync.session.get(params.id) : undefined)) const info = createMemo(() => (params.id ? sync.session.get(params.id) : undefined))
const isChildSession = createMemo(() => !!info()?.parentID) const isChildSession = createMemo(() => !!info()?.parentID)
const diffs = createMemo(() => (params.id ? list(sync.data.session_diff[params.id]) : [])) const diffs = createMemo(() => (params.id ? list(sync.data.session_diff[params.id]) : []))
const sessionCount = createMemo(() => Math.max(info()?.summary?.files ?? 0, diffs().length))
const canReview = createMemo(() => !!sync.project) const canReview = createMemo(() => !!sync.project)
const reviewTab = createMemo(() => isDesktop()) const reviewTab = createMemo(() => isDesktop())
const tabState = createSessionTabs({ const tabState = createSessionTabs({

View file

@ -12,7 +12,6 @@ import { Header } from "~/component/header"
import { Footer } from "~/component/footer" import { Footer } from "~/component/footer"
import { Legal } from "~/component/legal" import { Legal } from "~/component/legal"
import { github } from "~/lib/github" import { github } from "~/lib/github"
import { createMemo } from "solid-js"
import { config } from "~/config" import { config } from "~/config"
import { useI18n } from "~/context/i18n" import { useI18n } from "~/context/i18n"
import { useLanguage } from "~/context/language" import { useLanguage } from "~/context/language"
@ -30,7 +29,7 @@ function CopyStatus() {
export default function Home() { export default function Home() {
const i18n = useI18n() const i18n = useI18n()
const language = useLanguage() const language = useLanguage()
const githubData = createAsync(() => github()) const _githubData = createAsync(() => github())
const handleCopyClick = (event: Event) => { const handleCopyClick = (event: Event) => {
const button = event.currentTarget as HTMLButtonElement const button = event.currentTarget as HTMLButtonElement
const text = button.textContent const text = button.textContent

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() { async function main() {
try { try {
if (os.platform() === "win32") { if (os.platform() === "win32") {

View file

@ -1297,7 +1297,7 @@ export const layer: Layer.Layer<
yield* Effect.promise(() => Npm.install(dir)) 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 ( if (
!(yield* fs.access(dir, { writable: true }).pipe( !(yield* fs.access(dir, { writable: true }).pipe(
Effect.as(true), Effect.as(true),

View file

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

View file

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

View file

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

View file

@ -395,7 +395,6 @@ describe("Runner", () => {
Effect.gen(function* () { Effect.gen(function* () {
const s = yield* Scope.Scope const s = yield* Scope.Scope
const runner = Runner.make<string>(s) 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) const sh = yield* runner.startShell(Effect.never.pipe(Effect.as("aborted"))).pipe(Effect.forkChild)
yield* Effect.sleep("10 millis") 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 // The callback should still be pending because cancelPending looked up
// "my-mcp-server" in a map keyed by "abc123hexstate" // "my-mcp-server" in a map keyed by "abc123hexstate"
let resolved = false
let rejected = false let rejected = false
callbackPromise.then(() => (resolved = true)).catch(() => (rejected = true)) callbackPromise.then(() => {}).catch(() => (rejected = true))
// Give it a tick // Give it a tick
await new Promise((r) => setTimeout(r, 50)) await new Promise((r) => setTimeout(r, 50))

View file

@ -385,7 +385,6 @@ export const SessionReview = (props: SessionReviewProps) => {
<Accordion multiple value={open()} onChange={handleChange}> <Accordion multiple value={open()} onChange={handleChange}>
<For each={items()}> <For each={items()}>
{(diff) => { {(diff) => {
let wrapper: HTMLDivElement | undefined
const file = diff.file const file = diff.file
// binary files have empty diffs that we can't render // binary files have empty diffs that we can't render
@ -569,7 +568,6 @@ export const SessionReview = (props: SessionReviewProps) => {
<div <div
data-slot="session-review-diff-wrapper" data-slot="session-review-diff-wrapper"
ref={(el) => { ref={(el) => {
wrapper = el
anchors.set(file, el) anchors.set(file, el)
nodes.set(file, el) nodes.set(file, el)
queue() queue()

View file

@ -9,7 +9,6 @@ import type {
TextPart, TextPart,
ReasoningPart, ReasoningPart,
ToolPart, ToolPart,
CompactionPart,
FilePart, FilePart,
AgentPart, AgentPart,
} from "@opencode-ai/sdk/v2" } from "@opencode-ai/sdk/v2"