Skip to content

Commit 50df34c

Browse files
fixed
1 parent 6cc4616 commit 50df34c

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

Tool/Sources/CodeiumService/LanguageServer/CodeiumModels.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ struct CompletionPart: Codable {
7272
}
7373

7474
struct CodeiumDocument: Codable {
75-
var absolute_path: String
76-
// Path relative to the root of the workspace.
77-
var relative_path: String
75+
var absolute_path_migrate_me_to_uri: String
7876
var text: String
7977
// Language ID provided by the editor.
8078
var editor_language: String

Tool/Sources/CodeiumService/Services/CodeiumService.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -257,14 +257,14 @@ extension CodeiumService: CodeiumSuggestionServiceType {
257257

258258
requestCounter += 1
259259
let languageId = languageIdentifierFromFileURL(fileURL)
260-
let relativePath = getRelativePath(of: fileURL)
260+
// let relativePath = getRelativePath(of: fileURL)
261261

262262
let task = Task {
263263
let request = try await CodeiumRequest.GetCompletion(requestBody: .init(
264264
metadata: getMetadata(),
265265
document: .init(
266-
absolute_path: fileURL.path,
267-
relative_path: relativePath,
266+
absolute_path_migrate_me_to_uri: fileURL.path,
267+
// relative_path: relativePath,
268268
text: content,
269269
editor_language: languageId.rawValue,
270270
language: .init(codeLanguage: languageId),
@@ -278,8 +278,8 @@ extension CodeiumService: CodeiumSuggestionServiceType {
278278
.map { openedDocument in
279279
let languageId = languageIdentifierFromFileURL(openedDocument.url)
280280
return .init(
281-
absolute_path: openedDocument.url.path,
282-
relative_path: openedDocument.relativePath,
281+
absolute_path_migrate_me_to_uri: openedDocument.url.path,
282+
// relative_path: openedDocument.relativePath,
283283
text: openedDocument.content,
284284
editor_language: languageId.rawValue,
285285
language: .init(codeLanguage: languageId)
@@ -417,11 +417,11 @@ extension CodeiumService: CodeiumSuggestionServiceType {
417417
workspaceURL: URL
418418
) async throws {
419419
let languageId = languageIdentifierFromFileURL(fileURL)
420-
let relativePath = getRelativePath(of: fileURL)
420+
// let relativePath = getRelativePath(of: fileURL)
421421
let request = await CodeiumRequest.RefreshContextForIdeAction(requestBody: .init(
422422
active_document: .init(
423-
absolute_path: fileURL.path,
424-
relative_path: relativePath,
423+
absolute_path_migrate_me_to_uri: fileURL.path,
424+
// relative_path: relativePath,
425425
text: content,
426426
editor_language: languageId.rawValue,
427427
language: .init(codeLanguage: languageId),

0 commit comments

Comments
 (0)