Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
e11d290
Merge tag '0.26.0' into develop
intitni Oct 22, 2023
62a6e85
Disable hit test when a chat panel tab is not active
intitni Oct 22, 2023
27ad97c
Update
intitni Oct 30, 2023
a9f3f48
Merge branch 'feature/retrieve-from-active-document' into develop
intitni Oct 30, 2023
ad9c008
Add new scope @sense
intitni Oct 30, 2023
5bdaf24
Update instruction
intitni Oct 30, 2023
ddbfece
Add settings for scopes
intitni Oct 31, 2023
3f25cc5
Adjust UI
intitni Oct 31, 2023
e1f4b54
Update UI
intitni Oct 31, 2023
2b5d950
Update to setup scope according to settings
intitni Oct 31, 2023
f528d9a
Support changing default scopes in chat panel
intitni Oct 31, 2023
956f712
Add Scope enum to represent scopes
intitni Oct 31, 2023
39b387d
Support changing model according to scopes
intitni Oct 31, 2023
d55b05c
Support persisting scopes of chat panel
intitni Oct 31, 2023
5f71a97
Update
intitni Oct 31, 2023
67a9eb0
Merge branch 'feature/search-scope' into develop
intitni Oct 31, 2023
4b34f20
Update
intitni Nov 2, 2023
403a918
Add new logger
intitni Nov 2, 2023
c03ce88
Fix tests
intitni Nov 2, 2023
4158c6b
Add ContextAwarePromptToCodeService
intitni Nov 3, 2023
f47d2d3
Update
intitni Nov 6, 2023
582bdc4
Update
intitni Nov 6, 2023
5848281
Merge branch 'feature/prompt-to-code-with-chat-context-support' into …
intitni Nov 6, 2023
4209f86
Make chat window title bar and traffic light button bigger
intitni Nov 2, 2023
e1cdd69
Merge branch 'feature/adjust-chat-window-title-bar-ui' into develop
intitni Nov 6, 2023
0167734
Update focus code finder to return more info about contexts
intitni Nov 8, 2023
8923f39
Prevent variable declaration being used as code range
intitni Nov 8, 2023
585df56
Support proService clean up
intitni Nov 8, 2023
4740bae
Add keys
intitni Nov 8, 2023
1f3650a
Reset to use old prompt to code service
intitni Nov 8, 2023
fd84744
Update
intitni Nov 8, 2023
4a39591
Add new OpenAI model
intitni Nov 8, 2023
7dc23dc
Merge branch 'feature/add-new-models' into develop
intitni Nov 8, 2023
18a5b34
Adjust implementation of chat panel
intitni Nov 9, 2023
ab97bad
Tweak pin to bottom behavior of chat panel
intitni Nov 9, 2023
4974b20
Merge branch 'feature/chat-panel-improvement' into develop
intitni Nov 9, 2023
8330640
Move context system prompt to right next to the latest message
intitni Nov 9, 2023
6938c9f
Merge branch 'feature/adjust-position-of-context-system-prompt' into …
intitni Nov 9, 2023
309c70f
Track scroll event to disable pin to bottom
intitni Nov 9, 2023
e6940a5
Merge branch 'feature/use-scroll-event-to-disable-pin-to-bottom' into…
intitni Nov 9, 2023
651d29b
Bump Github Copilot to 1.11.4
intitni Nov 9, 2023
1cf2781
Bump Codeium to 1.4.15
intitni Nov 9, 2023
93c5404
Fix a crash that calls dropLast with a negative number
intitni Nov 9, 2023
228b2b2
Update
intitni Nov 9, 2023
ee2aefb
Update
intitni Nov 9, 2023
9b0b4bc
Fix chat panel interfere
intitni Nov 9, 2023
65e603e
Select the first chat tab after restoring
intitni Nov 9, 2023
ab3be0d
Fix that prompt to code can open at launch
intitni Nov 9, 2023
78809ef
Update
intitni Nov 9, 2023
02ae983
Bump version to 0.27.0
intitni Nov 9, 2023
aac6509
Add sense scope to auto completion
intitni Nov 9, 2023
d0910a2
Simplify implementation
intitni Nov 9, 2023
17ce115
Fix that overriding model not overriding max token and min reply token
intitni Nov 9, 2023
bb3d534
Update
intitni Nov 9, 2023
f0b2a24
Update
intitni Nov 9, 2023
e54c85f
Update
intitni Nov 9, 2023
12bc66b
Update
intitni Nov 9, 2023
21985b9
Update appcast.xml
intitni Nov 9, 2023
fa7dc18
Merge branch 'release/0.27.0'
intitni Nov 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adjust UI
  • Loading branch information
intitni committed Oct 31, 2023
commit 3f25cc5f739d29507050aaa34ed2aed811ff4ebb
3 changes: 2 additions & 1 deletion Core/Sources/HostApp/AccountSettings/CodeiumView.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import CodeiumService
import Foundation
import SharedUIComponents
import SwiftUI

struct CodeiumView: View {
Expand Down Expand Up @@ -220,7 +221,7 @@ struct CodeiumView: View {
.stroke(Color(nsColor: .separatorColor), style: .init(lineWidth: 1))
}

Divider()
SettingsDivider("Advanced")

Form {
Toggle("Verbose Log", isOn: $viewModel.codeiumVerboseLog)
Expand Down
4 changes: 2 additions & 2 deletions Core/Sources/HostApp/AccountSettings/GitHubCopilotView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ struct GitHubCopilotView: View {
.stroke(Color(nsColor: .separatorColor), style: .init(lineWidth: 1))
}

Divider()
SettingsDivider("Advanced")

Form {
Toggle(
Expand All @@ -287,7 +287,7 @@ struct GitHubCopilotView: View {
Toggle("Verbose Log", isOn: $settings.gitHubCopilotVerboseLog)
}

Divider()
SettingsDivider("Proxy")

Form {
TextField(
Expand Down
49 changes: 20 additions & 29 deletions Core/Sources/HostApp/FeatureSettings/ChatSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ struct ChatSettingsView: View {
@AppStorage(\.chatGPTMaxMessageCount) var chatGPTMaxMessageCount
@AppStorage(\.chatFontSize) var chatFontSize
@AppStorage(\.chatCodeFontSize) var chatCodeFontSize
@AppStorage(\.maxFocusedCodeLineCount)
var maxFocusedCodeLineCount

@AppStorage(\.defaultChatFeatureChatModelId) var defaultChatFeatureChatModelId
@AppStorage(\.defaultChatSystemPrompt) var defaultChatSystemPrompt
@AppStorage(\.chatSearchPluginMaxIterations) var chatSearchPluginMaxIterations
Expand All @@ -37,8 +36,6 @@ struct ChatSettingsView: View {
chatSettingsForm
SettingsDivider("UI")
uiForm
SettingsDivider("Context")
contextForm
SettingsDivider("Plugin")
pluginForm
ScopeForm()
Expand Down Expand Up @@ -171,24 +168,6 @@ struct ChatSettingsView: View {
}
}

@ViewBuilder
var contextForm: some View {
Form {
HStack {
TextField(text: .init(get: {
"\(Int(settings.maxFocusedCodeLineCount))"
}, set: {
settings.maxFocusedCodeLineCount = Int($0) ?? 0
})) {
Text("Max focused code line count in chat context")
}
.textFieldStyle(.roundedBorder)

Text("lines")
}
}
}

@ViewBuilder
var pluginForm: some View {
Form {
Expand Down Expand Up @@ -255,6 +234,8 @@ struct ChatSettingsView: View {
@AppStorage(\.preferredChatModelIdForWebScope)
var preferredChatModelIdForWebScope: String
@AppStorage(\.chatModels) var chatModels
@AppStorage(\.maxFocusedCodeLineCount)
var maxFocusedCodeLineCount

init() {}
}
Expand Down Expand Up @@ -282,6 +263,19 @@ struct ChatSettingsView: View {
Toggle(isOn: $settings.enableCodeScopeByDefaultInChatContext) {
Text("Enable @code scope by default in chat context.")
}

HStack {
TextField(text: .init(get: {
"\(Int(settings.maxFocusedCodeLineCount))"
}, set: {
settings.maxFocusedCodeLineCount = Int($0) ?? 0
})) {
Text("Max focused code")
}
.textFieldStyle(.roundedBorder)

Text("lines")
}
}
}

Expand Down Expand Up @@ -322,7 +316,6 @@ struct ChatSettingsView: View {
}
}
}
.padding(.top, 20)
}

Scope(
Expand All @@ -334,7 +327,7 @@ struct ChatSettingsView: View {
Toggle(isOn: $settings.enableProjectScopeByDefaultInChatContext) {
Text("Enable @project scope by default in chat context.")
}

Picker(
"Preferred Chat Model",
selection: $settings.preferredChatModelIdForProjectScope
Expand Down Expand Up @@ -372,7 +365,7 @@ struct ChatSettingsView: View {
Toggle(isOn: $settings.enableWebScopeByDefaultInChatContext) {
Text("Enable @web scope by default in chat context.")
}

Picker(
"Preferred Chat Model",
selection: $settings.preferredChatModelIdForWebScope
Expand Down Expand Up @@ -412,15 +405,13 @@ struct ChatSettingsView: View {
Text(description)
.multilineTextAlignment(.center)
.foregroundStyle(.secondary)
.frame(maxWidth: .infinity)
.padding(8)
.background {
RoundedRectangle(cornerRadius: 8)
.fill(Color.secondary.opacity(0.1))
}
.frame(maxWidth: 500)
Form {
content()
}
content()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import SharedUIComponents
import SwiftUI

struct PromptToCodeSettingsView: View {
Expand Down Expand Up @@ -30,7 +31,7 @@ struct PromptToCodeSettingsView: View {
selection: $settings.promptToCodeChatModelId
) {
Text("Same as Chat Feature").tag("")

if !settings.chatModels
.contains(where: { $0.id == settings.promptToCodeChatModelId }),
!settings.promptToCodeChatModelId.isEmpty
Expand All @@ -52,7 +53,7 @@ struct PromptToCodeSettingsView: View {
selection: $settings.promptToCodeEmbeddingModelId
) {
Text("Same as Chat Feature").tag("")

if !settings.embeddingModels
.contains(where: { $0.id == settings.promptToCodeEmbeddingModelId }),
!settings.promptToCodeEmbeddingModelId.isEmpty
Expand All @@ -78,16 +79,7 @@ struct PromptToCodeSettingsView: View {
}
}

Divider()

Text("Mirroring Settings of Suggestion Feature")
.foregroundColor(.white)
.padding(.vertical, 2)
.padding(.horizontal, 8)
.background(
Color.accentColor,
in: RoundedRectangle(cornerRadius: 20)
)
SettingsDivider("Mirroring Settings of Suggestion Feature")

Form {
Toggle(isOn: $settings.hideCommonPrecedingSpacesInSuggestion) {
Expand Down
166 changes: 82 additions & 84 deletions Core/Sources/HostApp/FeatureSettings/SuggestionSettingsView.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Preferences
import SharedUIComponents
import SwiftUI

#if canImport(ProHostApp)
Expand Down Expand Up @@ -36,112 +37,109 @@ struct SuggestionSettingsView: View {

var body: some View {
Form {
Group {
Picker(selection: $settings.suggestionPresentationMode) {
ForEach(PresentationMode.allCases, id: \.rawValue) {
switch $0 {
case .nearbyTextCursor:
Text("Nearby Text Cursor").tag($0)
case .floatingWidget:
Text("Floating Widget").tag($0)
}
Picker(selection: $settings.suggestionPresentationMode) {
ForEach(PresentationMode.allCases, id: \.rawValue) {
switch $0 {
case .nearbyTextCursor:
Text("Nearby Text Cursor").tag($0)
case .floatingWidget:
Text("Floating Widget").tag($0)
}
} label: {
Text("Presentation")
}
} label: {
Text("Presentation")
}

Picker(selection: $settings.suggestionFeatureProvider) {
ForEach(SuggestionFeatureProvider.allCases, id: \.rawValue) {
switch $0 {
case .gitHubCopilot:
Text("GitHub Copilot").tag($0)
case .codeium:
Text("Codeium").tag($0)
}
Picker(selection: $settings.suggestionFeatureProvider) {
ForEach(SuggestionFeatureProvider.allCases, id: \.rawValue) {
switch $0 {
case .gitHubCopilot:
Text("GitHub Copilot").tag($0)
case .codeium:
Text("Codeium").tag($0)
}
} label: {
Text("Feature Provider")
}
} label: {
Text("Feature Provider")
}

Toggle(isOn: $settings.realtimeSuggestionToggle) {
Text("Real-time Suggestion")
}
Toggle(isOn: $settings.realtimeSuggestionToggle) {
Text("Real-time Suggestion")
}

#if canImport(ProHostApp)
WithFeatureEnabled(\.tabToAcceptSuggestion) {
Toggle(isOn: $settings.acceptSuggestionWithTab) {
Text("Accept Suggestion with Tab")
}
#if canImport(ProHostApp)
WithFeatureEnabled(\.tabToAcceptSuggestion) {
Toggle(isOn: $settings.acceptSuggestionWithTab) {
Text("Accept Suggestion with Tab")
}
#endif

HStack {
Toggle(isOn: $settings.disableSuggestionFeatureGlobally) {
Text("Disable Suggestion Feature Globally")
}
}
#endif

Button("Exception List") {
isSuggestionFeatureEnabledListPickerOpen = true
}
}.sheet(isPresented: $isSuggestionFeatureEnabledListPickerOpen) {
SuggestionFeatureEnabledProjectListView(
isOpen: $isSuggestionFeatureEnabledListPickerOpen
)
HStack {
Toggle(isOn: $settings.disableSuggestionFeatureGlobally) {
Text("Disable Suggestion Feature Globally")
}

HStack {
Button("Disabled Language List") {
isSuggestionFeatureDisabledLanguageListViewOpen = true
}
}.sheet(isPresented: $isSuggestionFeatureDisabledLanguageListViewOpen) {
SuggestionFeatureDisabledLanguageListView(
isOpen: $isSuggestionFeatureDisabledLanguageListViewOpen
)
Button("Exception List") {
isSuggestionFeatureEnabledListPickerOpen = true
}
}.sheet(isPresented: $isSuggestionFeatureEnabledListPickerOpen) {
SuggestionFeatureEnabledProjectListView(
isOpen: $isSuggestionFeatureEnabledListPickerOpen
)
}

HStack {
Slider(value: $settings.realtimeSuggestionDebounce, in: 0...2, step: 0.1) {
Text("Real-time Suggestion Debounce")
}
HStack {
Button("Disabled Language List") {
isSuggestionFeatureDisabledLanguageListViewOpen = true
}
}.sheet(isPresented: $isSuggestionFeatureDisabledLanguageListViewOpen) {
SuggestionFeatureDisabledLanguageListView(
isOpen: $isSuggestionFeatureDisabledLanguageListViewOpen
)
}

Text(
"\(settings.realtimeSuggestionDebounce.formatted(.number.precision(.fractionLength(2))))s"
)
.font(.body)
.monospacedDigit()
.padding(.vertical, 2)
.padding(.horizontal, 6)
.background(
RoundedRectangle(cornerRadius: 4, style: .continuous)
.fill(Color.primary.opacity(0.1))
)
HStack {
Slider(value: $settings.realtimeSuggestionDebounce, in: 0...2, step: 0.1) {
Text("Real-time Suggestion Debounce")
}

Divider()
Text(
"\(settings.realtimeSuggestionDebounce.formatted(.number.precision(.fractionLength(2))))s"
)
.font(.body)
.monospacedDigit()
.padding(.vertical, 2)
.padding(.horizontal, 6)
.background(
RoundedRectangle(cornerRadius: 4, style: .continuous)
.fill(Color.primary.opacity(0.1))
)
}
}

Group {
Toggle(isOn: $settings.suggestionDisplayCompactMode) {
Text("Hide Buttons")
}
SettingsDivider("UI")

Toggle(isOn: $settings.hideCommonPrecedingSpacesInSuggestion) {
Text("Hide Common Preceding Spaces")
}
Form {
Toggle(isOn: $settings.suggestionDisplayCompactMode) {
Text("Hide Buttons")
}

HStack {
TextField(text: .init(get: {
"\(Int(settings.suggestionCodeFontSize))"
}, set: {
settings.suggestionCodeFontSize = Double(Int($0) ?? 0)
})) {
Text("Font size of suggestion code")
}
.textFieldStyle(.roundedBorder)
Toggle(isOn: $settings.hideCommonPrecedingSpacesInSuggestion) {
Text("Hide Common Preceding Spaces")
}

Text("pt")
HStack {
TextField(text: .init(get: {
"\(Int(settings.suggestionCodeFontSize))"
}, set: {
settings.suggestionCodeFontSize = Double(Int($0) ?? 0)
})) {
Text("Font size of suggestion code")
}
Divider()
.textFieldStyle(.roundedBorder)

Text("pt")
}
}
}
Expand Down
Loading