Skip to content

Commit dbbb30c

Browse files
committed
Update CopilotForXcodeKit to 0.3.0
1 parent 3c3bacb commit dbbb30c

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

Pro

Submodule Pro updated from 8c43137 to 9c11324

Tool/Sources/SuggestionProvider/SuggestionProvider.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import UserDefaultsObserver
66

77
public struct SuggestionRequest {
88
public var fileURL: URL
9+
public var relativePath: String
910
public var content: String
11+
public var lines: [String]
1012
public var cursorPosition: CursorPosition
1113
public var tabSize: Int
1214
public var indentSize: Int
@@ -15,15 +17,19 @@ public struct SuggestionRequest {
1517

1618
public init(
1719
fileURL: URL,
20+
relativePath: String,
1821
content: String,
22+
lines: [String],
1923
cursorPosition: CursorPosition,
2024
tabSize: Int,
2125
indentSize: Int,
2226
usesTabsForIndentation: Bool,
2327
ignoreSpaceOnlySuggestions: Bool
2428
) {
2529
self.fileURL = fileURL
30+
self.relativePath = relativePath
2631
self.content = content
32+
self.lines = lines
2733
self.cursorPosition = cursorPosition
2834
self.tabSize = tabSize
2935
self.indentSize = indentSize

Tool/Sources/WorkspaceSuggestionService/Workspace+SuggestionService.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ public extension Workspace {
5757
let completions = try await suggestionService.getSuggestions(
5858
.init(
5959
fileURL: fileURL,
60+
relativePath: fileURL.path.replacingOccurrences(of: projectRootURL.path, with: ""),
6061
content: editor.lines.joined(separator: ""),
62+
lines: editor.lines,
6163
cursorPosition: editor.cursorPosition,
6264
tabSize: editor.tabSize,
6365
indentSize: editor.indentSize,

0 commit comments

Comments
 (0)