From 07113ebe946c550250b346057c991b30c43eeb84 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Mon, 23 Feb 2026 02:42:32 +0900 Subject: [PATCH] fix(features/task-toast-manager): replace as any with ClientWithTui type Add ClientWithTui local type for tui.showToast access Remove 2 as any casts and eslint-disable comments Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- src/features/task-toast-manager/manager.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/features/task-toast-manager/manager.ts b/src/features/task-toast-manager/manager.ts index b63fca0c..ebfb6dc2 100644 --- a/src/features/task-toast-manager/manager.ts +++ b/src/features/task-toast-manager/manager.ts @@ -4,6 +4,12 @@ import type { ConcurrencyManager } from "../background-agent/concurrency" type OpencodeClient = PluginInput["client"] +type ClientWithTui = { + tui?: { + showToast: (opts: { body: { title: string; message: string; variant: string; duration: number } }) => Promise + } +} + export class TaskToastManager { private tasks: Map = new Map() private client: OpencodeClient @@ -170,8 +176,7 @@ export class TaskToastManager { * Show consolidated toast with all running/queued tasks */ private showTaskListToast(newTask: TrackedTask): void { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const tuiClient = this.client as any + const tuiClient = this.client as ClientWithTui if (!tuiClient.tui?.showToast) return const message = this.buildTaskListMessage(newTask) @@ -196,8 +201,7 @@ export class TaskToastManager { * Show task completion toast */ showCompletionToast(task: { id: string; description: string; duration: string }): void { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const tuiClient = this.client as any + const tuiClient = this.client as ClientWithTui if (!tuiClient.tui?.showToast) return this.removeTask(task.id)