Skip to content

Commit daeae30

Browse files
committed
Merge branch 'feature/github-copilot-chat-language' into develop
2 parents 0e77d4c + 43ba6fd commit daeae30

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Tool/Sources/GitHubCopilotService/LanguageServer/GitHubCopilotRequest.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ enum GitHubCopilotRequest {
376376

377377
var source: GitHubCopilotChatSource? // inline or panel
378378
var workspaceFolder: String?
379+
var userLanguage: String?
379380
}
380381

381382
let requestBody: RequestBody

Tool/Sources/GitHubCopilotService/Services/GitHubCopilotChatService.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@ public final class GitHubCopilotChatService: BuiltinExtensionChatServiceType {
4343
capabilities: .init(allSkills: false, skills: []),
4444
doc: doc,
4545
source: .panel,
46-
workspaceFolder: workspace.projectURL.path
46+
workspaceFolder: workspace.projectURL.path,
47+
userLanguage: {
48+
let language = UserDefaults.shared.value(for: \.chatGPTLanguage)
49+
if language.isEmpty {
50+
return "Auto Detected"
51+
}
52+
return language
53+
}()
4754
))
4855

4956
let stream = AsyncThrowingStream<String, Error> { continuation in

0 commit comments

Comments
 (0)