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