diff --git a/Core/Sources/ChatGPTChatTab/ChatPanel.swift b/Core/Sources/ChatGPTChatTab/ChatPanel.swift index db080dac..2ff5d583 100644 --- a/Core/Sources/ChatGPTChatTab/ChatPanel.swift +++ b/Core/Sources/ChatGPTChatTab/ChatPanel.swift @@ -219,8 +219,11 @@ struct ChatPanelMessages: View { EmptyView() .onChange(of: viewStore.state.isReceivingMessage) { isReceiving in if isReceiving { - pinnedToBottom = true - scrollToBottom() + Task { + pinnedToBottom = true + await Task.yield() + scrollToBottom() + } } } .onChange(of: viewStore.state.lastMessage) { _ in diff --git a/Pro b/Pro index 8b4803d8..a5c9fdad 160000 --- a/Pro +++ b/Pro @@ -1 +1 @@ -Subproject commit 8b4803d8793ac02c954a13e2e53d8980cafd7d7f +Subproject commit a5c9fdad71f2827a549b950622c4d74684c05410 diff --git a/Tool/Sources/ChatContextCollectors/ActiveDocumentChatContextCollector/ActiveDocumentChatContextCollector.swift b/Tool/Sources/ChatContextCollectors/ActiveDocumentChatContextCollector/ActiveDocumentChatContextCollector.swift index a93e1347..9ab8fb8e 100644 --- a/Tool/Sources/ChatContextCollectors/ActiveDocumentChatContextCollector/ActiveDocumentChatContextCollector.swift +++ b/Tool/Sources/ChatContextCollectors/ActiveDocumentChatContextCollector/ActiveDocumentChatContextCollector.swift @@ -46,10 +46,17 @@ public final class ActiveDocumentChatContextCollector: ChatContextCollector { var functions = [any ChatGPTFunction]() if !isSensitive { + let contextLineRange: String = { + if let range = context.focusedContext?.codeRange { + return " from \(range.start.line + 1) to \(range.end.line + 1)" + } + return "" + }() + var functionPrompt = """ ONLY call it when one of the following conditions are satisfied: - - the user ask you about specific line from the latest message, \ - which is not included in the focused range. + - the user explicitly ask you about specific line of code, \ + but the line was NOT in the focused range \(contextLineRange). """ if let annotations = context.focusedContext?.otherLineAnnotations, diff --git a/Version.xcconfig b/Version.xcconfig index fcbdaf4d..23921c81 100644 --- a/Version.xcconfig +++ b/Version.xcconfig @@ -1,3 +1,3 @@ -APP_VERSION = 0.32.2 -APP_BUILD = 363 +APP_VERSION = 0.32.3 +APP_BUILD = 366 diff --git a/appcast.xml b/appcast.xml index 0bf89f3a..37e7f099 100644 --- a/appcast.xml +++ b/appcast.xml @@ -3,6 +3,19 @@ Copilot for Xcode + + 0.32.3 + Mon, 29 Apr 2024 22:44:05 +0800 + 366 + beta + 0.32.3 + 12.0 + + https://github.com/intitni/CopilotForXcode/releases/tag/0.32.3.beta + + + + 0.32.2 Sat, 20 Apr 2024 20:31:36 +0800