diff --git a/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/instance/chatWithSimilarConversations.st b/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/instance/chatWithSimilarConversations.st new file mode 100644 index 0000000..94293f1 --- /dev/null +++ b/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/instance/chatWithSimilarConversations.st @@ -0,0 +1,11 @@ +actions +chatWithSimilarConversations + + ^ SemanticConversation newStreaming + addSystemMessage: 'Read the following conversations on the Squeak mailing list, squeak-dev, and prepare to summarize them for answering a question:'; + addUserMessage: ((similarConversations collect: [:ea | '```{1}```' format: {ea fullTextForSummary}]) joinSeparatedBy: String cr, String cr); + addSystemMessage: 'The following message has been posted later on squeak-dev. Please read it to find out if any of the provided conversations from above are relevant to the new message:'; + addUserMessage: self conversation fullTextForSummary; + addSystemMessage: 'Briefly summarize each of the older conversations in the context of the new message. Each summary must be exactly one short sentence. Write each sentence on a new line and start each line with the subject of the original conversation. Focus on the outcomes of each conversation (i.e., gained insights/implemented code changes/unresolved issues) and not so much on people.'; + addAssistantMessage: 'What would you like to know?'; + open \ No newline at end of file diff --git a/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/instance/similarConversationsText.st b/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/instance/similarConversationsText.st index 1013b27..4d2817e 100644 --- a/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/instance/similarConversationsText.st +++ b/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/instance/similarConversationsText.st @@ -1,6 +1,7 @@ accessing - text similarConversationsText + | texts text chatText | similarConversations ifNil: [ self requestSimilarConversations. ^ self similarConversationsText]. @@ -14,7 +15,7 @@ similarConversationsText similarConversations ifEmpty: [^ '(none found)']. self flag: #mid. "Use URLs to copyable message ids here once we support them" - ^ ((similarConversations collect: [:conversation | + texts := similarConversations collect: [:conversation | (conversation isTalkSemanticMessagesPlaceholder ifTrue: [conversation title asText @@ -23,5 +24,12 @@ similarConversationsText ifFalse: [conversation subject asText]) addAttribute: (PluggableTextAttribute evalBlock: [conversation browse]); - yourself]) - fold: [:a :b | a , String cr , b]) \ No newline at end of file + yourself]. + text := (texts collect: [:ea | ('*' , Character nbsp) asText , ea]) + fold: [:a :b | a , String cr , b]. + + chatText := '[Chat]' asText + addAttribute: (PluggableTextAttribute evalBlock: [self chatWithSimilarConversations]); + yourself. + + ^ text , String cr , String cr , chatText \ No newline at end of file diff --git a/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/methodProperties.json b/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/methodProperties.json index 85018de..efb2f6d 100644 --- a/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/methodProperties.json +++ b/packages/SqueakInboxTalkExtras-Semantics.package/TalkSemanticConversationBrowserPlugin.class/methodProperties.json @@ -17,6 +17,7 @@ "cancelSmartSummary" : "ct 8/21/2023 02:34", "changed:with:" : "ct 8/27/2023 23:57", "chatWithConversation" : "ct 6/19/2024 18:02", + "chatWithSimilarConversations" : "ct 6/19/2024 18:02", "conversation" : "ct 8/21/2023 02:26", "initializeForBrowser:" : "ct 8/27/2023 22:04", "requestSimilarConversations" : "ct 8/27/2023 21:59", @@ -24,7 +25,7 @@ "rerequestSmartSummary" : "ct 8/21/2023 02:20", "similarConversations" : "ct 8/21/2023 02:59", "similarConversationsHeader" : "ct 8/21/2023 03:01", - "similarConversationsText" : "ct 8/26/2023 15:51", + "similarConversationsText" : "ct 12/15/2023 00:12", "smartCancelIcon" : "ct 8/21/2023 02:28", "smartChatIcon" : "ct 8/21/2023 02:28", "smartRerequestIcon" : "ct 8/21/2023 02:28",