Skip to content

Commit

Permalink
build normal
Browse files Browse the repository at this point in the history
  • Loading branch information
sijinhui committed Dec 16, 2024
1 parent 38ea4a0 commit 1f1b3bf
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ export function ChatAction(props: {
}

function useScrollToBottom(
scrollRef: RefObject<HTMLDivElement>,
scrollRef: RefObject<HTMLDivElement | null>,
detach: boolean = false,
) {
// for auto-scroll
Expand Down
2 changes: 1 addition & 1 deletion app/components/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export function Markdown(
loading?: boolean;
fontSize?: number;
fontFamily?: string;
parentRef?: RefObject<HTMLDivElement>;
parentRef?: RefObject<HTMLDivElement | null>;
defaultShow?: boolean;
} & React.DOMAttributes<HTMLDivElement>,
) {
Expand Down
2 changes: 1 addition & 1 deletion app/components/mask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import Locale, { AllLangs, ALL_LANG_OPTIONS, Lang } from "../locales";
import { useNavigate } from "react-router-dom";

import chatStyle from "./chat.module.scss";
import { useState } from "react";
import { JSX, useState } from "react";
import {
copyToClipboard,
downloadAs,
Expand Down
2 changes: 1 addition & 1 deletion app/components/sd/sd-panel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styles from "./sd-panel.module.scss";
import React from "react";
import React, { JSX } from "react";
import { Select } from "@/app/components/ui-lib";
import { IconButton } from "@/app/components/button";
import Locale from "@/app/locales";
Expand Down
3 changes: 2 additions & 1 deletion app/components/ui-lib.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import React, {
useState,
useCallback,
useRef,
JSX,
} from "react";
import { IconButton } from "./button";
import clsx from "clsx";
Expand Down Expand Up @@ -567,7 +568,7 @@ export function Selector<T>(props: {
}
export function FullScreen(props: any) {
const { children, right = 10, top = 10, ...rest } = props;
const ref = useRef<HTMLDivElement>();
const ref = useRef<HTMLDivElement>(null);
const [fullScreen, setFullScreen] = useState(false);
const toggleFullscreen = useCallback(() => {
if (!document.fullscreenElement) {
Expand Down
2 changes: 1 addition & 1 deletion app/components/voice-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function VoiceInput({
const [voiceInputText, setVoiceInputText] = useState("");
const [voiceInputLoading, setVoiceInputLoading] = useState(false);
// const recognition = useRef(null);
const recognizer = useRef<ms_audio_sdk.SpeechRecognizer | undefined>();
const recognizer = useRef<ms_audio_sdk.SpeechRecognizer | undefined>(null);
const [tempUserInput, setTempUserInput] = useState("");
const [accessToken, setAccessToken] = useState("unknown");

Expand Down
2 changes: 1 addition & 1 deletion app/components/voice-print/voice-print.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function VoicePrint({ frequencies, isActive }: VoicePrintProps) {
// 控制保留的历史数据帧数,影响平滑度
const historyLengthRef = useRef(10);
// 存储动画帧ID,用于清理
const animationFrameRef = useRef<number>();
const animationFrameRef = useRef<number>(0);

/**
* 更新频率历史数据
Expand Down

0 comments on commit 1f1b3bf

Please sign in to comment.