Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
feat(chat): redesign thinking/streaming state — shimmer indicator + stop button
Gabriel Stein5d317cc9f018
diff --git a/src/components/AgentOverlay.tsx b/src/components/AgentOverlay.tsxindex 124bd84fc..5eb308976 100644--- a/src/components/AgentOverlay.tsx+++ b/src/components/AgentOverlay.tsx@@ -205,6 +205,7 @@ export default function AgentOverlay() {toolStatus={toolStatus}activeToolName={activeToolName}onTextSubmit={handleTranscriptionComplete}+ onCancel={streaming.cancelStream}/></div>diff --git a/src/components/agent/AgentInput.tsx b/src/components/agent/AgentInput.tsxindex 211e52a0b..714dbde40 100644--- a/src/components/agent/AgentInput.tsx+++ b/src/components/agent/AgentInput.tsx@@ -7,6 +7,7 @@ interface AgentInputProps {toolStatus?: string;activeToolName?: string;onTextSubmit?: (text: string) => void;+ onCancel?: () => void;}export function AgentInput(props: AgentInputProps) {diff --git a/src/components/chat/ChatInput.tsx b/src/components/chat/ChatInput.tsxindex 4885466a2..b31a5e331 100644--- a/src/components/chat/ChatInput.tsx+++ b/src/components/chat/ChatInput.tsx@@ -1,5 +1,5 @@import { useState, useRef, useCallback } from "react";-import { Mic, SendHorizontal } from "lucide-react";+import { Mic, SendHorizontal, Square } from "lucide-react";import { useTranslation } from "react-i18next";import { cn } from "../lib/utils";import { useSettingsStore } from "../../stores/settingsStore";@@ -13,6 +13,7 @@ interface ChatInputProps {toolStatus?: string;activeToolName?: string;onTextSubmit?: (text: string) => void;+ onCancel?: () => void;showHotkey?: boolean;}@@ -80,25 +81,13 @@ function ProcessingIndicator() {);}-function ThinkingIndicator() {- return (- <div- className="w-10 h-0.75 rounded-full shrink-0"- style={{- background: "linear-gradient(90deg, transparent, oklch(0.65 0.2 260 / 0.4), transparent)",- backgroundSize: "200% 100%",- animation: "tool-status-sweep 1.5s ease-in-out infinite",- }}- />- );-}-export function ChatInput({agentState,partialTranscript,toolStatus,activeToolName,onTextSubmit,+ onCancel,showHotkey = false,}: ChatInputProps) {const { t } = useTranslation();@@ -124,31 +113,66 @@ export function ChatInput({);const isIdle = agentState === "idle";+ const isListening = agentState === "listening";+ const isTranscribing = agentState === "transcribing";+ const isBusy = agentState === "thinking" || agentState === "streaming" || agentState === "tool-executing";const ToolIcon = activeToolName ? toolIcons[activeToolName] : null;return (<divclassName={cn(- "flex items-center gap-2 min-h-11 px-3 py-2 shrink-0",+ "flex items-center gap-2 h-10 px-3 shrink-0","bg-surface-1 border-t border-border/30")}>- {isIdle && (- <div className="flex items-center gap-2 w-full">+ {isListening && (+ <>+ <RecordingIndicator />+ <span className="text-[12px] text-foreground/80 truncate flex-1">+ {partialTranscript || t("agentMode.input.listening")}+ </span>+ </>+ )}++ {isTranscribing && (+ <>+ <ProcessingIndicator />+ <span className="text-[12px] text-muted-foreground select-none">+ {t("agentMode.input.transcribing")}+ </span>+ </>+ )}++ {(isIdle || isBusy) && (+ <div className="relative flex items-center gap-2 w-full"><inputref={inputRef}type="text"value={inputText}onChange={(e) => setInputText(e.target.value)}onKeyDown={handleKeyDown}- placeholder={t("agentMode.input.typeMessage")}+ disabled={isBusy}+ placeholder={isBusy ? "" : t("agentMode.input.typeMessage")}className={cn(- "bg-transparent border-none outline-none flex-1",+ "input-inline flex-1 outline-none bg-transparent","text-[13px] text-foreground placeholder:text-muted-foreground/40",- "min-w-0"+ "min-w-0 p-0",+ isBusy && "opacity-0 pointer-events-none")}/>- {inputText.trim() ? (+ {isBusy && (+ <div className="absolute inset-0 flex items-center gap-2 pr-8 pointer-events-none">+ {agentState === "tool-executing" && ToolIcon ? (+ <ToolIcon size={12} className="text-primary/60 shrink-0" />+ ) : null}+ <span className="text-[12px] text-muted-foreground/60 select-none truncate">+ {agentState === "tool-executing" && toolStatus+ ? toolStatus+ : t("agentMode.input.thinking")}+ </span>+ </div>+ )}+ {isIdle && inputText.trim() ? (<buttononClick={handleSubmit}className={cn(@@ -160,7 +184,19 @@ export function ChatInput({><SendHorizontal size={14} /></button>- ) : showHotkey ? (+ ) : isBusy && onCancel ? (+ <button+ onClick={onCancel}+ className={cn(+ "p-1 rounded-sm shrink-0",+ "text-muted-foreground/60 hover:text-foreground hover:bg-foreground/8",+ "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring/30",+ "transition-colors duration-100"+ )}+ >+ <Square size={12} className="fill-current" />+ </button>+ ) : isIdle && showHotkey ? (<div className="flex items-center gap-2 shrink-0"><divclassName="text-muted-foreground/50"@@ -173,46 +209,6 @@ export function ChatInput({) : null}</div>)}-- {agentState === "listening" && (- <>- <RecordingIndicator />- <span className="text-[12px] text-foreground/80 truncate flex-1">- {partialTranscript || t("agentMode.input.listening")}- </span>- </>- )}-- {agentState === "transcribing" && (- <>- <ProcessingIndicator />- <span className="text-[12px] text-muted-foreground select-none">- {t("agentMode.input.transcribing")}- </span>- </>- )}-- {(agentState === "thinking" || agentState === "streaming") && (- <>- <ThinkingIndicator />- <span className="text-[12px] text-muted-foreground select-none">- {t("agentMode.input.thinking")}- </span>- </>- )}-- {agentState === "tool-executing" && (- <>- {ToolIcon ? (- <ToolIcon size={12} className="text-primary/60 shrink-0" />- ) : (- <ThinkingIndicator />- )}- <span className="text-[12px] text-muted-foreground select-none truncate">- {toolStatus || t("agentMode.input.thinking")}- </span>- </>- )}</div>);}diff --git a/src/components/chat/ChatMessage.tsx b/src/components/chat/ChatMessage.tsxindex 2a83265c5..6c00232f6 100644--- a/src/components/chat/ChatMessage.tsx+++ b/src/components/chat/ChatMessage.tsx@@ -241,13 +241,24 @@ export function ChatMessage({ role, content, isStreaming, toolCalls }: ChatMessa/>)}- {isStreaming && (+ {isStreaming && hasContent && (<spanclassName="inline-block w-[2px] h-[14px] bg-foreground/70 align-middle ml-0.5"style={{ animation: "agent-cursor-blink 1s ease-in-out infinite" }}/>)}+ {isStreaming && !hasContent && (+ <div+ className="h-4 w-24 rounded-sm"+ style={{+ background: "linear-gradient(90deg, transparent, var(--color-primary-shimmer, oklch(0.65 0.2 260 / 0.25)), transparent)",+ backgroundSize: "200% 100%",+ animation: "thinking-shimmer 1.8s ease-in-out infinite",+ }}+ />+ )}+{noteCards.length > 0 && !isStreaming && (<div>{noteCards.map((card) => (diff --git a/src/components/chat/ChatView.tsx b/src/components/chat/ChatView.tsxindex 3fd5d2860..55bb70a2f 100644--- a/src/components/chat/ChatView.tsx+++ b/src/components/chat/ChatView.tsx@@ -168,6 +168,7 @@ export default function ChatView() {toolStatus={streaming.toolStatus}activeToolName={streaming.activeToolName}onTextSubmit={handleTextSubmit}+ onCancel={streaming.cancelStream}/></>) : (diff --git a/src/index.css b/src/index.cssindex 645d16336..d40ac0c9a 100644--- a/src/index.css+++ b/src/index.css@@ -241,8 +241,8 @@ a svg:hover,}/* Premium input styling with subtle depth */-input,-textarea {+input:not(.input-inline),+textarea:not(.input-inline) {border-radius: var(--radius);transition:background-color 0.2s ease,@@ -254,15 +254,15 @@ textarea {}/* Light mode inputs - embossed parchment */-:root input,-:root textarea {+:root input:not(.input-inline),+:root textarea:not(.input-inline) {background-color: var(--color-parchment-bg);border: 1px solid var(--color-parchment-border);color: var(--color-parchment-text);}-:root input:focus,-:root textarea:focus {+:root input:not(.input-inline):focus,+:root textarea:not(.input-inline):focus {border-color: var(--color-parchment-accent);box-shadow:0 0 0 2px oklch(from var(--color-parchment-accent) l c h / 0.2),@@ -271,16 +271,16 @@ textarea {}/* Dark mode inputs — flat, no embossed shadow */-.dark input,-.dark textarea {+.dark input:not(.input-inline),+.dark textarea:not(.input-inline) {background-color: var(--color-input);border: 1px solid var(--color-border);color: var(--color-foreground);box-shadow: none;}-.dark input:focus,-.dark textarea:focus {+.dark input:not(.input-inline):focus,+.dark textarea:not(.input-inline):focus {border-color: var(--color-border-active);box-shadow: 0 0 0 2px oklch(from var(--color-ring) l c h / 0.15);}@@ -879,6 +879,15 @@ body:has(.agent-overlay-window) #root {}}+@keyframes thinking-shimmer {+ 0% {+ background-position: 200% 0;+ }+ 100% {+ background-position: -200% 0;+ }+}+@keyframes agent-loading-dot {0%,80%,