Skip to content

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

refactor(agent): remove mic and hotkey from agent overlay input

Gabriel Stein8924001febbe
diff --git a/src/components/agent/AgentChat.tsx b/src/components/agent/AgentChat.tsx
index 398b58a38..975dbb0ef 100644
--- a/src/components/agent/AgentChat.tsx
+++ b/src/components/agent/AgentChat.tsx
@@ -1,7 +1,4 @@
-import { Mic } from "lucide-react";
import { useTranslation } from "react-i18next";
-import { useSettingsStore } from "../../stores/settingsStore";
-import { formatHotkeyLabel } from "../../utils/hotkeys";
import { ChatMessages } from "../chat/ChatMessages";
import type { Message } from "../chat/types";
@@ -13,28 +10,15 @@ interface AgentChatProps {
export function AgentChat({ messages }: AgentChatProps) {
const { t } = useTranslation();
- const agentKey = useSettingsStore((s) => s.agentKey);
- const hotkeyLabel = formatHotkeyLabel(agentKey);
return (
<ChatMessages
messages={messages}
emptyState={
- <div className="flex flex-col items-center justify-center h-full gap-2 select-none">
- <div
- className="text-muted-foreground/30"
- style={{ animation: "agent-mic-pulse 3s ease-in-out infinite" }}
- >
- <Mic size={20} />
- </div>
- <div className="text-center">
- <p className="text-[12px] text-muted-foreground/50">
- {t("agentMode.chat.emptyState", { hotkey: hotkeyLabel })}
- </p>
- <p className="text-[11px] text-muted-foreground/30 mt-0.5">
- {t("agentMode.chat.orType")}
- </p>
- </div>
+ <div className="flex items-center justify-center h-full select-none">
+ <p className="text-[12px] text-muted-foreground/30">
+ {t("agentMode.chat.orType")}
+ </p>
</div>
}
/>
diff --git a/src/components/agent/AgentInput.tsx b/src/components/agent/AgentInput.tsx
index 298f446c0..dd7824412 100644
--- a/src/components/agent/AgentInput.tsx
+++ b/src/components/agent/AgentInput.tsx
@@ -9,5 +9,5 @@ interface AgentInputProps {
}
export function AgentInput(props: AgentInputProps) {
- return <ChatInput {...props} showHotkey={true} />;
+ return <ChatInput {...props} autoFocus />;
}
diff --git a/src/components/chat/ChatInput.tsx b/src/components/chat/ChatInput.tsx
index de1e70bdf..4a35cb95e 100644
--- a/src/components/chat/ChatInput.tsx
+++ b/src/components/chat/ChatInput.tsx
@@ -1,55 +1,17 @@
import { useState, useRef, useCallback, useEffect } from "react";
-import { Mic, SendHorizontal, Square } from "lucide-react";
+import { SendHorizontal, Square } from "lucide-react";
import { useTranslation } from "react-i18next";
import { cn } from "../lib/utils";
-import { useSettingsStore } from "../../stores/settingsStore";
-import { formatHotkeyLabel, isGlobeLikeHotkey } from "../../utils/hotkeys";
import type { AgentState } from "./types";
+
interface ChatInputProps {
agentState: AgentState;
partialTranscript: string;
onTextSubmit?: (text: string) => void;
onCancel?: () => void;
- showHotkey?: boolean;
autoFocus?: boolean;
}
-function Kbd({ children }: { children: React.ReactNode }) {
- return (
- <kbd
- className={cn(
- "inline-flex items-center justify-center",
- "min-w-5 h-4.5 px-1.5",
- "text-[10px] font-medium leading-none",
- "text-muted-foreground/70",
- "bg-foreground/6 border border-foreground/8",
- "rounded-sm",
- "shadow-[0_1px_0_0_rgba(0,0,0,0.04)]"
- )}
- >
- {children}
- </kbd>
- );
-}
-
-function HotkeyKeys({ hotkey }: { hotkey: string }) {
- const label = formatHotkeyLabel(hotkey);
-
- if (isGlobeLikeHotkey(hotkey) || !label.includes("+")) {
- return <Kbd>{label}</Kbd>;
- }
-
- const parts = label.split("+");
-
- return (
- <span className="inline-flex items-center gap-0.5">
- {parts.map((part, i) => (
- <Kbd key={i}>{part}</Kbd>
- ))}
- </span>
- );
-}
-
function RecordingIndicator() {
return (
<div className="relative flex items-center justify-center w-5 h-5 shrink-0">
@@ -83,11 +45,9 @@ export function ChatInput({
partialTranscript,
onTextSubmit,
onCancel,
- showHotkey = false,
autoFocus = false,
}: ChatInputProps) {
const { t } = useTranslation();
- const agentKey = useSettingsStore((s) => s.agentKey);
const [inputText, setInputText] = useState("");
const inputRef = useRef<HTMLInputElement>(null);
@@ -180,33 +140,20 @@ export function ChatInput({
<Square size={12} className="fill-current" />
</button>
) : isIdle ? (
- <div className="flex items-center gap-1 shrink-0">
- {showHotkey && (
- <div className="flex items-center gap-2 mr-1">
- <div
- className="text-muted-foreground/50"
- style={{ animation: "agent-mic-pulse 2.5s ease-in-out infinite" }}
- >
- <Mic size={14} />
- </div>
- <HotkeyKeys hotkey={agentKey} />
- </div>
+ <button
+ onClick={handleSubmit}
+ disabled={!inputText.trim()}
+ className={cn(
+ "p-1 rounded-sm shrink-0",
+ "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring/30",
+ "transition-colors duration-100",
+ inputText.trim()
+ ? "text-primary hover:text-primary/80"
+ : "text-muted-foreground/25 cursor-default"
)}
- <button
- onClick={handleSubmit}
- disabled={!inputText.trim()}
- className={cn(
- "p-1 rounded-sm",
- "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring/30",
- "transition-colors duration-100",
- inputText.trim()
- ? "text-primary hover:text-primary/80"
- : "text-muted-foreground/25 cursor-default"
- )}
- >
- <SendHorizontal size={14} />
- </button>
- </div>
+ >
+ <SendHorizontal size={14} />
+ </button>
) : null}
</div>
)}
diff --git a/src/components/notes/EmbeddedChat.tsx b/src/components/notes/EmbeddedChat.tsx
index 8e8ebe254..9264374e4 100644
--- a/src/components/notes/EmbeddedChat.tsx
+++ b/src/components/notes/EmbeddedChat.tsx
@@ -101,8 +101,6 @@ export default function EmbeddedChat({
partialTranscript=""
onTextSubmit={onTextSubmit}
onCancel={onCancel}
- showHotkey={false}
- autoFocus={false}
/>
</>
);
diff --git a/src/index.css b/src/index.css
index 84a4c58a3..2bc2a69f2 100644
--- a/src/index.css
+++ b/src/index.css
@@ -865,18 +865,6 @@ body:has(.agent-overlay-window) #root {
}
}
-@keyframes agent-mic-pulse {
- 0%,
- 100% {
- opacity: 0.5;
- transform: scale(1);
- }
- 50% {
- opacity: 1;
- transform: scale(1.05);
- }
-}
-
@keyframes thinking-shimmer {
0% {
background-position: 200% 0;