forked from intitni/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModels.swift
More file actions
42 lines (38 loc) · 1.15 KB
/
Models.swift
File metadata and controls
42 lines (38 loc) · 1.15 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import CopilotModel
import Foundation
public struct EditorContent: Codable {
public init(
content: String,
lines: [String],
uti: String,
cursorPosition: CursorPosition,
tabSize: Int,
indentSize: Int,
usesTabsForIndentation: Bool
) {
self.content = content
self.lines = lines
self.uti = uti
self.cursorPosition = cursorPosition
self.tabSize = tabSize
self.indentSize = indentSize
self.usesTabsForIndentation = usesTabsForIndentation
}
public var content: String
public var lines: [String]
public var uti: String
public var cursorPosition: CursorPosition
public var tabSize: Int
public var indentSize: Int
public var usesTabsForIndentation: Bool
}
public struct UpdatedContent: Codable {
public init(content: String, newCursor: CursorPosition? = nil, modifications: [Modification]) {
self.content = content
self.newCursor = newCursor
self.modifications = modifications
}
public var content: String
public var newCursor: CursorPosition?
public var modifications: [Modification]
}