mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-23 05:39:05 +00:00
adds timeout and humanMessage
This commit is contained in:
@@ -52,7 +52,7 @@ export default function Pagination(props: PaginationProps) {
|
||||
{pageNumbers.map((pageNumber) => (
|
||||
<button
|
||||
key={pageNumber}
|
||||
className={`w-10 h-10 rounded-full p-2 border rounded-full ${
|
||||
className={`w-10 h-10 rounded-full p-2 border ${
|
||||
page === pageNumber ? "border-gray-600" : "border-gray-300"
|
||||
} rounded`}
|
||||
onClick={() => handlePageChange(pageNumber)}
|
||||
@@ -62,7 +62,7 @@ export default function Pagination(props: PaginationProps) {
|
||||
))}
|
||||
|
||||
<button
|
||||
className={`w-10 h-10 rounded-full p-2 border border-gray-300 rounded-full disabled:bg-white ${
|
||||
className={`w-10 h-10 rounded-full p-2 border border-gray-300 disabled:bg-white ${
|
||||
canGoNext ? "text-gray-500" : "text-gray-300"
|
||||
}`}
|
||||
onClick={() => handlePageChange(page + 1)}
|
||||
|
||||
@@ -45,7 +45,10 @@ const useCreateTranscript = (): CreateTranscript => {
|
||||
console.debug("New transcript created:", result);
|
||||
})
|
||||
.catch((err) => {
|
||||
setError(err);
|
||||
setError(
|
||||
err,
|
||||
"There was an issue creating a transcript, please try again.",
|
||||
);
|
||||
setErrorState(err);
|
||||
setLoading(false);
|
||||
});
|
||||
|
||||
@@ -13,7 +13,6 @@ import { Topic } from "./webSocketTypes";
|
||||
import { AudioWaveform } from "../../api";
|
||||
import AudioInputsDropdown from "./audioInputsDropdown";
|
||||
import { Option } from "react-dropdown";
|
||||
import { useError } from "../../(errors)/errorContext";
|
||||
import { waveSurferStyles } from "../../styles/recorder";
|
||||
import useMp3 from "./useMp3";
|
||||
|
||||
@@ -51,7 +50,6 @@ export default function Recorder(props: RecorderProps) {
|
||||
const [activeTopic, setActiveTopic] = props.useActiveTopic;
|
||||
const topicsRef = useRef(props.topics);
|
||||
const [showDevices, setShowDevices] = useState(false);
|
||||
const { setError } = useError();
|
||||
|
||||
// Function used to setup keyboard shortcuts for the streamdeck
|
||||
const setupProjectorKeys = (): (() => void) => {
|
||||
@@ -73,9 +71,6 @@ export default function Recorder(props: RecorderProps) {
|
||||
if (!record.isRecording()) return;
|
||||
handleRecClick();
|
||||
break;
|
||||
case "%":
|
||||
setError(new Error("Error triggered by '%' shortcut"));
|
||||
break;
|
||||
case "^":
|
||||
throw new Error("Unhandled Exception thrown by '^' shortcut");
|
||||
case "(":
|
||||
|
||||
@@ -65,7 +65,7 @@ const useMp3 = (protectedPath: boolean, id: string): Mp3Response => {
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
setError(err);
|
||||
setError(err, "There was an error loading the audio");
|
||||
setErrorState(err);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ const useTopics = (protectedPath, id: string): TranscriptTopics => {
|
||||
console.debug("Transcript topics loaded:", result);
|
||||
})
|
||||
.catch((err) => {
|
||||
setError(err);
|
||||
setError(err, "There was an error loading the topics");
|
||||
setErrorState(err);
|
||||
});
|
||||
}, [id, api]);
|
||||
|
||||
@@ -35,7 +35,7 @@ const useTranscript = (
|
||||
console.debug("Transcript Loaded:", result);
|
||||
})
|
||||
.catch((err) => {
|
||||
setError(err);
|
||||
setError(err, "There was an error loading the transcript");
|
||||
setErrorState(err);
|
||||
});
|
||||
}, [id, !api]);
|
||||
|
||||
@@ -35,7 +35,7 @@ const useWaveform = (protectedPath, id: string): AudioWaveFormResponse => {
|
||||
console.debug("Transcript waveform loaded:", result);
|
||||
})
|
||||
.catch((err) => {
|
||||
setError(err);
|
||||
setError(err, "There was an error loading the waveform");
|
||||
setErrorState(err);
|
||||
});
|
||||
}, [id, api]);
|
||||
|
||||
@@ -28,7 +28,7 @@ const useWebRTC = (
|
||||
try {
|
||||
p = new Peer({ initiator: true, stream: stream });
|
||||
} catch (error) {
|
||||
setError(error);
|
||||
setError(error, "Error creating WebRTC");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ const useWebRTC = (
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
setError(error);
|
||||
setError(error, "Error loading WebRTCOffer");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -22,7 +22,7 @@ export const useWebSockets = (transcriptId: string | null): UseWebSockets => {
|
||||
const [finalSummary, setFinalSummary] = useState<FinalSummary>({
|
||||
summary: "",
|
||||
});
|
||||
const [status, setStatus] = useState<Status>({ value: "disconnected" });
|
||||
const [status, setStatus] = useState<Status>({ value: "initial" });
|
||||
const { setError } = useError();
|
||||
const router = useRouter();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user