From 946ab9fabedd390ed65650b880a45e9505171313 Mon Sep 17 00:00:00 2001 From: Hannes Rudolph Date: Fri, 6 Feb 2026 17:50:41 -0700 Subject: [PATCH] chore: minor type cleanup (out-of-scope housekeeping) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Trim unused recursive/isOutsideWorkspace from DirPermissionItem interface - Remove 4 pre-existing `as any` casts in ChatView.tsx: - window cast → precise inline type - checkpoint bracket access → removed unnecessary casts - condensing message → `as ClineMessage` - debounce cancel → `.clear()` (correct API) - Update BatchListFilesPermission test data to match trimmed interface --- .../components/chat/BatchListFilesPermission.tsx | 2 -- webview-ui/src/components/chat/ChatView.tsx | 15 ++++++--------- .../__tests__/BatchListFilesPermission.spec.tsx | 8 -------- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/webview-ui/src/components/chat/BatchListFilesPermission.tsx b/webview-ui/src/components/chat/BatchListFilesPermission.tsx index 1645bc85d1..a5d08c244b 100644 --- a/webview-ui/src/components/chat/BatchListFilesPermission.tsx +++ b/webview-ui/src/components/chat/BatchListFilesPermission.tsx @@ -5,8 +5,6 @@ import { PathTooltip } from "../ui/PathTooltip" interface DirPermissionItem { path: string - recursive: boolean - isOutsideWorkspace?: boolean key: string } diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index ff64e06068..05d0c4fe4a 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -72,8 +72,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction { - const w = window as any - return w.AUDIO_BASE_URI || "" + return (window as unknown as { AUDIO_BASE_URI?: string }).AUDIO_BASE_URI || "" }) const { t } = useAppTranslation() @@ -976,10 +975,10 @@ const ChatViewComponent: React.ForwardRefRenderFunction { return () => { - if (scrollToBottomSmooth && typeof (scrollToBottomSmooth as any).cancel === "function") { - ;(scrollToBottomSmooth as any).cancel() - } + scrollToBottomSmooth.clear() } }, [scrollToBottomSmooth]) diff --git a/webview-ui/src/components/chat/__tests__/BatchListFilesPermission.spec.tsx b/webview-ui/src/components/chat/__tests__/BatchListFilesPermission.spec.tsx index dbfdd297b1..21ea05192f 100644 --- a/webview-ui/src/components/chat/__tests__/BatchListFilesPermission.spec.tsx +++ b/webview-ui/src/components/chat/__tests__/BatchListFilesPermission.spec.tsx @@ -9,20 +9,14 @@ describe("BatchListFilesPermission", () => { { key: "apps/cli", path: "apps/cli", - recursive: false, - isOutsideWorkspace: false, }, { key: "apps/web-roo-code", path: "apps/web-roo-code", - recursive: false, - isOutsideWorkspace: false, }, { key: "packages/core", path: "packages/core", - recursive: true, - isOutsideWorkspace: false, }, ] @@ -90,8 +84,6 @@ describe("BatchListFilesPermission", () => { { key: "apps/cli", path: "apps/cli", - recursive: false, - isOutsideWorkspace: false, }, ]