File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Core/Sources/ChatPlugins/ShortcutChatPlugin Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public actor ShortcutInputChatPlugin: ChatPlugin {
5656 // if no input detected, use the previous message as input
5757 input = await chatGPTService. history. last? . content ?? " "
5858 }
59-
59+
6060 do {
6161 if isCancelled { throw CancellationError ( ) }
6262
@@ -89,12 +89,14 @@ public actor ShortcutInputChatPlugin: ChatPlugin {
8989 let data = try Data ( contentsOf: temporaryOutputFileURL)
9090 if let text = String ( data: data, encoding: . utf8) {
9191 if text. isEmpty { return }
92- _ = try await chatGPTService. send ( content: text, summary: nil )
92+ let stream = try await chatGPTService. send ( content: text, summary: nil )
93+ for try await _ in stream { }
9394 } else {
9495 let text = """
9596 [View File]( \( temporaryOutputFileURL) )
9697 """
97- _ = try await chatGPTService. send ( content: text, summary: nil )
98+ let stream = try await chatGPTService. send ( content: text, summary: nil )
99+ for try await _ in stream { }
98100 }
99101
100102 return
You can’t perform that action at this time.
0 commit comments