File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed
Core/Sources/ChatGPTChatTab
Tool/Sources/OpenAIService/Memory Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import Foundation
44import OpenAIService
55import Preferences
66
7- public struct ChatMessage : Equatable {
7+ public struct DisplayedChatMessage : Equatable {
88 public enum Role {
99 case user
1010 case assistant
@@ -29,7 +29,7 @@ struct Chat: ReducerProtocol {
2929 struct State : Equatable {
3030 var title : String = " Chat "
3131 @BindingState var typedMessage = " "
32- var history : [ ChatMessage ] = [ ]
32+ var history : [ DisplayedChatMessage ] = [ ]
3333 @BindingState var isReceivingMessage = false
3434 var chatMenu = ChatMenu . State ( )
3535 @BindingState var focusedField : Field ?
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ struct ChatPanelMessages: View {
196196
197197 struct PinToBottomRelatedState : Equatable {
198198 var isReceivingMessage : Bool
199- var lastMessage : ChatMessage ?
199+ var lastMessage : DisplayedChatMessage ?
200200 }
201201
202202 var body : some View {
@@ -676,7 +676,7 @@ struct RoundedCorners: Shape {
676676// MARK: - Previews
677677
678678struct ChatPanel_Preview : PreviewProvider {
679- static let history : [ ChatMessage ] = [
679+ static let history : [ DisplayedChatMessage ] = [
680680 . init(
681681 id: " 1 " ,
682682 role: . user,
Original file line number Diff line number Diff line change @@ -259,11 +259,7 @@ extension AutoManagedChatGPTMemory {
259259 for (index, content) in retrievedContent. filter ( { !$0. isEmpty } ) . enumerated ( ) {
260260 if index == 0 {
261261 if !appendToMessage( """
262-
263-
264- ## Relevant Content
265-
266- Below are information related to the conversation, separated by \( separator)
262+ Here are the information you know about the system and the project, separated by \( separator)
267263
268264
269265 """ ) { break }
You can’t perform that action at this time.
0 commit comments