Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -740,13 +740,30 @@ async function startApp() {
debugLogger.debug("Parakeet startup init error (non-fatal)", { error: err.message });
});

if (process.env.REASONING_PROVIDER === "local" && process.env.LOCAL_REASONING_MODEL) {
// TODO: drop legacy REASONING_PROVIDER / LOCAL_REASONING_MODEL fallbacks after 2 releases.
const cleanupProvider = process.env.CLEANUP_PROVIDER || process.env.REASONING_PROVIDER;
const cleanupLocalModel =
process.env.LOCAL_CLEANUP_MODEL || process.env.LOCAL_REASONING_MODEL;
if (cleanupProvider === "local" && cleanupLocalModel) {
const modelManager = require("./src/helpers/modelManagerBridge").default;
modelManager.prewarmServer(process.env.LOCAL_REASONING_MODEL).catch((err) => {
modelManager.prewarmServer(cleanupLocalModel).catch((err) => {
debugLogger.debug("llama-server pre-warm error (non-fatal)", { error: err.message });
});
}

if (
process.env.DICTATION_AGENT_PROVIDER === "local" &&
process.env.LOCAL_DICTATION_AGENT_MODEL &&
process.env.LOCAL_DICTATION_AGENT_MODEL !== cleanupLocalModel
) {
const modelManager = require("./src/helpers/modelManagerBridge").default;
modelManager.prewarmServer(process.env.LOCAL_DICTATION_AGENT_MODEL).catch((err) => {
debugLogger.debug("dictation-agent llama-server pre-warm error (non-fatal)", {
error: err.message,
});
});
}

// Auto-download diarization models if binary is available
if (
diarizationManager.getBinaryPath() &&
Expand Down
18 changes: 9 additions & 9 deletions src/components/ControlPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function ControlPanel() {
const {
useLocalWhisper,
localTranscriptionProvider,
useReasoningModel,
useCleanupModel,
setUseLocalWhisper,
setCloudTranscriptionMode,
} = useSettings();
Expand Down Expand Up @@ -242,7 +242,7 @@ export default function ControlPanel() {
if (status?.gpuInfo.hasNvidiaGpu && !status.downloaded) results.cuda = true;
} catch {}
}
if (useReasoningModel) {
if (useCleanupModel) {
try {
const [gpu, vulkan] = await Promise.all([
window.electronAPI?.detectVulkanGpu?.(),
Expand All @@ -254,7 +254,7 @@ export default function ControlPanel() {
setGpuAccelAvailable(results);
};
detect();
}, [useLocalWhisper, localTranscriptionProvider, useReasoningModel, gpuBannerDismissed]);
}, [useLocalWhisper, localTranscriptionProvider, useCleanupModel, gpuBannerDismissed]);

useEffect(() => {
const cleanup = window.electronAPI?.onNavigateToMeetingNote?.((data) => {
Expand Down Expand Up @@ -447,17 +447,17 @@ export default function ControlPanel() {
let finalTranscription = result.transcription;

// Apply AI reasoning if enabled
if (useReasoningModel) {
if (useCleanupModel) {
try {
const [
{ default: ReasoningService },
{ getEffectiveReasoningModel, isCloudReasoningMode },
{ getEffectiveCleanupModel, isCloudCleanupMode },
] = await Promise.all([
import("../services/ReasoningService"),
import("../stores/settingsStore"),
]);
const model = getEffectiveReasoningModel();
const isCloud = isCloudReasoningMode();
const model = getEffectiveCleanupModel();
const isCloud = isCloudCleanupMode();
if (model || isCloud) {
const agentName = localStorage.getItem("agentName") || null;
const reasonedText = await ReasoningService.processText(rawText, model, agentName);
Expand Down Expand Up @@ -493,7 +493,7 @@ export default function ControlPanel() {
});
}
},
[toast, t, useReasoningModel]
[toast, t, useCleanupModel]
);

const handleUpdateClick = async () => {
Expand Down Expand Up @@ -791,7 +791,7 @@ export default function ControlPanel() {
setShowCloudMigrationBanner={setShowCloudMigrationBanner}
aiCTADismissed={aiCTADismissed}
setAiCTADismissed={setAiCTADismissed}
useReasoningModel={useReasoningModel}
useCleanupModel={useCleanupModel}
copyToClipboard={copyToClipboard}
deleteTranscription={deleteTranscription}
clearAllTranscriptions={clearAllTranscriptions}
Expand Down
6 changes: 3 additions & 3 deletions src/components/HistoryView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface HistoryViewProps {
setShowCloudMigrationBanner: (show: boolean) => void;
aiCTADismissed: boolean;
setAiCTADismissed: (dismissed: boolean) => void;
useReasoningModel: boolean;
useCleanupModel: boolean;
copyToClipboard: (text: string) => void;
deleteTranscription: (id: number) => void;
clearAllTranscriptions: () => void;
Expand All @@ -36,7 +36,7 @@ export default function HistoryView({
setShowCloudMigrationBanner,
aiCTADismissed,
setAiCTADismissed,
useReasoningModel,
useCleanupModel,
copyToClipboard,
deleteTranscription,
clearAllTranscriptions,
Expand Down Expand Up @@ -111,7 +111,7 @@ export default function HistoryView({
</div>
)}

{!useReasoningModel && !aiCTADismissed && (
{!useCleanupModel && !aiCTADismissed && (
<div className="mb-3 relative rounded-lg border border-primary/20 bg-primary/5 dark:bg-primary/10 p-3">
<button
onClick={() => {
Expand Down
Loading
Loading