forked from intitni/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodeSuggestion.swift
More file actions
28 lines (26 loc) · 814 Bytes
/
CodeSuggestion.swift
File metadata and controls
28 lines (26 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import Foundation
public struct CodeSuggestion: Codable, Equatable {
public init(
text: String,
position: CursorPosition,
uuid: String,
range: CursorRange,
displayText: String
) {
self.text = text
self.position = position
self.uuid = uuid
self.range = range
self.displayText = displayText
}
/// The new code to be inserted and the original code on the first line.
public var text: String
/// The position of the cursor before generating the completion.
public var position: CursorPosition
/// An id.
public var uuid: String
/// The range of the original code that should be replaced.
public var range: CursorRange
/// The new code to be inserted.
public var displayText: String
}