From 54db2ae23c7e7552debee5d88190a66754d42f60 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 02:18:20 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- clients/tabby-chat-panel/src/react.ts | 6 ++---- clients/tabby-chat-panel/src/vscode.tsx | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/clients/tabby-chat-panel/src/react.ts b/clients/tabby-chat-panel/src/react.ts index f3773e6f5775..4e514d2ecd72 100644 --- a/clients/tabby-chat-panel/src/react.ts +++ b/clients/tabby-chat-panel/src/react.ts @@ -8,9 +8,8 @@ function useClient(iframeRef: RefObject, api: ClientApi) { const clientRef = useRef(null) useEffect(() => { - if (iframeRef.current && !clientRef.current) { + if (iframeRef.current && !clientRef.current) clientRef.current = createClient(iframeRef.current, api) - } }, [iframeRef.current]) return clientRef.current @@ -21,9 +20,8 @@ function useServer(api: ServerApi) { useEffect(() => { const isInIframe = window.self !== window.top - if (isInIframe && !serverRef.current) { + if (isInIframe && !serverRef.current) serverRef.current = createServer(api) - } }, []) return serverRef.current diff --git a/clients/tabby-chat-panel/src/vscode.tsx b/clients/tabby-chat-panel/src/vscode.tsx index 9f3acbbe5665..2c26588419e0 100644 --- a/clients/tabby-chat-panel/src/vscode.tsx +++ b/clients/tabby-chat-panel/src/vscode.tsx @@ -30,8 +30,8 @@ function ChatPanel() { if (iframeRef?.current && token) { client?.init({ fetcherOptions: { - authorization: token - } + authorization: token, + }, }) } }, [iframeRef?.current, client, token])