auto-git:
[add] dist/assets/index-BvwmOKz6.js [change] dist/index.html [change] src/App.jsx [unlink] dist/assets/index-Ctu3w7qr.js
This commit is contained in:
74
dist/assets/index-BvwmOKz6.js
vendored
Normal file
74
dist/assets/index-BvwmOKz6.js
vendored
Normal file
File diff suppressed because one or more lines are too long
74
dist/assets/index-Ctu3w7qr.js
vendored
74
dist/assets/index-Ctu3w7qr.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -5,7 +5,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>LLM Desktop</title>
|
||||
<script type="module" crossorigin src="/assets/index-Ctu3w7qr.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-BvwmOKz6.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BFOWWhCS.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
25
src/App.jsx
25
src/App.jsx
@@ -638,7 +638,7 @@ export default function App() {
|
||||
}
|
||||
|
||||
async function startAudioRecording() {
|
||||
if (!audioInputEnabled || isRecordingAudio || isTranscribingAudio || isSending) {
|
||||
if (!audioInputEnabled || !audioInputRuntimeReady || isRecordingAudio || isTranscribingAudio || isSending) {
|
||||
return
|
||||
}
|
||||
if (!supportsAudioInputCapture()) {
|
||||
@@ -1229,6 +1229,13 @@ async function regenerateFromIndex(index, overrideUserText = null) {
|
||||
stopAudioRecording({ shouldTranscribe: false })
|
||||
}, [audioInputEnabled, isRecordingAudio])
|
||||
|
||||
useEffect(() => {
|
||||
if (audioInputRuntimeReady || !isRecordingAudio) {
|
||||
return
|
||||
}
|
||||
stopAudioRecording({ shouldTranscribe: false })
|
||||
}, [audioInputRuntimeReady, isRecordingAudio])
|
||||
|
||||
useEffect(() => {
|
||||
if (activeSidebarMode === 'chats' || !isRecordingAudio) {
|
||||
return
|
||||
@@ -1265,6 +1272,7 @@ async function regenerateFromIndex(index, overrideUserText = null) {
|
||||
try {
|
||||
let status = await fetchStartupOllamaStatus()
|
||||
if (cancelled) return
|
||||
syncAudioInputRuntimeFromStartupStatus(status)
|
||||
|
||||
if (!status?.ollama_running && status?.can_manage_locally) {
|
||||
const confirmed = window.confirm(
|
||||
@@ -1296,12 +1304,15 @@ async function regenerateFromIndex(index, overrideUserText = null) {
|
||||
} else {
|
||||
setStartupTaskMessage(`Downloading ${status.selected_embed_model} from Ollama. This can take a while on first install.`)
|
||||
}
|
||||
await prepareStartupModels()
|
||||
const prepared = await prepareStartupModels()
|
||||
if (cancelled) return
|
||||
syncAudioInputRuntimeFromStartupStatus(prepared?.ollama || status)
|
||||
}
|
||||
} catch (error) {
|
||||
if (!cancelled) {
|
||||
console.warn('startup Ollama check failed', error)
|
||||
setAudioInputRuntimeReady(false)
|
||||
setAudioInputRuntimeMessage(`Whisper availability could not be verified: ${getErrorText(error)}`)
|
||||
if (actionStarted) {
|
||||
window.alert(`Startup action failed: ${getErrorText(error)}`)
|
||||
}
|
||||
@@ -2718,17 +2729,21 @@ async function createNewChat() {
|
||||
}
|
||||
onClick={toggleAudioRecording}
|
||||
title={
|
||||
isRecordingAudio
|
||||
!audioInputRuntimeReady
|
||||
? (audioInputRuntimeMessage || 'Whisper is not available for audio input.')
|
||||
: isRecordingAudio
|
||||
? 'Stop voice input'
|
||||
: (isTranscribingAudio ? 'Transcribing audio' : 'Start voice input')
|
||||
}
|
||||
aria-label={
|
||||
isRecordingAudio
|
||||
!audioInputRuntimeReady
|
||||
? (audioInputRuntimeMessage || 'Whisper is not available for audio input.')
|
||||
: isRecordingAudio
|
||||
? 'Stop voice input'
|
||||
: (isTranscribingAudio ? 'Transcribing audio' : 'Start voice input')
|
||||
}
|
||||
aria-pressed={isRecordingAudio}
|
||||
disabled={isTranscribingAudio || isSending}
|
||||
disabled={!audioInputRuntimeReady || isTranscribingAudio || isSending}
|
||||
>
|
||||
{isTranscribingAudio ? (
|
||||
<div className="spinner composer-audio-icon-spinner" aria-hidden="true"></div>
|
||||
|
||||
Reference in New Issue
Block a user