File tree Expand file tree Collapse file tree
voxtral_realtime/macos/VoxtralRealtime Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,9 +43,6 @@ final class TranscriptStore {
4343 var isPaused : Bool { sessionState == . paused }
4444 var isLoading : Bool { sessionState == . loading }
4545 var isModelReady : Bool { modelState == . ready }
46- var recentDictationSessions : [ Session ] {
47- sessions. filter { $0. source == . dictation } . prefix ( 5 ) . map { $0 }
48- }
4946
5047 private let runner = RunnerBridge ( )
5148 private let preferences : Preferences
@@ -359,6 +356,12 @@ final class TranscriptStore {
359356 textPipeline. normalizeForWakePhrase ( text)
360357 }
361358
359+ func stripLeadingPunctuation( ) {
360+ dictationText = dictationText. drop ( while: {
361+ $0. isPunctuation || $0. isWhitespace || $0. isNewline
362+ } ) . description
363+ }
364+
362365 func stripLeadingWakePhrase( _ wakePhrase: String ) {
363366 guard !dictationText. isEmpty, !wakePhrase. isEmpty else { return }
364367
Original file line number Diff line number Diff line change @@ -357,6 +357,8 @@ final class DictationManager {
357357 self . dictationStartedAt = . now
358358 self . state = . listening
359359 self . store. stripLeadingWakePhrase ( self . preferences. wakePhrase)
360+ try ? await Task . sleep ( for: . milliseconds( 200 ) )
361+ self . store. stripLeadingPunctuation ( )
360362 self . store. wakeState = . active
361363 self . showPanel ( )
362364 self . startSilenceMonitor ( )
Original file line number Diff line number Diff line change @@ -53,16 +53,6 @@ struct SidebarView: View {
5353 }
5454 }
5555
56- if !recentDictations. isEmpty {
57- Section ( " Recent Dictations " ) {
58- ForEach ( recentDictations) { session in
59- sessionRow ( session)
60- . tag ( SidebarPage . session ( session. id) )
61- . contextMenu { sessionContextMenu ( session) }
62- }
63- }
64- }
65-
6656 ForEach ( historySections) { section in
6757 Section ( section. title) {
6858 ForEach ( section. sessions) { session in
@@ -115,15 +105,8 @@ struct SidebarView: View {
115105 visibleSessions. filter ( \. pinned)
116106 }
117107
118- private var recentDictations : [ Session ] {
119- visibleSessions
120- . filter { !$0. pinned && $0. source == . dictation }
121- . prefix ( 5 )
122- . map { $0 }
123- }
124-
125108 private var historySections : [ SessionSection ] {
126- let hiddenIDs = Set ( pinnedSessions. map ( \. id) + recentDictations . map ( \ . id ) )
109+ let hiddenIDs = Set ( pinnedSessions. map ( \. id) )
127110 let remainder = visibleSessions. filter { !hiddenIDs. contains ( $0. id) }
128111 let calendar = Calendar . current
129112 let grouped = Dictionary ( grouping: remainder) { session -> String in
Original file line number Diff line number Diff line change @@ -41,10 +41,6 @@ struct WelcomeView: View {
4141 }
4242
4343 shortcutHints
44-
45- if !store. recentDictationSessions. isEmpty {
46- recentDictationsSection
47- }
4844 }
4945 . padding ( 40 )
5046 . frame ( maxWidth: 560 )
@@ -105,28 +101,6 @@ struct WelcomeView: View {
105101 . padding ( . top, 8 )
106102 }
107103
108- private var recentDictationsSection : some View {
109- VStack ( alignment: . leading, spacing: 10 ) {
110- Divider ( )
111- Text ( " Recent Dictations " )
112- . font ( . headline)
113- ForEach ( store. recentDictationSessions. prefix ( 3 ) ) { session in
114- VStack ( alignment: . leading, spacing: 4 ) {
115- Text ( session. displayTitle)
116- . font ( . caption. weight ( . semibold) )
117- . foregroundStyle ( . secondary)
118- Text ( session. previewText. prefix ( 120 ) . description)
119- . font ( . callout)
120- . lineLimit ( 2 )
121- }
122- . frame ( maxWidth: . infinity, alignment: . leading)
123- . padding ( 12 )
124- . background ( . background. secondary, in: RoundedRectangle ( cornerRadius: 12 ) )
125- }
126- }
127- . frame ( maxWidth: . infinity, alignment: . leading)
128- }
129-
130104 private func shortcutBadge( _ shortcut: String , label: String ) -> some View {
131105 VStack ( spacing: 4 ) {
132106 Text ( shortcut)
You can’t perform that action at this time.
0 commit comments