Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

merge: calendar-integration into agent-calendar-merge

Gabriel Steinf80b9ac14f46
diff --cc preload.js
index 528dbc039,fbfa474a0..45e1a5120
--- a/preload.js
+++ b/preload.js
@@@ -452,41 -479,65 +479,103 @@@ contextBridge.exposeInMainWorld("electr
getAutoStartEnabled: () => ipcRenderer.invoke("get-auto-start-enabled"),
setAutoStartEnabled: (enabled) => ipcRenderer.invoke("set-auto-start-enabled", enabled),
+ // Agent mode
+ notifyAgentHotkeyChanged: (hotkey) => ipcRenderer.send("agent-hotkey-changed", hotkey),
+ getAgentKey: () => ipcRenderer.invoke("get-agent-key"),
+ saveAgentKey: (key) => ipcRenderer.invoke("save-agent-key", key),
+ onAgentStartRecording: registerListener("agent-start-recording", (callback) => () => callback()),
+ onAgentStopRecording: registerListener("agent-stop-recording", (callback) => () => callback()),
+ onAgentToggleRecording: registerListener("agent-toggle-recording", (callback) => () => callback()),
+ toggleAgentOverlay: () => ipcRenderer.invoke("toggle-agent-overlay"),
+ hideAgentOverlay: () => ipcRenderer.invoke("hide-agent-overlay"),
+ resizeAgentWindow: (width, height) => ipcRenderer.invoke("resize-agent-window", width, height),
+ acquireRecordingLock: (pipeline) => ipcRenderer.invoke("acquire-recording-lock", pipeline),
+ releaseRecordingLock: (pipeline) => ipcRenderer.invoke("release-recording-lock", pipeline),
+
+ // Agent cloud streaming
+ cloudAgentStream: (messages, opts) =>
+ ipcRenderer.invoke("cloud-agent-stream", messages, opts),
+ onAgentStreamChunk: registerListener(
+ "agent-stream-chunk",
+ (callback) => (_event, chunk) => callback(chunk)
+ ),
+ onAgentStreamDone: registerListener("agent-stream-done", (callback) => () => callback()),
+
+ // Agent conversation persistence
+ createAgentConversation: (title) =>
+ ipcRenderer.invoke("db-create-agent-conversation", title),
+ getAgentConversations: (limit) =>
+ ipcRenderer.invoke("db-get-agent-conversations", limit),
+ getAgentConversation: (id) =>
+ ipcRenderer.invoke("db-get-agent-conversation", id),
+ deleteAgentConversation: (id) =>
+ ipcRenderer.invoke("db-delete-agent-conversation", id),
+ updateAgentConversationTitle: (id, title) =>
+ ipcRenderer.invoke("db-update-agent-conversation-title", id, title),
+ addAgentMessage: (conversationId, role, content) =>
+ ipcRenderer.invoke("db-add-agent-message", conversationId, role, content),
+ getAgentMessages: (conversationId) =>
+ ipcRenderer.invoke("db-get-agent-messages", conversationId),
++
+ // Google Calendar
+ gcalStartOAuth: () => ipcRenderer.invoke("gcal-start-oauth"),
+ gcalDisconnect: () => ipcRenderer.invoke("gcal-disconnect"),
+ gcalGetConnectionStatus: () => ipcRenderer.invoke("gcal-get-connection-status"),
+ gcalGetCalendars: () => ipcRenderer.invoke("gcal-get-calendars"),
+ gcalSetCalendarSelection: (calendarId, isSelected) =>
+ ipcRenderer.invoke("gcal-set-calendar-selection", calendarId, isSelected),
+ gcalSyncEvents: () => ipcRenderer.invoke("gcal-sync-events"),
+ gcalGetUpcomingEvents: (windowMinutes) =>
+ ipcRenderer.invoke("gcal-get-upcoming-events", windowMinutes),
+
+ // Desktop audio capture
+ getDesktopSources: (types) => ipcRenderer.invoke("get-desktop-sources", types),
+
+ // Google Calendar event listeners
+ onGcalMeetingStarting: registerListener(
+ "gcal-meeting-starting",
+ (callback) => (_event, data) => callback(data)
+ ),
+ onGcalMeetingEnded: registerListener(
+ "gcal-meeting-ended",
+ (callback) => (_event, data) => callback(data)
+ ),
+ onGcalStartRecording: registerListener(
+ "gcal-start-recording",
+ (callback) => (_event, data) => callback(data)
+ ),
+ onGcalConnectionChanged: registerListener(
+ "gcal-connection-changed",
+ (callback) => (_event, data) => callback(data)
+ ),
+ onGcalEventsSynced: registerListener(
+ "gcal-events-synced",
+ (callback) => (_event, data) => callback(data)
+ ),
+
+ // Meeting detection
+ meetingDetectionGetPreferences: () => ipcRenderer.invoke("meeting-detection-get-preferences"),
+ meetingDetectionSetPreferences: (prefs) =>
+ ipcRenderer.invoke("meeting-detection-set-preferences", prefs),
+ meetingDetectionRespond: (detectionId, action) =>
+ ipcRenderer.invoke("meeting-detection-respond", detectionId, action),
+ onMeetingDetected: registerListener(
+ "meeting-detected",
+ (callback) => (_event, data) => callback(data)
+ ),
+ onMeetingDetectedStartRecording: registerListener(
+ "meeting-detected-start-recording",
+ (callback) => (_event, data) => callback(data)
+ ),
+ onMeetingNotificationData: registerListener(
+ "meeting-notification-data",
+ (callback) => (_event, data) => callback(data)
+ ),
+ getMeetingNotificationData: () => ipcRenderer.invoke("get-meeting-notification-data"),
+ meetingNotificationRespond: (detectionId, action) =>
+ ipcRenderer.invoke("meeting-notification-respond", detectionId, action),
+ onNavigateToMeetingNote: registerListener(
+ "navigate-to-meeting-note",
+ (callback) => (_event, data) => callback(data)
+ ),
});
diff --cc src/helpers/database.js
index 51533d68a,5063a6530..a5e6f2832
--- a/src/helpers/database.js
+++ b/src/helpers/database.js
@@@ -553,111 -614,299 +637,404 @@@ class DatabaseManager
}
}
+ createAgentConversation(title = "Untitled") {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ const result = this.db
+ .prepare("INSERT INTO agent_conversations (title) VALUES (?)")
+ .run(title);
+ return this.db
+ .prepare("SELECT * FROM agent_conversations WHERE id = ?")
+ .get(result.lastInsertRowid);
+ } catch (error) {
+ debugLogger.error("Error creating agent conversation", { error: error.message }, "database");
+ throw error;
+ }
+ }
+
+ getAgentConversations(limit = 50) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ return this.db
+ .prepare("SELECT * FROM agent_conversations ORDER BY updated_at DESC LIMIT ?")
+ .all(limit);
+ } catch (error) {
+ debugLogger.error("Error getting agent conversations", { error: error.message }, "database");
+ throw error;
+ }
+ }
+
+ getAgentConversation(id) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ const conversation = this.db
+ .prepare("SELECT * FROM agent_conversations WHERE id = ?")
+ .get(id);
+ if (!conversation) return null;
+ const messages = this.db
+ .prepare("SELECT * FROM agent_messages WHERE conversation_id = ? ORDER BY created_at ASC")
+ .all(id);
+ return { ...conversation, messages };
+ } catch (error) {
+ debugLogger.error("Error getting agent conversation", { error: error.message }, "database");
+ throw error;
+ }
+ }
+
+ deleteAgentConversation(id) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ this.db.prepare("DELETE FROM agent_messages WHERE conversation_id = ?").run(id);
+ const result = this.db.prepare("DELETE FROM agent_conversations WHERE id = ?").run(id);
+ return { success: result.changes > 0 };
+ } catch (error) {
+ debugLogger.error("Error deleting agent conversation", { error: error.message }, "database");
+ throw error;
+ }
+ }
+
+ updateAgentConversationTitle(id, title) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ this.db
+ .prepare(
+ "UPDATE agent_conversations SET title = ?, updated_at = CURRENT_TIMESTAMP WHERE id = ?"
+ )
+ .run(title, id);
+ return { success: true };
+ } catch (error) {
+ debugLogger.error(
+ "Error updating agent conversation title",
+ { error: error.message },
+ "database"
+ );
+ throw error;
+ }
+ }
+
+ saveGoogleTokens(tokens) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ const stmt = this.db.prepare(
+ `INSERT INTO google_calendar_tokens (google_email, access_token, refresh_token, expires_at, scope)
+ VALUES (?, ?, ?, ?, ?)
+ ON CONFLICT(google_email) DO UPDATE SET
+ access_token = excluded.access_token,
+ refresh_token = excluded.refresh_token,
+ expires_at = excluded.expires_at,
+ scope = excluded.scope,
+ updated_at = CURRENT_TIMESTAMP`
+ );
+ stmt.run(
+ tokens.google_email,
+ tokens.access_token,
+ tokens.refresh_token,
+ tokens.expires_at,
+ tokens.scope
+ );
+ return { success: true };
+ } catch (error) {
+ debugLogger.error("Error saving Google tokens", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ getGoogleTokens() {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ return this.db.prepare("SELECT * FROM google_calendar_tokens LIMIT 1").get() || null;
+ } catch (error) {
+ debugLogger.error("Error getting Google tokens", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ getGoogleTokensByEmail(email) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ return (
+ this.db.prepare("SELECT * FROM google_calendar_tokens WHERE google_email = ?").get(email) ||
+ null
+ );
+ } catch (error) {
+ debugLogger.error("Error getting Google tokens by email", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ addAgentMessage(conversationId, role, content) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ const result = this.db
+ .prepare("INSERT INTO agent_messages (conversation_id, role, content) VALUES (?, ?, ?)")
+ .run(conversationId, role, content);
+ this.db
+ .prepare("UPDATE agent_conversations SET updated_at = CURRENT_TIMESTAMP WHERE id = ?")
+ .run(conversationId);
+ return this.db
+ .prepare("SELECT * FROM agent_messages WHERE id = ?")
+ .get(result.lastInsertRowid);
+ } catch (error) {
+ debugLogger.error("Error adding agent message", { error: error.message }, "database");
+ throw error;
+ }
+ }
+
+ getAllGoogleTokens() {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ return this.db.prepare("SELECT * FROM google_calendar_tokens").all();
+ } catch (error) {
+ debugLogger.error("Error getting all Google tokens", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ getGoogleAccounts() {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ return this.db
+ .prepare("SELECT google_email AS email FROM google_calendar_tokens ORDER BY created_at ASC")
+ .all();
+ } catch (error) {
+ debugLogger.error("Error getting Google accounts", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ removeGoogleAccount(email) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ const transaction = this.db.transaction(() => {
+ const calendarIds = this.db
+ .prepare("SELECT id FROM google_calendars WHERE account_email = ?")
+ .all(email)
+ .map((c) => c.id);
+ if (calendarIds.length > 0) {
+ const placeholders = calendarIds.map(() => "?").join(", ");
+ this.db
+ .prepare(`DELETE FROM calendar_events WHERE calendar_id IN (${placeholders})`)
+ .run(...calendarIds);
+ }
+ this.db.prepare("DELETE FROM google_calendars WHERE account_email = ?").run(email);
+ this.db.prepare("DELETE FROM google_calendar_tokens WHERE google_email = ?").run(email);
+ });
+ transaction();
+ return { success: true };
+ } catch (error) {
+ debugLogger.error("Error removing Google account", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ deleteGoogleTokens() {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ this.db.prepare("DELETE FROM google_calendar_tokens").run();
+ return { success: true };
+ } catch (error) {
+ debugLogger.error("Error deleting Google tokens", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ saveGoogleCalendars(calendars, accountEmail = null) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ const stmt = this.db.prepare(
+ `INSERT INTO google_calendars (id, summary, description, background_color, account_email)
+ VALUES (?, ?, ?, ?, ?)
+ ON CONFLICT(id) DO UPDATE SET
+ summary = excluded.summary,
+ description = excluded.description,
+ background_color = excluded.background_color,
+ account_email = excluded.account_email`
+ );
+ for (const cal of calendars) {
+ stmt.run(
+ cal.id,
+ cal.summary,
+ cal.description || null,
+ cal.background_color || null,
+ accountEmail
+ );
+ }
+ return { success: true };
+ } catch (error) {
+ debugLogger.error("Error saving Google calendars", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ getGoogleCalendars(accountEmail = null) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ if (accountEmail) {
+ return this.db
+ .prepare("SELECT * FROM google_calendars WHERE account_email = ?")
+ .all(accountEmail);
+ }
+ return this.db.prepare("SELECT * FROM google_calendars").all();
+ } catch (error) {
+ debugLogger.error("Error getting Google calendars", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ updateCalendarSelection(calendarId, isSelected) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ this.db
+ .prepare("UPDATE google_calendars SET is_selected = ? WHERE id = ?")
+ .run(isSelected ? 1 : 0, calendarId);
+ return { success: true };
+ } catch (error) {
+ debugLogger.error("Error updating calendar selection", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ getAgentMessages(conversationId) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ return this.db
+ .prepare("SELECT * FROM agent_messages WHERE conversation_id = ? ORDER BY created_at ASC")
+ .all(conversationId);
+ } catch (error) {
+ debugLogger.error("Error getting agent messages", { error: error.message }, "database");
+ throw error;
+ }
+ }
+
+ getSelectedCalendars(accountEmail = null) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ if (accountEmail) {
+ return this.db
+ .prepare("SELECT * FROM google_calendars WHERE is_selected = 1 AND account_email = ?")
+ .all(accountEmail);
+ }
+ return this.db.prepare("SELECT * FROM google_calendars WHERE is_selected = 1").all();
+ } catch (error) {
+ debugLogger.error("Error getting selected calendars", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ upsertCalendarEvents(events) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ const transaction = this.db.transaction((eventList) => {
+ const stmt = this.db.prepare(
+ "INSERT OR REPLACE INTO calendar_events (id, calendar_id, summary, start_time, end_time, is_all_day, status, hangout_link, conference_data, organizer_email, attendees_count, synced_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP)"
+ );
+ for (const e of eventList) {
+ stmt.run(
+ e.id,
+ e.calendar_id,
+ e.summary || null,
+ e.start_time,
+ e.end_time,
+ e.is_all_day ? 1 : 0,
+ e.status || "confirmed",
+ e.hangout_link || null,
+ e.conference_data || null,
+ e.organizer_email || null,
+ e.attendees_count || 0
+ );
+ }
+ });
+ transaction(events);
+ return { success: true };
+ } catch (error) {
+ debugLogger.error("Error upserting calendar events", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ getActiveEvents() {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ return this.db
+ .prepare(
+ "SELECT * FROM calendar_events WHERE datetime(start_time) <= datetime('now') AND datetime(end_time) > datetime('now') AND is_all_day = 0 AND status = 'confirmed' ORDER BY start_time ASC"
+ )
+ .all();
+ } catch (error) {
+ debugLogger.error("Error getting active events", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ getUpcomingEvents(windowMinutes = 1440) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ return this.db
+ .prepare(
+ "SELECT * FROM calendar_events WHERE datetime(start_time) > datetime('now') AND datetime(start_time) <= datetime('now', '+' || ? || ' minutes') AND is_all_day = 0 AND status = 'confirmed' ORDER BY start_time ASC"
+ )
+ .all(windowMinutes);
+ } catch (error) {
+ debugLogger.error("Error getting upcoming events", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ clearCalendarData() {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ const transaction = this.db.transaction(() => {
+ this.db.prepare("DELETE FROM calendar_events").run();
+ this.db.prepare("DELETE FROM google_calendars").run();
+ this.db.prepare("DELETE FROM google_calendar_tokens").run();
+ });
+ transaction();
+ return { success: true };
+ } catch (error) {
+ debugLogger.error("Error clearing calendar data", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ updateCalendarSyncToken(calendarId, syncToken) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ this.db
+ .prepare("UPDATE google_calendars SET sync_token = ? WHERE id = ?")
+ .run(syncToken, calendarId);
+ return { success: true };
+ } catch (error) {
+ debugLogger.error("Error updating sync token", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ removeCalendarEvents(eventIds) {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ const placeholders = eventIds.map(() => "?").join(", ");
+ this.db.prepare(`DELETE FROM calendar_events WHERE id IN (${placeholders})`).run(...eventIds);
+ return { success: true };
+ } catch (error) {
+ debugLogger.error("Error removing calendar events", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
+ getMeetingsFolder() {
+ try {
+ if (!this.db) throw new Error("Database not initialized");
+ return (
+ this.db
+ .prepare("SELECT id FROM folders WHERE name = 'Meetings' AND is_default = 1")
+ .get() || null
+ );
+ } catch (error) {
+ debugLogger.error("Error getting meetings folder", { error: error.message }, "gcal");
+ throw error;
+ }
+ }
+
cleanup() {
try {
const dbPath = path.join(
diff --cc src/helpers/ipcHandlers.js
index c23b235cd,ff74fbb5f..edc769cd9
--- a/src/helpers/ipcHandlers.js
+++ b/src/helpers/ipcHandlers.js
@@@ -2964,53 -3204,124 +3298,172 @@@ class IPCHandlers
return this.deepgramStreaming.getStatus();
});
+ // Agent mode handlers
+ ipcMain.handle("update-agent-hotkey", async (_event, hotkey) => {
+ const hotkeyManager = this.windowManager.hotkeyManager;
+ const agentCallback = this.windowManager._agentHotkeyCallback;
+ if (!agentCallback) {
+ return { success: false, message: "Agent hotkey callback not initialized" };
+ }
+ return hotkeyManager.registerSlot("agent", hotkey, agentCallback);
+ });
+
+ ipcMain.handle("get-agent-key", async () => {
+ return this.environmentManager.getAgentKey?.() || "";
+ });
+
+ ipcMain.handle("save-agent-key", async (_event, key) => {
+ return this.environmentManager.saveAgentKey?.(key) || { success: true };
+ });
+
+ ipcMain.handle("toggle-agent-overlay", async () => {
+ this.windowManager.toggleAgentOverlay();
+ return { success: true };
+ });
+
+ ipcMain.handle("hide-agent-overlay", async () => {
+ this.windowManager.hideAgentOverlay();
+ return { success: true };
+ });
+
+ ipcMain.handle("resize-agent-window", async (_event, width, height) => {
+ this.windowManager.resizeAgentWindow(width, height);
+ return { success: true };
+ });
+
+ ipcMain.handle("acquire-recording-lock", async (_event, pipeline) => {
+ if (this._activeRecordingPipeline && this._activeRecordingPipeline !== pipeline) {
+ return { success: false, holder: this._activeRecordingPipeline };
+ }
+ this._activeRecordingPipeline = pipeline;
+ return { success: true };
+ });
+
+ ipcMain.handle("release-recording-lock", async (_event, pipeline) => {
+ if (this._activeRecordingPipeline === pipeline) {
+ this._activeRecordingPipeline = null;
+ }
+ return { success: true };
+ });
++
+ // Google Calendar
+ ipcMain.handle("gcal-start-oauth", async () => {
+ try {
+ return await this.googleCalendarManager.startOAuth();
+ } catch (error) {
+ debugLogger.error("Google Calendar OAuth failed", { error: error.message }, "calendar");
+ return { success: false, error: error.message };
+ }
+ });
+
+ ipcMain.handle("gcal-disconnect", async () => {
+ try {
+ this.googleCalendarManager.disconnect();
+ return { success: true };
+ } catch (error) {
+ debugLogger.error(
+ "Google Calendar disconnect failed",
+ { error: error.message },
+ "calendar"
+ );
+ return { success: false, error: error.message };
+ }
+ });
+
+ ipcMain.handle("gcal-get-connection-status", async () => {
+ try {
+ return this.googleCalendarManager.getConnectionStatus();
+ } catch (error) {
+ return { connected: false, email: null };
+ }
+ });
+
+ ipcMain.handle("gcal-get-calendars", async () => {
+ try {
+ return { success: true, calendars: this.googleCalendarManager.getCalendars() };
+ } catch (error) {
+ return { success: false, calendars: [] };
+ }
+ });
+
+ ipcMain.handle("gcal-set-calendar-selection", async (_event, calendarId, isSelected) => {
+ try {
+ await this.googleCalendarManager.setCalendarSelection(calendarId, isSelected);
+ return { success: true };
+ } catch (error) {
+ return { success: false, error: error.message };
+ }
+ });
+
+ ipcMain.handle("gcal-sync-events", async () => {
+ try {
+ await this.googleCalendarManager.syncEvents();
+ return { success: true };
+ } catch (error) {
+ return { success: false, error: error.message };
+ }
+ });
+
+ ipcMain.handle("gcal-get-upcoming-events", async (_event, windowMinutes) => {
+ try {
+ return {
+ success: true,
+ events: await this.googleCalendarManager.getUpcomingEvents(windowMinutes),
+ };
+ } catch (error) {
+ return { success: false, events: [] };
+ }
+ });
+
+ ipcMain.handle("meeting-detection-get-preferences", async () => {
+ try {
+ return { success: true, preferences: this.meetingDetectionEngine.getPreferences() };
+ } catch (error) {
+ return { success: false, error: error.message };
+ }
+ });
+
+ ipcMain.handle("meeting-detection-set-preferences", async (_event, prefs) => {
+ try {
+ this.meetingDetectionEngine.setPreferences(prefs);
+ return { success: true };
+ } catch (error) {
+ return { success: false, error: error.message };
+ }
+ });
+
+ ipcMain.handle("meeting-detection-respond", async (_event, detectionId, action) => {
+ try {
+ this.meetingDetectionEngine.handleUserResponse(detectionId, action);
+ return { success: true };
+ } catch (error) {
+ return { success: false, error: error.message };
+ }
+ });
+
+ ipcMain.handle("meeting-notification-respond", async (_event, detectionId, action) => {
+ try {
+ await this.meetingDetectionEngine.handleNotificationResponse(detectionId, action);
+ return { success: true };
+ } catch (error) {
+ return { success: false, error: error.message };
+ }
+ });
+
+ ipcMain.handle("get-meeting-notification-data", async () => {
+ return this.windowManager?._pendingNotificationData ?? null;
+ });
+
+ ipcMain.handle("get-desktop-sources", async (_event, types) => {
+ try {
+ const { desktopCapturer } = require("electron");
+ const sources = await desktopCapturer.getSources({ types: types || ["screen"] });
+ return sources.map((s) => ({ id: s.id, name: s.name }));
+ } catch (error) {
+ debugLogger.error("Failed to get desktop sources", { error: error.message }, "calendar");
+ return [];
+ }
+ });
}
broadcastToWindows(channel, payload) {
diff --cc src/helpers/windowConfig.js
index 998a65f21,c13746700..b1914961b
--- a/src/helpers/windowConfig.js
+++ b/src/helpers/windowConfig.js
@@@ -138,7 -152,7 +183,8 @@@ const AGENT_OVERLAY_CONFIG =
module.exports = {
MAIN_WINDOW_CONFIG,
CONTROL_PANEL_CONFIG,
+ AGENT_OVERLAY_CONFIG,
+ NOTIFICATION_WINDOW_CONFIG,
WINDOW_SIZES,
WindowPositionUtil,
};
diff --cc src/helpers/windowManager.js
index dd0b24cc1,bc530cbda..5bf5a5087
--- a/src/helpers/windowManager.js
+++ b/src/helpers/windowManager.js
@@@ -10,7 -10,7 +10,8 @@@ const { DEV_SERVER_PORT } = DevServerMa
const {
MAIN_WINDOW_CONFIG,
CONTROL_PANEL_CONFIG,
+ AGENT_OVERLAY_CONFIG,
+ NOTIFICATION_WINDOW_CONFIG,
WINDOW_SIZES,
WindowPositionUtil,
} = require("./windowConfig");
@@@ -19,7 -19,8 +20,9 @@@ class WindowManager
constructor() {
this.mainWindow = null;
this.controlPanelWindow = null;
+ this.agentWindow = null;
+ this.notificationWindow = null;
+ this._notificationTimeout = null;
this.tray = null;
this.hotkeyManager = new HotkeyManager();
this.dragManager = new DragManager();
diff --cc src/locales/de/translation.json
index 4212b43be,3c0a919a6..efc638fb5
--- a/src/locales/de/translation.json
+++ b/src/locales/de/translation.json
@@@ -1589,46 -1598,30 +1602,72 @@@
"closeTab": "Du kannst diesen Tab schließen."
}
},
+ "agentMode": {
+ "settings": {
+ "title": "Agent-Modus",
+ "description": "Sprach-Chat-Assistent mit separatem KI-Modell",
+ "enabled": "Agent-Modus aktivieren",
+ "enabledDescription": "Verwende eine separate Tastenkombination, um ein Sprach-Chat-Overlay zu öffnen",
+ "hotkey": "Agent-Tastenkombination",
+ "hotkeyDescription": "Tastenkombination zum Umschalten des Agent-Overlays",
+ "model": "Agent-Modell",
+ "modelDescription": "KI-Modell für Agent-Unterhaltungen",
+ "systemPrompt": "System-Prompt",
+ "systemPromptDescription": "Benutzerdefinierte Anweisungen für den Agenten",
+ "systemPromptPlaceholder": "Benutzerdefinierten System-Prompt eingeben...",
+ "openwhisprCloud": "OpenWhispr Cloud",
+ "openwhisprCloudDescription": "OpenWhisprs Cloud-KI für Agent-Unterhaltungen verwenden",
+ "customSetup": "Eigene Konfiguration (BYOK)",
+ "customSetupDescription": "Eigene API-Schlüssel verwenden und bevorzugtes Modell auswählen"
+ },
+ "chat": {
+ "placeholder": "Drücke {{hotkey}} zum Sprechen",
+ "thinking": "Denkt nach...",
+ "transcribing": "Transkribiert...",
+ "listening": "Hört zu...",
+ "newConversation": "Neu",
+ "copyToClipboard": "In Zwischenablage kopieren",
+ "copied": "Kopiert!",
+ "emptyState": "{{hotkey}} gedrückt halten, um eine Unterhaltung zu starten",
+ "errorPrefix": "Fehler"
+ },
+ "titleBar": {
+ "label": "Agent",
+ "newChat": "Neues Gespräch",
+ "close": "Schließen"
+ },
+ "input": {
+ "holdToSpeak": "Gedrückt halten zum Sprechen",
+ "toClose": "schließen",
+ "listening": "Hört zu...",
+ "transcribing": "Transkribiert...",
+ "thinking": "Denkt nach..."
+ }
++ },
+ "integrations": {
+ "title": "Integrationen",
+ "description": "Verbinde Dienste, um deinen Workflow zu verbessern",
+ "googleCalendar": {
+ "title": "Google Calendar",
+ "description": "Verbinde deinen Kalender, um Besprechungsnotizen zu aktivieren. OpenWhispr erkennt Meetings und zeichnet mit Sprechererkennung auf — automatisch.",
+ "connect": "Google Calendar verbinden",
+ "connecting": "Verbinde...",
+ "connected": "Verbunden",
+ "addAnother": "Weiteren Kalender hinzufügen",
+ "disconnect": "Trennen",
+ "disconnectConfirm": "{{email}} trennen?",
+ "disconnectDescription": "Besprechungsnotizen werden von diesem Kalender nicht mehr aufgezeichnet."
+ },
+ "plan": {
+ "title": "Dein Plan",
+ "current": "Aktuell",
+ "free": "Kostenlos",
+ "freeLimit": "5 Meetings / Monat",
+ "essential": "Essential",
+ "essentialLimit": "20 Meetings / Monat",
+ "pro": "Pro",
+ "proLimit": "Unbegrenzt",
+ "upgrade": "Upgrade"
+ }
}
}
diff --cc src/locales/en/translation.json
index c9965aea1,e83672412..86da14f7f
--- a/src/locales/en/translation.json
+++ b/src/locales/en/translation.json
@@@ -1589,46 -1629,30 +1633,72 @@@
"closeTab": "You can close this tab."
}
},
+ "agentMode": {
+ "settings": {
+ "title": "Agent Mode",
+ "description": "Voice chat assistant with a separate AI model",
+ "enabled": "Enable Agent Mode",
+ "enabledDescription": "Use a separate hotkey to open a voice chat overlay",
+ "hotkey": "Agent Hotkey",
+ "hotkeyDescription": "Hotkey to toggle the agent overlay",
+ "model": "Agent Model",
+ "modelDescription": "AI model used for agent conversations",
+ "systemPrompt": "System Prompt",
+ "systemPromptDescription": "Custom instructions for the agent",
+ "systemPromptPlaceholder": "Enter custom system prompt...",
+ "openwhisprCloud": "OpenWhispr Cloud",
+ "openwhisprCloudDescription": "Use OpenWhispr's cloud AI for agent conversations",
+ "customSetup": "Custom Setup (BYOK)",
+ "customSetupDescription": "Use your own API keys and choose your preferred model"
+ },
+ "chat": {
+ "placeholder": "Press {{hotkey}} to speak",
+ "thinking": "Thinking...",
+ "transcribing": "Transcribing...",
+ "listening": "Listening...",
+ "newConversation": "New",
+ "copyToClipboard": "Copy to clipboard",
+ "copied": "Copied!",
+ "emptyState": "Hold {{hotkey}} to start a conversation",
+ "errorPrefix": "Error"
+ },
+ "titleBar": {
+ "label": "Agent",
+ "newChat": "New conversation",
+ "close": "Close"
+ },
+ "input": {
+ "holdToSpeak": "Hold to speak",
+ "toClose": "close",
+ "listening": "Listening...",
+ "transcribing": "Transcribing...",
+ "thinking": "Thinking..."
+ }
++ },
+ "integrations": {
+ "title": "Integrations",
+ "description": "Connect services to supercharge your workflow",
+ "googleCalendar": {
+ "title": "Google Calendar",
+ "description": "Connect your calendar to activate meeting notes. OpenWhispr detects meetings and records with speaker diarization — automatically.",
+ "connect": "Connect Google Calendar",
+ "connecting": "Connecting...",
+ "connected": "Connected",
+ "addAnother": "Add another calendar",
+ "disconnect": "Disconnect",
+ "disconnectConfirm": "Disconnect {{email}}?",
+ "disconnectDescription": "Meeting notes will no longer be recorded from this calendar."
+ },
+ "plan": {
+ "title": "Your Plan",
+ "current": "Current",
+ "free": "Free",
+ "freeLimit": "5 meetings / month",
+ "essential": "Essential",
+ "essentialLimit": "20 meetings / month",
+ "pro": "Pro",
+ "proLimit": "Unlimited",
+ "upgrade": "Upgrade"
+ }
}
}
diff --cc src/locales/es/translation.json
index fa7db7793,b57ffa8eb..c0032f239
--- a/src/locales/es/translation.json
+++ b/src/locales/es/translation.json
@@@ -1593,46 -1602,30 +1606,72 @@@
"closeTab": "Puedes cerrar esta pestaña."
}
},
+ "agentMode": {
+ "settings": {
+ "title": "Modo Agente",
+ "description": "Asistente de chat por voz con un modelo de IA separado",
+ "enabled": "Activar Modo Agente",
+ "enabledDescription": "Usa una tecla de acceso rápido separada para abrir una superposición de chat por voz",
+ "hotkey": "Tecla del Agente",
+ "hotkeyDescription": "Tecla de acceso rápido para alternar la superposición del agente",
+ "model": "Modelo del Agente",
+ "modelDescription": "Modelo de IA utilizado para conversaciones del agente",
+ "systemPrompt": "Prompt del Sistema",
+ "systemPromptDescription": "Instrucciones personalizadas para el agente",
+ "systemPromptPlaceholder": "Introduce un prompt de sistema personalizado...",
+ "openwhisprCloud": "OpenWhispr Cloud",
+ "openwhisprCloudDescription": "Usar la IA en la nube de OpenWhispr para conversaciones del agente",
+ "customSetup": "Configuración personalizada (BYOK)",
+ "customSetupDescription": "Usa tus propias claves API y elige tu modelo preferido"
+ },
+ "chat": {
+ "placeholder": "Presiona {{hotkey}} para hablar",
+ "thinking": "Pensando...",
+ "transcribing": "Transcribiendo...",
+ "listening": "Escuchando...",
+ "newConversation": "Nuevo",
+ "copyToClipboard": "Copiar al portapapeles",
+ "copied": "¡Copiado!",
+ "emptyState": "Mantén {{hotkey}} para iniciar una conversación",
+ "errorPrefix": "Error"
+ },
+ "titleBar": {
+ "label": "Agente",
+ "newChat": "Nueva conversación",
+ "close": "Cerrar"
+ },
+ "input": {
+ "holdToSpeak": "Mantén para hablar",
+ "toClose": "cerrar",
+ "listening": "Escuchando...",
+ "transcribing": "Transcribiendo...",
+ "thinking": "Pensando..."
+ }
++ },
+ "integrations": {
+ "title": "Integraciones",
+ "description": "Conecta servicios para potenciar tu flujo de trabajo",
+ "googleCalendar": {
+ "title": "Google Calendar",
+ "description": "Conecta tu calendario para activar notas de reuniones. OpenWhispr detecta reuniones y graba con diarización de hablantes — automáticamente.",
+ "connect": "Conectar Google Calendar",
+ "connecting": "Conectando...",
+ "connected": "Conectado",
+ "addAnother": "Añadir otro calendario",
+ "disconnect": "Desconectar",
+ "disconnectConfirm": "¿Desconectar {{email}}?",
+ "disconnectDescription": "Ya no se grabarán notas de reuniones de este calendario."
+ },
+ "plan": {
+ "title": "Tu Plan",
+ "current": "Actual",
+ "free": "Gratis",
+ "freeLimit": "5 reuniones / mes",
+ "essential": "Essential",
+ "essentialLimit": "20 reuniones / mes",
+ "pro": "Pro",
+ "proLimit": "Ilimitado",
+ "upgrade": "Mejorar"
+ }
}
}
diff --cc src/locales/fr/translation.json
index 3c2a2c194,d9a94ef31..06ab2c457
--- a/src/locales/fr/translation.json
+++ b/src/locales/fr/translation.json
@@@ -1593,46 -1602,30 +1606,72 @@@
"closeTab": "Vous pouvez fermer cet onglet."
}
},
+ "agentMode": {
+ "settings": {
+ "title": "Mode Agent",
+ "description": "Assistant vocal de chat avec un modèle IA séparé",
+ "enabled": "Activer le Mode Agent",
+ "enabledDescription": "Utiliser un raccourci clavier séparé pour ouvrir une fenêtre de chat vocal",
+ "hotkey": "Raccourci Agent",
+ "hotkeyDescription": "Raccourci clavier pour basculer la fenêtre agent",
+ "model": "Modèle Agent",
+ "modelDescription": "Modèle IA utilisé pour les conversations agent",
+ "systemPrompt": "Prompt système",
+ "systemPromptDescription": "Instructions personnalisées pour l'agent",
+ "systemPromptPlaceholder": "Entrez un prompt système personnalisé...",
+ "openwhisprCloud": "OpenWhispr Cloud",
+ "openwhisprCloudDescription": "Utiliser l'IA cloud d'OpenWhispr pour les conversations agent",
+ "customSetup": "Configuration personnalisée (BYOK)",
+ "customSetupDescription": "Utiliser vos propres clés API et choisir votre modèle préféré"
+ },
+ "chat": {
+ "placeholder": "Appuyez sur {{hotkey}} pour parler",
+ "thinking": "Réflexion...",
+ "transcribing": "Transcription...",
+ "listening": "Écoute...",
+ "newConversation": "Nouveau",
+ "copyToClipboard": "Copier dans le presse-papiers",
+ "copied": "Copié !",
+ "emptyState": "Maintenez {{hotkey}} pour démarrer une conversation",
+ "errorPrefix": "Erreur"
+ },
+ "titleBar": {
+ "label": "Agent",
+ "newChat": "Nouvelle conversation",
+ "close": "Fermer"
+ },
+ "input": {
+ "holdToSpeak": "Maintenez pour parler",
+ "toClose": "fermer",
+ "listening": "Écoute...",
+ "transcribing": "Transcription...",
+ "thinking": "Réflexion..."
+ }
++ },
+ "integrations": {
+ "title": "Intégrations",
+ "description": "Connectez des services pour booster votre productivité",
+ "googleCalendar": {
+ "title": "Google Calendar",
+ "description": "Connectez votre calendrier pour activer les notes de réunion. OpenWhispr détecte vos réunions et enregistre avec diarisation — automatiquement.",
+ "connect": "Connecter Google Calendar",
+ "connecting": "Connexion...",
+ "connected": "Connecté",
+ "addAnother": "Ajouter un autre calendrier",
+ "disconnect": "Déconnecter",
+ "disconnectConfirm": "Déconnecter {{email}} ?",
+ "disconnectDescription": "Les notes de réunion ne seront plus enregistrées depuis ce calendrier."
+ },
+ "plan": {
+ "title": "Votre forfait",
+ "current": "Actuel",
+ "free": "Gratuit",
+ "freeLimit": "5 réunions / mois",
+ "essential": "Essential",
+ "essentialLimit": "20 réunions / mois",
+ "pro": "Pro",
+ "proLimit": "Illimité",
+ "upgrade": "Passer au supérieur"
+ }
}
}
diff --cc src/locales/it/translation.json
index bd59206c8,09abc39ab..ccc4a131f
--- a/src/locales/it/translation.json
+++ b/src/locales/it/translation.json
@@@ -1593,46 -1602,30 +1606,72 @@@
"closeTab": "Puoi chiudere questa scheda."
}
},
+ "agentMode": {
+ "settings": {
+ "title": "Modalità Agente",
+ "description": "Assistente vocale chat con un modello IA separato",
+ "enabled": "Abilita Modalità Agente",
+ "enabledDescription": "Usa un tasto di scelta rapida separato per aprire un overlay di chat vocale",
+ "hotkey": "Tasto Agente",
+ "hotkeyDescription": "Tasto di scelta rapida per alternare l'overlay agente",
+ "model": "Modello Agente",
+ "modelDescription": "Modello IA utilizzato per le conversazioni agente",
+ "systemPrompt": "Prompt di Sistema",
+ "systemPromptDescription": "Istruzioni personalizzate per l'agente",
+ "systemPromptPlaceholder": "Inserisci un prompt di sistema personalizzato...",
+ "openwhisprCloud": "OpenWhispr Cloud",
+ "openwhisprCloudDescription": "Usa l'IA cloud di OpenWhispr per le conversazioni agente",
+ "customSetup": "Configurazione personalizzata (BYOK)",
+ "customSetupDescription": "Usa le tue chiavi API e scegli il modello che preferisci"
+ },
+ "chat": {
+ "placeholder": "Premi {{hotkey}} per parlare",
+ "thinking": "Pensando...",
+ "transcribing": "Trascrivendo...",
+ "listening": "Ascoltando...",
+ "newConversation": "Nuovo",
+ "copyToClipboard": "Copia negli appunti",
+ "copied": "Copiato!",
+ "emptyState": "Tieni premuto {{hotkey}} per iniziare una conversazione",
+ "errorPrefix": "Errore"
+ },
+ "titleBar": {
+ "label": "Agente",
+ "newChat": "Nuova conversazione",
+ "close": "Chiudi"
+ },
+ "input": {
+ "holdToSpeak": "Tieni premuto per parlare",
+ "toClose": "chiudi",
+ "listening": "Ascolto...",
+ "transcribing": "Trascrizione...",
+ "thinking": "Pensiero..."
+ }
++ },
+ "integrations": {
+ "title": "Integrazioni",
+ "description": "Collega servizi per potenziare il tuo flusso di lavoro",
+ "googleCalendar": {
+ "title": "Google Calendar",
+ "description": "Collega il tuo calendario per attivare le note delle riunioni. OpenWhispr rileva le riunioni e registra con diarizzazione dei parlanti — automaticamente.",
+ "connect": "Collega Google Calendar",
+ "connecting": "Connessione...",
+ "connected": "Connesso",
+ "addAnother": "Aggiungi un altro calendario",
+ "disconnect": "Disconnetti",
+ "disconnectConfirm": "Disconnettere {{email}}?",
+ "disconnectDescription": "Le note delle riunioni non saranno più registrate da questo calendario."
+ },
+ "plan": {
+ "title": "Il tuo Piano",
+ "current": "Attuale",
+ "free": "Gratis",
+ "freeLimit": "5 riunioni / mese",
+ "essential": "Essential",
+ "essentialLimit": "20 riunioni / mese",
+ "pro": "Pro",
+ "proLimit": "Illimitato",
+ "upgrade": "Aggiorna"
+ }
}
}
diff --cc src/locales/ja/translation.json
index f073584e2,654ff7484..3d62e5ce5
--- a/src/locales/ja/translation.json
+++ b/src/locales/ja/translation.json
@@@ -1589,46 -1598,30 +1602,72 @@@
"closeTab": "このタブを閉じてください。"
}
},
+ "agentMode": {
+ "settings": {
+ "title": "エージェントモード",
+ "description": "別のAIモデルを使用する音声チャットアシスタント",
+ "enabled": "エージェントモードを有効にする",
+ "enabledDescription": "別のホットキーを使用して音声チャットオーバーレイを開く",
+ "hotkey": "エージェントホットキー",
+ "hotkeyDescription": "エージェントオーバーレイを切り替えるホットキー",
+ "model": "エージェントモデル",
+ "modelDescription": "エージェント会話に使用するAIモデル",
+ "systemPrompt": "システムプロンプト",
+ "systemPromptDescription": "エージェントへのカスタム指示",
+ "systemPromptPlaceholder": "カスタムシステムプロンプトを入力...",
+ "openwhisprCloud": "OpenWhispr Cloud",
+ "openwhisprCloudDescription": "OpenWhisprのクラウドAIをエージェント会話に使用する",
+ "customSetup": "カスタム設定 (BYOK)",
+ "customSetupDescription": "自分のAPIキーを使用してお好みのモデルを選択する"
+ },
+ "chat": {
+ "placeholder": "{{hotkey}}を押して話す",
+ "thinking": "考え中...",
+ "transcribing": "文字起こし中...",
+ "listening": "聞いています...",
+ "newConversation": "新規",
+ "copyToClipboard": "クリップボードにコピー",
+ "copied": "コピーしました!",
+ "emptyState": "{{hotkey}} を長押しして会話を開始",
+ "errorPrefix": "エラー"
+ },
+ "titleBar": {
+ "label": "エージェント",
+ "newChat": "新しい会話",
+ "close": "閉じる"
+ },
+ "input": {
+ "holdToSpeak": "長押しして話す",
+ "toClose": "閉じる",
+ "listening": "聞いています...",
+ "transcribing": "文字起こし中...",
+ "thinking": "考え中..."
+ }
++ },
+ "integrations": {
+ "title": "連携",
+ "description": "サービスを接続してワークフローを強化",
+ "googleCalendar": {
+ "title": "Google カレンダー",
+ "description": "カレンダーを接続して会議メモを有効にします。OpenWhisprが会議を検出し、話者分離付きで自動的に録音します。",
+ "connect": "Google カレンダーを接続",
+ "connecting": "接続中...",
+ "connected": "接続済み",
+ "addAnother": "別のカレンダーを追加",
+ "disconnect": "切断",
+ "disconnectConfirm": "{{email}} を切断しますか?",
+ "disconnectDescription": "このカレンダーからの会議メモは記録されなくなります。"
+ },
+ "plan": {
+ "title": "プラン",
+ "current": "現在",
+ "free": "無料",
+ "freeLimit": "月5回の会議",
+ "essential": "Essential",
+ "essentialLimit": "月20回の会議",
+ "pro": "Pro",
+ "proLimit": "無制限",
+ "upgrade": "アップグレード"
+ }
}
}
diff --cc src/locales/pt/translation.json
index 8ccbc42ad,725fb1127..7a7e9ed21
--- a/src/locales/pt/translation.json
+++ b/src/locales/pt/translation.json
@@@ -1592,47 -1601,31 +1605,73 @@@
"redirectTitle": "Redirecionando para o app...",
"closeTab": "Você pode fechar esta aba."
}
+ },
+ "agentMode": {
+ "settings": {
+ "title": "Modo Agente",
+ "description": "Assistente de chat por voz com um modelo de IA separado",
+ "enabled": "Ativar Modo Agente",
+ "enabledDescription": "Usar uma tecla de atalho separada para abrir uma sobreposição de chat por voz",
+ "hotkey": "Tecla do Agente",
+ "hotkeyDescription": "Tecla de atalho para alternar a sobreposição do agente",
+ "model": "Modelo do Agente",
+ "modelDescription": "Modelo de IA usado para conversas do agente",
+ "systemPrompt": "Prompt do Sistema",
+ "systemPromptDescription": "Instruções personalizadas para o agente",
+ "systemPromptPlaceholder": "Digite um prompt de sistema personalizado...",
+ "openwhisprCloud": "OpenWhispr Cloud",
+ "openwhisprCloudDescription": "Usar a IA na nuvem da OpenWhispr para conversas do agente",
+ "customSetup": "Configuração personalizada (BYOK)",
+ "customSetupDescription": "Use suas próprias chaves API e escolha seu modelo preferido"
+ },
+ "chat": {
+ "placeholder": "Pressione {{hotkey}} para falar",
+ "thinking": "Pensando...",
+ "transcribing": "Transcrevendo...",
+ "listening": "Ouvindo...",
+ "newConversation": "Novo",
+ "copyToClipboard": "Copiar para área de transferência",
+ "copied": "Copiado!",
+ "emptyState": "Segure {{hotkey}} para iniciar uma conversa",
+ "errorPrefix": "Erro"
+ },
+ "titleBar": {
+ "label": "Agente",
+ "newChat": "Nova conversa",
+ "close": "Fechar"
+ },
+ "input": {
+ "holdToSpeak": "Segure para falar",
+ "toClose": "fechar",
+ "listening": "Ouvindo...",
+ "transcribing": "Transcrevendo...",
+ "thinking": "Pensando..."
+ }
+ },
+ "integrations": {
+ "title": "Integrações",
+ "description": "Conecte serviços para turbinar seu fluxo de trabalho",
+ "googleCalendar": {
+ "title": "Google Calendar",
+ "description": "Conecte seu calendário para ativar notas de reunião. O OpenWhispr detecta reuniões e grava com diarização de falantes — automaticamente.",
+ "connect": "Conectar Google Calendar",
+ "connecting": "Conectando...",
+ "connected": "Conectado",
+ "addAnother": "Adicionar outro calendário",
+ "disconnect": "Desconectar",
+ "disconnectConfirm": "Desconectar {{email}}?",
+ "disconnectDescription": "As notas de reunião não serão mais gravadas deste calendário."
+ },
+ "plan": {
+ "title": "Seu Plano",
+ "current": "Atual",
+ "free": "Grátis",
+ "freeLimit": "5 reuniões / mês",
+ "essential": "Essential",
+ "essentialLimit": "20 reuniões / mês",
+ "pro": "Pro",
+ "proLimit": "Ilimitado",
+ "upgrade": "Atualizar"
+ }
}
}
diff --cc src/locales/ru/translation.json
index 58097b633,a22cda251..e167dafca
--- a/src/locales/ru/translation.json
+++ b/src/locales/ru/translation.json
@@@ -1593,46 -1602,30 +1606,72 @@@
"closeTab": "Можете закрыть эту вкладку."
}
},
+ "agentMode": {
+ "settings": {
+ "title": "Режим агента",
+ "description": "Голосовой чат-ассистент с отдельной моделью ИИ",
+ "enabled": "Включить режим агента",
+ "enabledDescription": "Используйте отдельную горячую клавишу для открытия наложения голосового чата",
+ "hotkey": "Горячая клавиша агента",
+ "hotkeyDescription": "Горячая клавиша для переключения наложения агента",
+ "model": "Модель агента",
+ "modelDescription": "Модель ИИ для разговоров с агентом",
+ "systemPrompt": "Системный промпт",
+ "systemPromptDescription": "Пользовательские инструкции для агента",
+ "systemPromptPlaceholder": "Введите пользовательский системный промпт...",
+ "openwhisprCloud": "OpenWhispr Cloud",
+ "openwhisprCloudDescription": "Использовать облачный ИИ OpenWhispr для разговоров с агентом",
+ "customSetup": "Своя настройка (BYOK)",
+ "customSetupDescription": "Используйте собственные API-ключи и выберите предпочтительную модель"
+ },
+ "chat": {
+ "placeholder": "Нажмите {{hotkey}} чтобы говорить",
+ "thinking": "Думаю...",
+ "transcribing": "Транскрибирую...",
+ "listening": "Слушаю...",
+ "newConversation": "Новый",
+ "copyToClipboard": "Копировать в буфер обмена",
+ "copied": "Скопировано!",
+ "emptyState": "Удерживайте {{hotkey}}, чтобы начать разговор",
+ "errorPrefix": "Ошибка"
+ },
+ "titleBar": {
+ "label": "Агент",
+ "newChat": "Новый разговор",
+ "close": "Закрыть"
+ },
+ "input": {
+ "holdToSpeak": "Удерживайте для разговора",
+ "toClose": "закрыть",
+ "listening": "Слушаю...",
+ "transcribing": "Транскрибирую...",
+ "thinking": "Думаю..."
+ }
++ },
+ "integrations": {
+ "title": "Интеграции",
+ "description": "Подключите сервисы для улучшения рабочего процесса",
+ "googleCalendar": {
+ "title": "Google Calendar",
+ "description": "Подключите календарь для активации заметок встреч. OpenWhispr определяет встречи и записывает с диаризацией говорящих — автоматически.",
+ "connect": "Подключить Google Calendar",
+ "connecting": "Подключение...",
+ "connected": "Подключено",
+ "addAnother": "Добавить ещё один календарь",
+ "disconnect": "Отключить",
+ "disconnectConfirm": "Отключить {{email}}?",
+ "disconnectDescription": "Заметки встреч больше не будут записываться из этого календаря."
+ },
+ "plan": {
+ "title": "Ваш план",
+ "current": "Текущий",
+ "free": "Бесплатный",
+ "freeLimit": "5 встреч / месяц",
+ "essential": "Essential",
+ "essentialLimit": "20 встреч / месяц",
+ "pro": "Pro",
+ "proLimit": "Безлимитно",
+ "upgrade": "Улучшить"
+ }
}
}
diff --cc src/locales/zh-CN/translation.json
index a11411226,1360d8d81..b01fb6f3b
--- a/src/locales/zh-CN/translation.json
+++ b/src/locales/zh-CN/translation.json
@@@ -1589,46 -1598,30 +1602,72 @@@
"closeTab": "您可以关闭此标签页。"
}
},
+ "agentMode": {
+ "settings": {
+ "title": "智能助手模式",
+ "description": "使用独立AI模型的语音聊天助手",
+ "enabled": "启用智能助手模式",
+ "enabledDescription": "使用独立热键打开语音聊天覆盖层",
+ "hotkey": "助手热键",
+ "hotkeyDescription": "切换助手覆盖层的热键",
+ "model": "助手模型",
+ "modelDescription": "用于助手对话的AI模型",
+ "systemPrompt": "系统提示词",
+ "systemPromptDescription": "助手的自定义指令",
+ "systemPromptPlaceholder": "输入自定义系统提示词...",
+ "openwhisprCloud": "OpenWhispr Cloud",
+ "openwhisprCloudDescription": "使用 OpenWhispr 的云端 AI 进行助手对话",
+ "customSetup": "自定义配置 (BYOK)",
+ "customSetupDescription": "使用自己的 API 密钥并选择偏好的模型"
+ },
+ "chat": {
+ "placeholder": "按 {{hotkey}} 开始说话",
+ "thinking": "思考中...",
+ "transcribing": "转录中...",
+ "listening": "正在聆听...",
+ "newConversation": "新建",
+ "copyToClipboard": "复制到剪贴板",
+ "copied": "已复制!",
+ "emptyState": "按住 {{hotkey}} 开始对话",
+ "errorPrefix": "错误"
+ },
+ "titleBar": {
+ "label": "助手",
+ "newChat": "新对话",
+ "close": "关闭"
+ },
+ "input": {
+ "holdToSpeak": "按住说话",
+ "toClose": "关闭",
+ "listening": "正在聆听...",
+ "transcribing": "正在转录...",
+ "thinking": "正在思考..."
+ }
++ },
+ "integrations": {
+ "title": "集成",
+ "description": "连接服务以增强您的工作流程",
+ "googleCalendar": {
+ "title": "Google 日历",
+ "description": "连接日历以启用会议笔记。OpenWhispr 会自动检测会议并进行说话人分离录音。",
+ "connect": "连接 Google 日历",
+ "connecting": "连接中...",
+ "connected": "已连接",
+ "addAnother": "添加其他日历",
+ "disconnect": "断开",
+ "disconnectConfirm": "断开 {{email}}?",
+ "disconnectDescription": "将不再从此日历记录会议笔记。"
+ },
+ "plan": {
+ "title": "您的方案",
+ "current": "当前",
+ "free": "免费",
+ "freeLimit": "每月5次会议",
+ "essential": "Essential",
+ "essentialLimit": "每月20次会议",
+ "pro": "Pro",
+ "proLimit": "无限",
+ "upgrade": "升级"
+ }
}
}
diff --cc src/locales/zh-TW/translation.json
index 4d659ad6d,4892c44aa..e14fdd15d
--- a/src/locales/zh-TW/translation.json
+++ b/src/locales/zh-TW/translation.json
@@@ -1589,46 -1598,30 +1602,72 @@@
"closeTab": "您可以關閉此分頁。"
}
},
+ "agentMode": {
+ "settings": {
+ "title": "智慧助手模式",
+ "description": "使用獨立AI模型的語音聊天助手",
+ "enabled": "啟用智慧助手模式",
+ "enabledDescription": "使用獨立熱鍵開啟語音聊天覆蓋層",
+ "hotkey": "助手熱鍵",
+ "hotkeyDescription": "切換助手覆蓋層的熱鍵",
+ "model": "助手模型",
+ "modelDescription": "用於助手對話的AI模型",
+ "systemPrompt": "系統提示詞",
+ "systemPromptDescription": "助手的自訂指令",
+ "systemPromptPlaceholder": "輸入自訂系統提示詞...",
+ "openwhisprCloud": "OpenWhispr Cloud",
+ "openwhisprCloudDescription": "使用 OpenWhispr 的雲端 AI 進行助手對話",
+ "customSetup": "自訂配置 (BYOK)",
+ "customSetupDescription": "使用自己的 API 金鑰並選擇偏好的模型"
+ },
+ "chat": {
+ "placeholder": "按 {{hotkey}} 開始說話",
+ "thinking": "思考中...",
+ "transcribing": "轉錄中...",
+ "listening": "正在聆聽...",
+ "newConversation": "新建",
+ "copyToClipboard": "複製到剪貼簿",
+ "copied": "已複製!",
+ "emptyState": "按住 {{hotkey}} 開始對話",
+ "errorPrefix": "錯誤"
+ },
+ "titleBar": {
+ "label": "助手",
+ "newChat": "新對話",
+ "close": "關閉"
+ },
+ "input": {
+ "holdToSpeak": "按住說話",
+ "toClose": "關閉",
+ "listening": "正在聆聽...",
+ "transcribing": "正在轉錄...",
+ "thinking": "正在思考..."
+ }
++ },
+ "integrations": {
+ "title": "整合",
+ "description": "連接服務以增強您的工作流程",
+ "googleCalendar": {
+ "title": "Google 日曆",
+ "description": "連接日曆以啟用會議筆記。OpenWhispr 會自動偵測會議並進行說話者分離錄音。",
+ "connect": "連接 Google 日曆",
+ "connecting": "連接中...",
+ "connected": "已連接",
+ "addAnother": "新增其他日曆",
+ "disconnect": "中斷連接",
+ "disconnectConfirm": "中斷 {{email}} 的連接?",
+ "disconnectDescription": "將不再從此日曆記錄會議筆記。"
+ },
+ "plan": {
+ "title": "您的方案",
+ "current": "目前",
+ "free": "免費",
+ "freeLimit": "每月5次會議",
+ "essential": "Essential",
+ "essentialLimit": "每月20次會議",
+ "pro": "Pro",
+ "proLimit": "無限",
+ "upgrade": "升級"
+ }
}
}
diff --cc src/main.jsx
index 7c88dbb6d,9c06e1fb7..71680a76a
--- a/src/main.jsx
+++ b/src/main.jsx
@@@ -15,10 -15,11 +15,13 @@@ import "./index.css"
const controlPanelImport = () => import("./components/ControlPanel.tsx");
const onboardingFlowImport = () => import("./components/OnboardingFlow.tsx");
+const agentOverlayImport = () => import("./components/AgentOverlay.tsx");
const ControlPanel = React.lazy(controlPanelImport);
const OnboardingFlow = React.lazy(onboardingFlowImport);
+const AgentOverlay = React.lazy(agentOverlayImport);
+ const MeetingNotificationOverlay = React.lazy(
+ () => import("./components/MeetingNotificationOverlay.tsx")
+ );
let root = null;
diff --cc src/stores/settingsStore.ts
index 9fecdd4a5,518638a0a..24b697884
--- a/src/stores/settingsStore.ts
+++ b/src/stores/settingsStore.ts
@@@ -56,11 -56,12 +57,13 @@@ const BOOLEAN_SETTINGS = new Set(
"telemetryEnabled",
"audioCuesEnabled",
"floatingIconAutoHide",
+ "meetingProcessDetection",
+ "meetingAudioDetection",
"isSignedIn",
+ "agentEnabled",
]);
- const ARRAY_SETTINGS = new Set(["customDictionary"]);
+ const ARRAY_SETTINGS = new Set(["customDictionary", "gcalAccounts"]);
const LANGUAGE_MIGRATIONS: Record<string, string> = { zh: "zh-CN" };
@@@ -128,15 -133,11 +136,18 @@@ export interface SettingsStat
setTelemetryEnabled: (value: boolean) => void;
setAudioCuesEnabled: (value: boolean) => void;
setFloatingIconAutoHide: (enabled: boolean) => void;
+ setGcalAccounts: (accounts: GoogleCalendarAccount[]) => void;
+ setMeetingProcessDetection: (value: boolean) => void;
+ setMeetingAudioDetection: (value: boolean) => void;
setIsSignedIn: (value: boolean) => void;
+ setAgentModel: (value: string) => void;
+ setAgentProvider: (value: string) => void;
+ setAgentKey: (key: string) => void;
+ setAgentSystemPrompt: (value: string) => void;
+ setAgentEnabled: (value: boolean) => void;
+ setCloudAgentMode: (value: string) => void;
+
updateTranscriptionSettings: (settings: Partial<TranscriptionSettings>) => void;
updateReasoningSettings: (settings: Partial<ReasoningSettings>) => void;
updateApiKeys: (keys: Partial<ApiKeySettings>) => void;
@@@ -247,15 -247,24 +258,31 @@@ export const useSettingsStore = create<
telemetryEnabled: readBoolean("telemetryEnabled", false),
audioCuesEnabled: readBoolean("audioCuesEnabled", true),
floatingIconAutoHide: readBoolean("floatingIconAutoHide", false),
+ ...(() => {
+ let accounts: GoogleCalendarAccount[] = [];
+ try {
+ const parsed = JSON.parse(readString("gcalAccounts", "[]"));
+ if (Array.isArray(parsed)) accounts = parsed;
+ } catch {
+ /* use empty default */
+ }
+ return {
+ gcalAccounts: accounts,
+ gcalConnected: accounts.length > 0,
+ gcalEmail: accounts[0]?.email ?? "",
+ };
+ })(),
+ meetingProcessDetection: readBoolean("meetingProcessDetection", true),
+ meetingAudioDetection: readBoolean("meetingAudioDetection", true),
isSignedIn: readBoolean("isSignedIn", false),
+ agentModel: readString("agentModel", "openai/gpt-oss-120b"),
+ agentProvider: readString("agentProvider", "groq"),
+ agentKey: readString("agentKey", ""),
+ agentSystemPrompt: readString("agentSystemPrompt", ""),
+ agentEnabled: readBoolean("agentEnabled", true),
+ cloudAgentMode: readString("cloudAgentMode", "openwhispr"),
+
setUseLocalWhisper: createBooleanSetter("useLocalWhisper"),
setWhisperModel: createStringSetter("whisperModel"),
setLocalTranscriptionProvider: (value: LocalTranscriptionProvider) => {
diff --cc src/types/electron.ts
index 83debff4b,bc055857e..b6f5de109
--- a/src/types/electron.ts
+++ b/src/types/electron.ts
@@@ -947,20 -906,87 +960,102 @@@ declare global
callback: (data: { audioDuration?: number; text?: string }) => void
) => () => void;
+ // Agent overlay
+ resizeAgentWindow?: (width: number, height: number) => Promise<void>;
+ hideAgentOverlay?: () => Promise<void>;
+ onAgentStartRecording?: (callback: () => void) => () => void;
+ onAgentStopRecording?: (callback: () => void) => () => void;
+ onAgentToggleRecording?: (callback: () => void) => () => void;
+
+ // Agent cloud streaming
+ cloudAgentStream?: (
+ messages: Array<{ role: string; content: string }>,
+ opts?: { systemPrompt?: string }
+ ) => Promise<{ success: boolean; error?: string; code?: string }>;
+ onAgentStreamChunk?: (callback: (chunk: string) => void) => () => void;
+ onAgentStreamDone?: (callback: () => void) => () => void;
++
+ // Google Calendar
+ gcalStartOAuth?: () => Promise<{ success: boolean; email?: string; error?: string }>;
+ gcalDisconnect?: (email?: string) => Promise<{ success: boolean; error?: string }>;
+ gcalGetConnectionStatus?: () => Promise<{
+ connected: boolean;
+ accounts: Array<{ email: string }>;
+ email: string | null;
+ }>;
+ gcalGetCalendars?: () => Promise<{ success: boolean; calendars: any[] }>;
+ gcalSetCalendarSelection?: (
+ calendarId: string,
+ isSelected: boolean
+ ) => Promise<{ success: boolean; error?: string }>;
+ gcalSyncEvents?: () => Promise<{ success: boolean; error?: string }>;
+ gcalGetUpcomingEvents?: (
+ windowMinutes?: number
+ ) => Promise<{ success: boolean; events: any[] }>;
+
+ // Meeting chain transcription (BaseTen)
+ meetingTranscribeChain?: (
+ blobUrl: string,
+ opts?: {
+ skipCleanup?: boolean;
+ agentName?: string;
+ customDictionary?: string[];
+ }
+ ) => Promise<{
+ success: boolean;
+ text?: string;
+ rawText?: string;
+ cleanedText?: string;
+ processingDurationSec?: number;
+ speedupFactor?: number;
+ error?: string;
+ }>;
+
+ // Meeting transcription (streaming)
+ meetingTranscriptionStart?: (options: {
+ provider?: string;
+ model?: string;
+ language?: string;
+ }) => Promise<{ success: boolean; error?: string }>;
+ meetingTranscriptionSend?: (buffer: ArrayBuffer) => void;
+ meetingTranscriptionStop?: () => Promise<{
+ success: boolean;
+ transcript?: string;
+ error?: string;
+ }>;
+ onMeetingTranscriptionPartial?: (callback: (text: string) => void) => () => void;
+ onMeetingTranscriptionFinal?: (callback: (text: string) => void) => () => void;
+ onMeetingTranscriptionError?: (callback: (error: string) => void) => () => void;
+
+ // Desktop audio capture
+ getDesktopSources?: (types: string[]) => Promise<Array<{ id: string; name: string }>>;
+
+ // Google Calendar event listeners
+ onGcalMeetingStarting?: (callback: (data: any) => void) => () => void;
+ onGcalMeetingEnded?: (callback: (data: any) => void) => () => void;
+ onGcalStartRecording?: (callback: (data: any) => void) => () => void;
+ onGcalConnectionChanged?: (callback: (data: any) => void) => () => void;
+ onGcalEventsSynced?: (callback: (data: any) => void) => () => void;
+
+ meetingDetectionGetPreferences?: () => Promise<{ success: boolean; preferences?: any }>;
+ meetingDetectionSetPreferences?: (
+ prefs: Record<string, boolean>
+ ) => Promise<{ success: boolean }>;
+ meetingDetectionRespond?: (
+ detectionId: string,
+ action: string
+ ) => Promise<{ success: boolean }>;
+ onMeetingDetected?: (callback: (data: any) => void) => () => void;
+ onMeetingDetectedStartRecording?: (callback: (data: any) => void) => () => void;
+ onMeetingNotificationData?: (callback: (data: any) => void) => () => void;
+ getMeetingNotificationData?: () => Promise<any>;
+ meetingNotificationRespond?: (
+ detectionId: string,
+ action: string
+ ) => Promise<{ success: boolean }>;
+ onNavigateToMeetingNote?: (
+ callback: (data: { noteId: number; folderId: number; event: any }) => void
+ ) => () => void;
};
api?: {