Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix build , change the super to cmd macos shortcuts

shaik-zeeshan021fb9222689
diff --git a/openrewind/components/onboarding/shortcuts.tsx b/openrewind/components/onboarding/shortcuts.tsx
index f0e7ac648..816b5ec32 100644
--- a/openrewind/components/onboarding/shortcuts.tsx
+++ b/openrewind/components/onboarding/shortcuts.tsx
@@ -1,7 +1,8 @@
import React, { useState, useEffect } from "react";
-import { cn } from "@/lib/utils";
+import { cn, parseKeyboardShortcut } from "@/lib/utils";
import { CommandShortcut } from "@/components/ui/command";
import { useSettings } from "@/lib/hooks/use-settings";
+import { usePlatform } from "@/lib/hooks/use-platform";
import { commands } from "@/lib/utils/tauri";
import { Switch } from "@/components/ui/switch";
import { Pencil } from "lucide-react";
@@ -20,15 +21,26 @@ export default function OnboardingShortcuts({
handlePrevSlide,
}: OnboardingShortcutsProps) {
const { settings, updateSettings } = useSettings();
+ const { isMac, isWindows } = usePlatform();
const [recordingShortcut, setRecordingShortcut] = useState<string | null>(null);
+ // Function to convert internal key names to platform-specific display names
+ const getDisplayKey = (key: string): string => {
+ if (key === "Super" || key === "SUPER") {
+ if (isMac) return "Cmd";
+ if (isWindows) return "Win";
+ return "Super"; // fallback for Linux or unknown platforms
+ }
+ return key;
+ };
+
const shortcuts = [
{
- id: "showScreenpipeShortcut",
- title: "Show/Hide Screenpipe",
+ id: "showOpenrewindShortcut",
+ title: "Show/Hide Openrewind",
defaultShortcut: "Super+Alt+S",
- description: "Quickly toggle the Screenpipe interface",
- value: settings.showScreenpipeShortcut,
+ description: "Quickly toggle the Openrewind interface",
+ value: settings.showOpenrewindShortcut,
},
{
id: "startRecordingShortcut",
@@ -107,9 +119,11 @@ export default function OnboardingShortcuts({
const handleEnableShortcut = async (shortcutId: string, keys: string) => {
try {
+ // Convert keys to display format for toast
+ const displayKeys = keys.split("+").map(getDisplayKey).join("+");
toast({
title: "Shortcut updated",
- description: `${shortcutId.replace(/_/g, " ")} set to ${keys}`,
+ description: `${shortcutId.replace(/_/g, " ")} set to ${displayKeys}`,
});
// Update settings
@@ -117,7 +131,7 @@ export default function OnboardingShortcuts({
// Sync with backend
await commands.updateGlobalShortcuts(
- settings.showScreenpipeShortcut,
+ settings.showOpenrewindShortcut,
settings.startRecordingShortcut,
settings.stopRecordingShortcut,
settings.startAudioShortcut,
@@ -148,7 +162,7 @@ export default function OnboardingShortcuts({
});
await commands.updateGlobalShortcuts(
- settings.showScreenpipeShortcut,
+ settings.showOpenrewindShortcut,
settings.startRecordingShortcut,
settings.stopRecordingShortcut,
settings.startAudioShortcut,
@@ -217,17 +231,14 @@ export default function OnboardingShortcuts({
<span className="animate-pulse">recording...</span>
) : (
<span className="flex items-center justify-between gap-2">
- {currentKeys.map((key, i) => (
<kbd
- key={i}
className={cn(
"px-1 rounded",
shortcut.value ? "bg-background/50" : "bg-transparent"
)}
>
- {key}
+ {parseKeyboardShortcut(shortcut.value || "")}
</kbd>
- ))}
<Pencil className="h-3 w-3 opacity-50" />
</span>
)}
diff --git a/openrewind/components/settings/shortcut-row.tsx b/openrewind/components/settings/shortcut-row.tsx
index bff82efb4..789c57805 100644
--- a/openrewind/components/settings/shortcut-row.tsx
+++ b/openrewind/components/settings/shortcut-row.tsx
@@ -84,7 +84,7 @@ const ShortcutRow = ({
}, [isRecording]);
const syncShortcuts = async (updatedShortcuts: {
- showScreenpipeShortcut: string;
+ showOpenrewindShortcut: string;
startRecordingShortcut: string;
stopRecordingShortcut: string;
startAudioShortcut: string;
@@ -92,7 +92,7 @@ const ShortcutRow = ({
pipeShortcuts: Record<string, string>;
}) => {
console.log("syncing shortcuts:", {
- showShortcut: updatedShortcuts.showScreenpipeShortcut,
+ showShortcut: updatedShortcuts.showOpenrewindShortcut,
startShortcut: updatedShortcuts.startRecordingShortcut,
stopShortcut: updatedShortcuts.stopRecordingShortcut,
startAudioShortcut: updatedShortcuts.startAudioShortcut,
@@ -102,7 +102,7 @@ const ShortcutRow = ({
// wait 1 second
await new Promise((resolve) => setTimeout(resolve, 1000));
await commands.updateGlobalShortcuts(
- updatedShortcuts.showScreenpipeShortcut,
+ updatedShortcuts.showOpenrewindShortcut,
updatedShortcuts.startRecordingShortcut,
updatedShortcuts.stopRecordingShortcut,
updatedShortcuts.startAudioShortcut,
@@ -131,7 +131,7 @@ const ShortcutRow = ({
case "global":
updateSettings({ [shortcut]: keys });
await syncShortcuts({
- showScreenpipeShortcut: settings.showScreenpipeShortcut,
+ showOpenrewindShortcut: settings.showOpenrewindShortcut,
startRecordingShortcut: settings.startRecordingShortcut,
stopRecordingShortcut: settings.stopRecordingShortcut,
startAudioShortcut: settings.startAudioShortcut,
@@ -149,7 +149,7 @@ const ShortcutRow = ({
},
});
await syncShortcuts({
- showScreenpipeShortcut: settings.showScreenpipeShortcut,
+ showOpenrewindShortcut: settings.showOpenrewindShortcut,
startRecordingShortcut: settings.startRecordingShortcut,
stopRecordingShortcut: settings.stopRecordingShortcut,
startAudioShortcut: settings.startAudioShortcut,
@@ -184,7 +184,7 @@ const ShortcutRow = ({
});
await syncShortcuts({
- showScreenpipeShortcut: settings.showScreenpipeShortcut,
+ showOpenrewindShortcut: settings.showOpenrewindShortcut,
startRecordingShortcut: settings.startRecordingShortcut,
stopRecordingShortcut: settings.stopRecordingShortcut,
startAudioShortcut: settings.startAudioShortcut,
diff --git a/openrewind/components/settings/shortcut-section.tsx b/openrewind/components/settings/shortcut-section.tsx
index 04a23f9b3..793b42fae 100644
--- a/openrewind/components/settings/shortcut-section.tsx
+++ b/openrewind/components/settings/shortcut-section.tsx
@@ -42,10 +42,10 @@ const ShortcutSection = () => {
<div className="space-y-6">
<ShortcutRow
type="global"
- shortcut="showScreenpipeShortcut"
- title="toggle screenpipe overlay"
+ shortcut="showOpenrewindShortcut"
+ title="toggle openrewind overlay"
description="global shortcut to show/hide the main interface"
- value={settings.showScreenpipeShortcut}
+ value={settings.showOpenrewindShortcut}
/>
<ShortcutRow
diff --git a/openrewind/lib/hooks/use-settings.tsx b/openrewind/lib/hooks/use-settings.tsx
index 3701a9c67..831dddf22 100644
--- a/openrewind/lib/hooks/use-settings.tsx
+++ b/openrewind/lib/hooks/use-settings.tsx
@@ -151,7 +151,7 @@ let DEFAULT_SETTINGS: Settings = {
contact: null,
cloud_subscribed: null
},
- showScreenpipeShortcut: "Super+Alt+S",
+ showOpenrewindShortcut: "Super+Alt+S",
startRecordingShortcut: "Super+Alt+U",
stopRecordingShortcut: "Super+Alt+X",
startAudioShortcut: "",
@@ -162,7 +162,7 @@ let DEFAULT_SETTINGS: Settings = {
disableVision: false,
useAllMonitors: false,
enableRealtimeVision: true,
- };;
+ };
export function createDefaultSettingsObject(): Settings {
try {
diff --git a/openrewind/lib/utils/tauri.ts b/openrewind/lib/utils/tauri.ts
index 9a1f392b0..0c6d3f2aa 100644
--- a/openrewind/lib/utils/tauri.ts
+++ b/openrewind/lib/utils/tauri.ts
@@ -182,7 +182,7 @@ export type OSPermissionStatus = "notNeeded" | "empty" | "granted" | "denied"
export type OSPermissionsCheck = { screenRecording: OSPermissionStatus; microphone: OSPermissionStatus }
export type OnboardingStore = { isCompleted: boolean; completedAt: string | null }
export type Pipe = { id: string; name: string; description: string; version: string; author: string; authorLink: string; repository: string; lastUpdate: string; fullDescription: string; downloads: number; mainFile: string; config: { [key in string]: string } }
-export type SettingsStore = { aiPresets: AIPreset[]; deepgramApiKey: string; isLoading: boolean; installedPipes: Pipe[]; userId: string; devMode: boolean; audioTranscriptionEngine: string; ocrEngine: string; monitorIds: string[]; audioDevices: string[]; usePiiRemoval: boolean; restartInterval: number; port: number; dataDir: string; disableAudio: boolean; ignoredWindows: string[]; includedWindows: string[]; fps: number; vadSensitivity: string; analyticsEnabled: boolean; audioChunkDuration: number; useChineseMirror: boolean; languages: string[]; embeddedLLM: EmbeddedLLM; enableBeta: boolean; isFirstTimeUser: boolean; autoStartEnabled: boolean; enableFrameCache: boolean; enableUiMonitoring: boolean; platform: string; disabledShortcuts: string[]; user: User; showScreenpipeShortcut: string; startRecordingShortcut: string; stopRecordingShortcut: string; startAudioShortcut: string; stopAudioShortcut: string; pipeShortcuts: { [key in string]: string }; enableRealtimeAudioTranscription: boolean; realtimeAudioTranscriptionEngine: string; disableVision: boolean; useAllMonitors: boolean; enableRealtimeVision: boolean }
+export type SettingsStore = { aiPresets: AIPreset[]; deepgramApiKey: string; isLoading: boolean; installedPipes: Pipe[]; userId: string; devMode: boolean; audioTranscriptionEngine: string; ocrEngine: string; monitorIds: string[]; audioDevices: string[]; usePiiRemoval: boolean; restartInterval: number; port: number; dataDir: string; disableAudio: boolean; ignoredWindows: string[]; includedWindows: string[]; fps: number; vadSensitivity: string; analyticsEnabled: boolean; audioChunkDuration: number; useChineseMirror: boolean; languages: string[]; embeddedLLM: EmbeddedLLM; enableBeta: boolean; isFirstTimeUser: boolean; autoStartEnabled: boolean; enableFrameCache: boolean; enableUiMonitoring: boolean; platform: string; disabledShortcuts: string[]; user: User; showOpenrewindShortcut: string; startRecordingShortcut: string; stopRecordingShortcut: string; startAudioShortcut: string; stopAudioShortcut: string; pipeShortcuts: { [key in string]: string }; enableRealtimeAudioTranscription: boolean; realtimeAudioTranscriptionEngine: string; disableVision: boolean; useAllMonitors: boolean; enableRealtimeVision: boolean }
export type ShowRewindWindow = "Main" | { Settings: { page: string | null } } | { Search: { query: string | null } } | "Onboarding"
export type User = { id: string | null; name: string | null; email: string | null; image: string | null; token: string | null; clerk_id: string | null; api_key: string | null; credits: Credits | null; stripe_connected: boolean | null; stripe_account_status: string | null; github_username: string | null; bio: string | null; website: string | null; contact: string | null; cloud_subscribed: boolean | null }
diff --git a/openrewind/lib/utils/validation.ts b/openrewind/lib/utils/validation.ts
index c9ca6b92c..0048d8967 100644
--- a/openrewind/lib/utils/validation.ts
+++ b/openrewind/lib/utils/validation.ts
@@ -94,7 +94,7 @@ export const settingsStoreSchema = z.object({
// Shortcuts
disabledShortcuts: z.array(z.string()),
- showScreenpipeShortcut: z.string(),
+ showOpenrewindShortcut: z.string(),
startRecordingShortcut: z.string(),
stopRecordingShortcut: z.string(),
startAudioShortcut: z.string(),
diff --git a/openrewind/src-tauri/src/main.rs b/openrewind/src-tauri/src/main.rs
index 78ab4a8a0..7f64099a8 100755
--- a/openrewind/src-tauri/src/main.rs
+++ b/openrewind/src-tauri/src/main.rs
@@ -97,7 +97,7 @@ impl ShortcutConfig {
Ok(Self {
show: store
- .show_screenpipe_shortcut,
+ .show_openrewind_shortcut,
start: store
.start_recording_shortcut,
stop: store
diff --git a/openrewind/src-tauri/src/store.rs b/openrewind/src-tauri/src/store.rs
index 1df164f91..4c8b09faa 100644
--- a/openrewind/src-tauri/src/store.rs
+++ b/openrewind/src-tauri/src/store.rs
@@ -1,5 +1,5 @@
use super::get_base_dir;
-use std::{collections::HashMap, sync::Arc};
+use std::sync::Arc;
use serde::{Deserialize, Serialize};
use serde_json::{json, Value};
use specta::Type;
@@ -89,6 +89,7 @@ impl OnboardingStore {
}
#[derive(Serialize, Deserialize,Type,Clone)]
+#[serde(default)]
pub struct SettingsStore {
#[serde(rename = "aiPresets")]
pub ai_presets: Vec<AIPreset>,
@@ -98,8 +99,6 @@ pub struct SettingsStore {
#[serde(rename = "isLoading")]
pub is_loading: bool,
- #[serde(rename = "installedPipes")]
- pub installed_pipes: Vec<Pipe>,
#[serde(rename = "userId")]
pub user_id: String,
@@ -158,8 +157,8 @@ pub struct SettingsStore {
pub disabled_shortcuts: Vec<String>,
#[serde(rename = "user")]
pub user: User,
- #[serde(rename = "showScreenpipeShortcut")]
- pub show_screenpipe_shortcut: String,
+ #[serde(rename = "showOpenrewindShortcut")]
+ pub show_openrewind_shortcut: String,
#[serde(rename = "startRecordingShortcut")]
pub start_recording_shortcut: String,
#[serde(rename = "stopRecordingShortcut")]
@@ -168,8 +167,6 @@ pub struct SettingsStore {
pub start_audio_shortcut: String,
#[serde(rename = "stopAudioShortcut")]
pub stop_audio_shortcut: String,
- #[serde(rename = "pipeShortcuts")]
- pub pipe_shortcuts: HashMap<String, String>,
#[serde(rename = "enableRealtimeAudioTranscription")]
pub enable_realtime_audio_transcription: bool,
#[serde(rename = "realtimeAudioTranscriptionEngine")]
@@ -182,8 +179,9 @@ pub struct SettingsStore {
pub enable_realtime_vision: bool,
}
-#[derive(Serialize, Deserialize, Type,Clone)]
+#[derive(Serialize, Deserialize, Type,Clone,Default)]
pub enum AIProviderType {
+ #[default]
#[serde(rename = "openai")]
OpenAI,
#[serde(rename = "native-ollama")]
@@ -210,6 +208,7 @@ pub struct AIPreset {
}
#[derive(Serialize, Deserialize,Type,Clone)]
+#[serde(default)]
pub struct User {
pub id: Option<String>,
pub name: Option<String>,
@@ -228,40 +227,60 @@ pub struct User {
pub cloud_subscribed: Option<bool>,
}
+impl Default for User {
+ fn default() -> Self {
+ Self {
+ id: None,
+ name: None,
+ email: None,
+ image: None,
+ token: None,
+ clerk_id: None,
+ api_key: None,
+ credits: None,
+ stripe_connected: None,
+ stripe_account_status: None,
+ github_username: None,
+ bio: None,
+ website: None,
+ contact: None,
+ cloud_subscribed: None,
+ }
+ }
+}
+
#[derive(Serialize, Deserialize,Type,Clone)]
+#[serde(default)]
pub struct Credits {
pub amount: u32,
}
-#[derive(Serialize, Deserialize,Type,Clone)]
-pub struct Pipe {
- pub id: String,
- pub name: String,
- pub description: String,
- pub version: String,
- pub author: String,
- #[serde(rename = "authorLink")]
- pub author_link: String,
- #[serde(rename = "repository")]
- pub repository: String,
- #[serde(rename = "lastUpdate")]
- pub last_update: String,
- #[serde(rename = "fullDescription")]
- pub full_description: String,
- #[serde(rename = "downloads")]
- pub downloads: u32,
- #[serde(rename = "mainFile")]
- pub main_file: String,
- pub config: HashMap<String, String>,
+impl Default for Credits {
+ fn default() -> Self {
+ Self {
+ amount: 0,
+ }
+ }
}
#[derive(Serialize, Deserialize,Type,Clone)]
+#[serde(default)]
pub struct EmbeddedLLM {
pub enabled: bool,
pub model: String,
pub port: u16,
}
+impl Default for EmbeddedLLM {
+ fn default() -> Self {
+ Self {
+ enabled: false,
+ model: "llama3.2:1b-instruct-q4_K_M".to_string(),
+ port: 11434,
+ }
+ }
+}
+
impl Default for SettingsStore {
fn default() -> Self {
// Default ignored windows for all OS
@@ -316,7 +335,6 @@ impl Default for SettingsStore {
ai_presets: vec![],
deepgram_api_key: "".to_string(),
is_loading: false,
- installed_pipes: vec![],
user_id: "".to_string(),
dev_mode: false,
@@ -343,11 +361,7 @@ impl Default for SettingsStore {
audio_chunk_duration: 30,
use_chinese_mirror: false,
languages: vec![],
- embedded_llm: EmbeddedLLM {
- enabled: false,
- model: "llama3.2:1b-instruct-q4_K_M".to_string(),
- port: 11434
- },
+ embedded_llm: EmbeddedLLM::default(),
enable_beta: false,
is_first_time_user: true,
auto_start_enabled: true,
@@ -372,12 +386,11 @@ impl Default for SettingsStore {
contact: None,
cloud_subscribed: None,
},
- show_screenpipe_shortcut: "Super+Ctrl+S".to_string(),
+ show_openrewind_shortcut: "Super+Ctrl+S".to_string(),
start_recording_shortcut: "Super+Ctrl+U".to_string(),
stop_recording_shortcut: "Super+Ctrl+X".to_string(),
start_audio_shortcut: "".to_string(),
stop_audio_shortcut: "".to_string(),
- pipe_shortcuts: HashMap::new(),
enable_realtime_audio_transcription: false,
realtime_audio_transcription_engine: "deepgram".to_string(),
disable_vision: false,