feat: Display Whisper model status in frontend and add debug logging
- Add activeWhisperConfig tracking in main.js to expose current Whisper settings - Expand get-sidecar-status IPC handler to return whisper config (model, device, compute, configSource) - Add Whisper status display in meeting-detail.html transcript panel header - Status updates every 5 seconds and shows: model, device, compute type, and ready state - Add comprehensive debug logging for config loading and whisper config resolution - Helps diagnose why config.json settings may not be passed correctly to sidecar 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -170,6 +170,7 @@
|
||||
<div class="panel">
|
||||
<div class="panel-header">
|
||||
<span>Transcript (逐字稿)</span>
|
||||
<span id="whisper-status" style="font-size: 11px; color: #666; margin-left: 10px;" title="Whisper Model Info">Loading...</span>
|
||||
<div class="recording-controls" style="padding: 0; display: flex; gap: 8px;">
|
||||
<button class="btn btn-danger" id="record-btn">Start Recording</button>
|
||||
<button class="btn btn-secondary" id="upload-audio-btn">Upload Audio</button>
|
||||
@@ -281,6 +282,31 @@
|
||||
const uploadProgressEl = document.getElementById('upload-progress');
|
||||
const uploadProgressText = document.getElementById('upload-progress-text');
|
||||
const uploadProgressFill = document.getElementById('upload-progress-fill');
|
||||
const whisperStatusEl = document.getElementById('whisper-status');
|
||||
|
||||
// Update Whisper status display
|
||||
async function updateWhisperStatus() {
|
||||
try {
|
||||
const status = await window.electronAPI.getSidecarStatus();
|
||||
if (status.whisper) {
|
||||
const readyIcon = status.ready ? '✅' : '⏳';
|
||||
whisperStatusEl.textContent = `${readyIcon} Model: ${status.whisper.model} | Device: ${status.whisper.device} | Compute: ${status.whisper.compute}`;
|
||||
whisperStatusEl.title = `Config source: ${status.whisper.configSource || 'unknown'}`;
|
||||
whisperStatusEl.style.color = status.ready ? '#28a745' : '#ffc107';
|
||||
} else {
|
||||
whisperStatusEl.textContent = status.ready ? '✅ Ready' : '⏳ Loading...';
|
||||
whisperStatusEl.style.color = status.ready ? '#28a745' : '#ffc107';
|
||||
}
|
||||
} catch (error) {
|
||||
whisperStatusEl.textContent = '❌ Error';
|
||||
whisperStatusEl.style.color = '#dc3545';
|
||||
console.error('Failed to get sidecar status:', error);
|
||||
}
|
||||
}
|
||||
|
||||
// Initial status check and periodic updates
|
||||
updateWhisperStatus();
|
||||
const whisperStatusInterval = setInterval(updateWhisperStatus, 5000);
|
||||
|
||||
// Load meeting data
|
||||
async function loadMeeting() {
|
||||
|
||||
Reference in New Issue
Block a user