@@ -2,12 +2,12 @@ import ComposableArchitecture
22import Foundation
33import SuggestionBasic
44
5- public enum PromptToCodeAgentResponse {
5+ public enum ModificationAgentResponse {
66 case code( String )
77 case description( String )
88}
99
10- public struct PromptToCodeAgentRequest {
10+ public struct ModificationAgentRequest {
1111 var code : String
1212 var requirement : String
1313 var source : PromptToCodeSource
@@ -41,14 +41,14 @@ public struct PromptToCodeAgentRequest {
4141 }
4242}
4343
44- public protocol PromptToCodeAgent {
45- typealias Request = PromptToCodeAgentRequest
46- typealias Response = PromptToCodeAgentResponse
44+ public protocol ModificationAgent {
45+ typealias Request = ModificationAgentRequest
46+ typealias Response = ModificationAgentResponse
4747
4848 func send( _ request: Request ) -> AsyncThrowingStream < Response , any Error >
4949}
5050
51- public struct PromptToCodeSnippet : Equatable , Identifiable {
51+ public struct ModificationSnippet : Equatable , Identifiable {
5252 public let id = UUID ( )
5353 public var startLineIndex : Int
5454 public var originalCode : String
@@ -74,16 +74,16 @@ public struct PromptToCodeSnippet: Equatable, Identifiable {
7474 }
7575}
7676
77- public enum PromptToCodeAttachedTarget : Equatable {
77+ public enum ModificationAttachedTarget : Equatable {
7878 case file( URL , projectURL: URL , code: String , lines: [ String ] )
7979 case dynamic
8080}
8181
82- public struct PromptToCodeHistoryNode : Equatable {
83- public var snippets : IdentifiedArrayOf < PromptToCodeSnippet >
82+ public struct ModificationHistoryNode : Equatable {
83+ public var snippets : IdentifiedArrayOf < ModificationSnippet >
8484 public var instruction : String
8585
86- public init ( snippets: IdentifiedArrayOf < PromptToCodeSnippet > , instruction: String ) {
86+ public init ( snippets: IdentifiedArrayOf < ModificationSnippet > , instruction: String ) {
8787 self . snippets = snippets
8888 self . instruction = instruction
8989 }
0 commit comments