diff --git a/Cargo.lock b/Cargo.lock index 4563a94421..afee6d9ee4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7840,7 +7840,7 @@ dependencies = [ [[package]] name = "llama-cpp-2" version = "0.1.108" -source = "git+https://github.com/utilityai/llama-cpp-rs?branch=update-llama-cpp-2025-06-04#73707a44ce892578ad94d630b356c0ec417c7476" +source = "git+https://github.com/utilityai/llama-cpp-rs?branch=update-llama-cpp-2025-05-28#c007d3654a093a37ee1580cf66f54ce75e8efaef" dependencies = [ "enumflags2", "llama-cpp-sys-2", @@ -7852,7 +7852,7 @@ dependencies = [ [[package]] name = "llama-cpp-sys-2" version = "0.1.108" -source = "git+https://github.com/utilityai/llama-cpp-rs?branch=update-llama-cpp-2025-06-04#73707a44ce892578ad94d630b356c0ec417c7476" +source = "git+https://github.com/utilityai/llama-cpp-rs?branch=update-llama-cpp-2025-05-28#c007d3654a093a37ee1580cf66f54ce75e8efaef" dependencies = [ "bindgen 0.69.5", "cc", diff --git a/apps/desktop/src/components/right-panel/views/transcript-view.tsx b/apps/desktop/src/components/right-panel/views/transcript-view.tsx index 32f42efa02..d0f74c86a1 100644 --- a/apps/desktop/src/components/right-panel/views/transcript-view.tsx +++ b/apps/desktop/src/components/right-panel/views/transcript-view.tsx @@ -34,9 +34,40 @@ import { ListeningIndicator } from "../components/listening-indicator"; import { useTranscript } from "../hooks/useTranscript"; import { useTranscriptWidget } from "../hooks/useTranscriptWidget"; +function useContainerWidth(ref: React.RefObject) { + const [width, setWidth] = useState(0); + + useEffect(() => { + const element = ref.current; + if (!element) { + return; + } + + const resizeObserver = new ResizeObserver((entries) => { + for (const entry of entries) { + setWidth(entry.contentRect.width); + } + }); + + resizeObserver.observe(element); + // Set initial width + setWidth(element.getBoundingClientRect().width); + + return () => { + resizeObserver.disconnect(); + }; + }, [ref]); + + return width; +} + export function TranscriptView() { const queryClient = useQueryClient(); + // Add container ref to track the panel width + const containerRef = useRef(null); + const panelWidth = useContainerWidth(containerRef); + const noteMatch = useMatch({ from: "/app/note/$id", shouldThrow: true }); const sessionId = noteMatch.params.id; @@ -98,7 +129,7 @@ export function TranscriptView() { const showActions = hasTranscript && sessionId && ongoingSession.isInactive; return ( -
+
{!showEmptyMessage && (
@@ -112,7 +143,7 @@ export function TranscriptView() {
)}
- {showActions && } + {showActions && panelWidth >= 530 && } {(audioExist.data && showActions) && ( - to see live transcript + {showFullText && to see live transcript}
-
+
or
- - + {isUltraCompact + ? ( + <> + + + + ) + : ( + <> + + + + )}
@@ -339,7 +423,10 @@ function SpeakerRangeSelector({ value, onChange }: SpeakerRangeSelectorProps) { ); } -export function SearchAndReplace({ editorRef }: { editorRef: React.RefObject }) { +export function SearchAndReplace({ editorRef, panelWidth }: { + editorRef: React.RefObject; + panelWidth: number; +}) { const [isActive, setIsActive] = useState(false); const [searchTerm, setSearchTerm] = useState(""); const [replaceTerm, setReplaceTerm] = useState(""); @@ -500,7 +587,7 @@ export function SearchAndReplace({ editorRef }: { editorRef: React.RefObject +
{!isActive ? ( diff --git a/crates/llama/Cargo.toml b/crates/llama/Cargo.toml index c8c0bd2777..f0772b65de 100644 --- a/crates/llama/Cargo.toml +++ b/crates/llama/Cargo.toml @@ -18,14 +18,13 @@ serde = { workspace = true } thiserror = { workspace = true } [target.'cfg(not(target_os = "macos"))'.dependencies] -llama-cpp-2 = { git = "https://github.com/utilityai/llama-cpp-rs", default-features = false, features = ["openmp"], branch = "update-llama-cpp-2025-06-04" } +llama-cpp-2 = { git = "https://github.com/utilityai/llama-cpp-rs", default-features = false, features = ["openmp"], branch = "update-llama-cpp-2025-05-28" } [target.'cfg(all(target_os = "macos", target_arch = "aarch64"))'.dependencies] - llama-cpp-2 = { git = "https://github.com/utilityai/llama-cpp-rs", features = ["openmp", "metal"], branch = "update-llama-cpp-2025-05-28" } [target.'cfg(all(target_os = "macos", target_arch = "x86_64"))'.dependencies] -llama-cpp-2 = { git = "https://github.com/utilityai/llama-cpp-rs", features = ["native"], branch = "update-llama-cpp-2025-06-04" } +llama-cpp-2 = { git = "https://github.com/utilityai/llama-cpp-rs", features = ["native"], branch = "update-llama-cpp-2025-05-28" } [dev-dependencies] hypr-buffer = { workspace = true } diff --git a/crates/whisper/Cargo.toml b/crates/whisper/Cargo.toml index fd71e8e523..74c71ecf24 100644 --- a/crates/whisper/Cargo.toml +++ b/crates/whisper/Cargo.toml @@ -39,7 +39,6 @@ regex = { workspace = true, optional = true } whisper-rs = { git = "https://github.com/tazz4843/whisper-rs", rev = "e3d67d5", features = ["raw-api", "tracing_backend"], optional = true } [target.'cfg(all(target_os = "macos", target_arch = "aarch64"))'.dependencies] - whisper-rs = { git = "https://github.com/tazz4843/whisper-rs", rev = "e3d67d5", features = ["raw-api", "tracing_backend"], optional = true } [target.'cfg(all(target_os = "macos", target_arch = "x86_64"))'.dependencies]