diff --git a/Core/Sources/ChatTab/ChatGPT/ChatProvider.swift b/Core/Sources/ChatTab/ChatGPT/ChatProvider.swift index c0d9b31d..03768e98 100644 --- a/Core/Sources/ChatTab/ChatGPT/ChatProvider.swift +++ b/Core/Sources/ChatTab/ChatGPT/ChatProvider.swift @@ -17,9 +17,14 @@ public final class ChatProvider: ObservableObject { .last? .text else { return defaultTitle } if lastMessageText.isEmpty { return defaultTitle } - return lastMessageText + let trimmed = lastMessageText .trimmingCharacters(in: .punctuationCharacters) .trimmingCharacters(in: .whitespacesAndNewlines) + if trimmed.starts(with: "```") { + return "Code Block" + } else { + return trimmed + } } public var extraSystemPrompt = "" diff --git a/Core/Sources/SuggestionWidget/ChatWindowView.swift b/Core/Sources/SuggestionWidget/ChatWindowView.swift index 2afa2d23..22b0ada4 100644 --- a/Core/Sources/SuggestionWidget/ChatWindowView.swift +++ b/Core/Sources/SuggestionWidget/ChatWindowView.swift @@ -127,9 +127,10 @@ struct ChatTabBarButton: View { .font(.callout) .lineLimit(1) .frame(maxWidth: 120) + .padding(.horizontal, 32) + .contentShape(Rectangle()) } .buttonStyle(PlainButtonStyle()) - .padding(.horizontal, 32) .overlay(alignment: .leading) { Button(action: { diff --git a/LICENSE b/LICENSE index d3e5da7b..cc41db9f 100644 --- a/LICENSE +++ b/LICENSE @@ -7,7 +7,7 @@ a. may be subject to a more permissive open-source license in the future. b. can be used for commercial purposes. With the GPLv3 and these supplementary agreements, anyone can freely use, modify, and distribute the project, provided that: -- For commercial use of this project or forks of this project, please contact us for authorization. +- For commercial use or commercial forks of this project, please contact us for authorization. Copyright (c) 2023 Shangxin Guo diff --git a/Version.xcconfig b/Version.xcconfig index 5ca4bada..bbe5b8e8 100644 --- a/Version.xcconfig +++ b/Version.xcconfig @@ -1,2 +1,2 @@ -APP_VERSION = 0.20.0 -APP_BUILD = 200 +APP_VERSION = 0.20.1 +APP_BUILD = 210 diff --git a/appcast.xml b/appcast.xml index 33c2726f..f7a3c1e0 100644 --- a/appcast.xml +++ b/appcast.xml @@ -3,6 +3,18 @@ Copilot for Xcode + + 0.20.1 + Fri, 21 Jul 2023 16:00:42 +0800 + 210 + 0.20.1 + 12.0 + + https://github.com/intitni/CopilotForXcode/releases/tag/0.20.1 + + + + 0.20.0 Tue, 11 Jul 2023 13:32:57 +0800