Skip to content

Commit a1c1043

Browse files
committed
Rename ChatMessage in chat panel to DisplayedChatMessage
1 parent bc39122 commit a1c1043

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

Core/Sources/ChatGPTChatTab/Chat.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Foundation
44
import OpenAIService
55
import 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?

Core/Sources/ChatGPTChatTab/ChatPanel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

678678
struct ChatPanel_Preview: PreviewProvider {
679-
static let history: [ChatMessage] = [
679+
static let history: [DisplayedChatMessage] = [
680680
.init(
681681
id: "1",
682682
role: .user,

Tool/Sources/OpenAIService/Memory/AutoManagedChatGPTMemory.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff 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 }

0 commit comments

Comments
 (0)