We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e59129 commit 2d62073Copy full SHA for 2d62073
1 file changed
Tool/Sources/GitHubCopilotService/Services/GitHubCopilotChatService.swift
@@ -129,6 +129,14 @@ extension GitHubCopilotChatService {
129
130
var currentTurn = Turn(request: "", response: nil)
131
var turns: [Turn] = []
132
+ let systemPrompt = history
133
+ .filter { $0.role == .system }.compactMap(\.content)
134
+ .joined(separator: "\n\n")
135
+
136
+ if !systemPrompt.isEmpty {
137
+ turns.append(.init(request: "[System Prompt]\n\(systemPrompt)", response: "OK!"))
138
+ }
139
140
for i in firstIndexOfUserMessage..<history.endIndex {
141
let message = history[i]
142
let text = message.content ?? ""
0 commit comments