@@ -13,12 +13,14 @@ public final class PromptToCodeProvider: ObservableObject {
1313 @Published public var requirement : String
1414 @Published public var errorMessage : String
1515 @Published public var canRevert : Bool
16+ @Published public var isContinuous : Bool
1617
1718 public var onRevertTapped : ( ) -> Void
1819 public var onStopRespondingTap : ( ) -> Void
1920 public var onCancelTapped : ( ) -> Void
2021 public var onAcceptSuggestionTapped : ( ) -> Void
2122 public var onRequirementSent : ( String ) -> Void
23+ public var onContinuousToggleClick : ( ) -> Void
2224
2325 public init (
2426 code: String = " " ,
@@ -30,11 +32,13 @@ public final class PromptToCodeProvider: ObservableObject {
3032 requirement: String = " " ,
3133 errorMessage: String = " " ,
3234 canRevert: Bool = false ,
35+ isContinuous: Bool = false ,
3336 onRevertTapped: @escaping ( ) -> Void = { } ,
3437 onStopRespondingTap: @escaping ( ) -> Void = { } ,
3538 onCancelTapped: @escaping ( ) -> Void = { } ,
3639 onAcceptSuggestionTapped: @escaping ( ) -> Void = { } ,
37- onRequirementSent: @escaping ( String ) -> Void = { _ in }
40+ onRequirementSent: @escaping ( String ) -> Void = { _ in } ,
41+ onContinuousToggleClick: @escaping ( ) -> Void = { }
3842 ) {
3943 self . code = code
4044 self . language = language
@@ -45,11 +49,13 @@ public final class PromptToCodeProvider: ObservableObject {
4549 self . requirement = requirement
4650 self . errorMessage = errorMessage
4751 self . canRevert = canRevert
52+ self . isContinuous = isContinuous
4853 self . onRevertTapped = onRevertTapped
4954 self . onStopRespondingTap = onStopRespondingTap
5055 self . onCancelTapped = onCancelTapped
5156 self . onAcceptSuggestionTapped = onAcceptSuggestionTapped
5257 self . onRequirementSent = onRequirementSent
58+ self . onContinuousToggleClick = onContinuousToggleClick
5359 }
5460
5561 func revert( ) {
@@ -70,4 +76,6 @@ public final class PromptToCodeProvider: ObservableObject {
7076 }
7177
7278 func acceptSuggestion( ) { onAcceptSuggestionTapped ( ) }
79+
80+ func toggleContinuous( ) { onContinuousToggleClick ( ) }
7381}
0 commit comments