@@ -196,12 +196,6 @@ public actor JournalGenerator {
196196 ]
197197
198198 if dominantCategory ( for: section) == . communication {
199- guidance. append (
200- " For chat or messaging evidence, participant or thread titles identify the conversation context, not automatically the speaker of each nearby message snippet. "
201- )
202- guidance. append (
203- " If the excerpt does not explicitly identify who said a message, describe it as something discussed or coordinated rather than attributing it to a named person. "
204- )
205199 guidance. append (
206200 " If message cues are prefixed with `Me:` or `Them:`, preserve that attribution. "
207201 )
@@ -291,30 +285,21 @@ public actor JournalGenerator {
291285 }
292286
293287 private func eventPrompt( _ event: GroupedActivityEvent ) -> String {
294- let isCommunicationEvent = communicationAppLabels. contains ( event. appName. normalizedComparisonKey)
295288 var pieces = [
296289 " \( OpenbirdDateFormatting . timeString ( for: event. startedAt) ) - \( OpenbirdDateFormatting . timeString ( for: event. endedAt) ) " ,
297290 event. appName,
298291 ]
299292
300293 if let detailTitle = event. detailTitle {
301- if isCommunicationEvent {
302- pieces. append ( " context: \( detailTitle) " )
303- } else {
304- pieces. append ( detailTitle)
305- }
294+ pieces. append ( detailTitle)
306295 }
307296
308297 if let urlSummary = ActivityEvidencePreprocessor . summarizedURL ( from: event. url) {
309298 pieces. append ( urlSummary)
310299 }
311300
312301 if event. excerpt. isEmpty == false {
313- if isCommunicationEvent {
314- pieces. append ( " message cues (speaker may be unclear): \( event. excerpt) " )
315- } else {
316- pieces. append ( event. excerpt)
317- }
302+ pieces. append ( event. excerpt)
318303 }
319304
320305 if event. sourceEventCount > 1 {
@@ -435,10 +420,6 @@ public actor JournalGenerator {
435420 }
436421
437422 private func storyHeadingLabel( for section: PreparedSection ) -> String {
438- if let directMessageHeading = directMessageHeading ( for: section) {
439- return directMessageHeading
440- }
441-
442423 let topic = displayTopic ( for: section)
443424 guard shouldRewriteHeading ( topic, section: section) ,
444425 let context = bestStoryContext ( for: section) else {
@@ -458,10 +439,6 @@ public actor JournalGenerator {
458439 }
459440
460441 private func storyNarrativeLead( for section: PreparedSection , apps: [ String ] ) -> String ? {
461- if let directMessageLead = directMessageNarrativeLead ( for: section, apps: apps) {
462- return directMessageLead
463- }
464-
465442 guard shouldRewriteHeading ( displayTopic ( for: section) , section: section) ,
466443 let context = bestStoryContext ( for: section) else {
467444 return nil
@@ -493,48 +470,6 @@ public actor JournalGenerator {
493470 return genericToolLabels. contains ( normalizedTopic)
494471 }
495472
496- private func directMessageHeading( for section: PreparedSection ) -> String ? {
497- guard isDirectMessagingSection ( section) ,
498- let conversationTitle = primaryConversationTitle ( for: section) else {
499- return nil
500- }
501-
502- return " Chatting with \( conversationTitle) "
503- }
504-
505- private func directMessageNarrativeLead( for section: PreparedSection , apps: [ String ] ) -> String ? {
506- guard isDirectMessagingSection ( section) ,
507- let conversationTitle = primaryConversationTitle ( for: section) ,
508- let appName = apps. first else {
509- return nil
510- }
511-
512- return " You were chatting with \( conversationTitle) on \( appName) . "
513- }
514-
515- private func isDirectMessagingSection( _ section: PreparedSection ) -> Bool {
516- let appNames = Set ( section. groupedEvents. map { $0. appName. normalizedComparisonKey } )
517- return appNames. count == 1 && appNames. isDisjoint ( with: directMessagingAppLabels) == false
518- }
519-
520- private func primaryConversationTitle( for section: PreparedSection ) -> String ? {
521- section. groupedEvents
522- . compactMap ( \. detailTitle)
523- . map { $0. trimmingCharacters ( in: . whitespacesAndNewlines) }
524- . first ( where: isUsableConversationTitle)
525- }
526-
527- private func isUsableConversationTitle( _ title: String ) -> Bool {
528- let normalizedTitle = title. normalizedComparisonKey
529- guard normalizedTitle. isEmpty == false ,
530- genericToolLabels. contains ( normalizedTitle) == false
531- else {
532- return false
533- }
534-
535- return normalizedTitle. replacingOccurrences ( of: " " , with: " " ) . allSatisfy ( \. isNumber) == false
536- }
537-
538473 private func bestStoryContext( for section: PreparedSection ) -> String ? {
539474 let topicKey = displayTopic ( for: section) . normalizedComparisonKey
540475
@@ -676,10 +611,6 @@ public actor JournalGenerator {
676611 [ " slack " , " messages " , " imessage " , " discord " , " kakaotalk " , " telegram " , " whatsapp " , " mail " , " gmail " ]
677612 }
678613
679- private var directMessagingAppLabels : Set < String > {
680- [ " messages " , " imessage " , " kakaotalk " , " telegram " , " whatsapp " ]
681- }
682-
683614 private var developmentAppLabels : Set < String > {
684615 [ " xcode " , " visual studio code " , " vs code " , " cursor " , " zed " , " terminal " , " iterm2 " , " warp " , " nova " ]
685616 }
0 commit comments