eslint fixes

main
Cogent Apps 2023-03-09 12:18:52 -08:00 committed by GitHub
parent f3083f8d2f
commit 17b7a68b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View File

@ -297,4 +297,5 @@ export class Search {
} }
} }
export default new ChatManager(); const chatManager = new ChatManager();
export default chatManager;

View File

@ -138,7 +138,7 @@ export default function Header(props: HeaderProps) {
const openSettings = useCallback(() => { const openSettings = useCallback(() => {
context.settings.open(context.apiKeys.openai ? 'options' : 'user'); context.settings.open(context.apiKeys.openai ? 'options' : 'user');
}, [context, context.apiKeys.openai]); }, [context]);
return <HeaderContainer> return <HeaderContainer>
<Helmet> <Helmet>

View File

@ -307,7 +307,7 @@ export function ElevenLabsReaderButton(props: { selector: string }) {
} else { } else {
reader.current.stop(); reader.current.stop();
} }
}, [status, props.selector, context.apiKeys.elevenlabs]); }, [status, props.selector, context.apiKeys.elevenlabs, context.settings, context.voice.id]);
return ( return (
<Button variant="subtle" size="sm" compact onClickCapture={onClick} loading={status === 'init'}> <Button variant="subtle" size="sm" compact onClickCapture={onClick} loading={status === 'init'}>

View File

@ -13,7 +13,7 @@ export interface UseChatResult {
export function useChat(chatManager: ChatManager, id: string | undefined | null, share = false): UseChatResult { export function useChat(chatManager: ChatManager, id: string | undefined | null, share = false): UseChatResult {
const [chat, setChat] = useState<Chat | null | undefined>(null); const [chat, setChat] = useState<Chat | null | undefined>(null);
const [_, setVersion] = useState(0); const [_, setVersion] = useState(0); // eslint-disable-line @typescript-eslint/no-unused-vars
// used to prevent auto-scroll when chat is first opened // used to prevent auto-scroll when chat is first opened
const [chatLoadedAt, setLoadedAt] = useState(0); const [chatLoadedAt, setLoadedAt] = useState(0);