feat(webui): add a host directory picker and refine composer controls

This commit is contained in:
chengyongru authored and chengyongru committed 2026-10-08 20:33:15 +08:00
1 parent 3865bde3fe
commit 66c8d41f66
32 files changed
+1974 -464

No files matched your search

+10 -6
View File
@@ -266,15 +266,18 @@ export function useVoiceRecorder({
stopRecordingWhenReady();
}, [stopRecordingWhenReady, suppressNextClick]);
const consumeSuppressedClick = useCallback(() => {
if (!suppressClickRef.current) return false;
clearSuppressClickTimer();
suppressClickRef.current = false;
return true;
}, [clearSuppressClickTimer]);
const handleClick = useCallback(() => {
if (suppressClickRef.current) {
clearSuppressClickTimer();
suppressClickRef.current = false;
return;
}
if (consumeSuppressedClick()) return;
if (state === "recording") stopRecording();
else void startRecording();
}, [clearSuppressClickTimer, startRecording, state, stopRecording]);
}, [consumeSuppressedClick, startRecording, state, stopRecording]);
const beginShortcutHold = useCallback(() => {
if (!onTranscribeAudio || disabled || state !== "idle" || shortcutActiveRef.current) return;
@@ -308,6 +311,7 @@ export function useVoiceRecorder({
beginShortcutHold,
beginPress,
buttonDisabled: disabled || state === "transcribing",
consumeSuppressedClick,
elapsedLabel: formatVoiceElapsed(elapsedMs),
endShortcutHold,
endPress,