Skip to content

Commit ebbf15f

Browse files
committed
Rename to acceptModification
1 parent ee4bd9d commit ebbf15f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Core/Sources/Service/SuggestionCommandHandler/PseudoCommandHandler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ struct PseudoCommandHandler: CommandHandler {
204204
}
205205
}
206206

207-
func acceptPromptToCode() async {
207+
func acceptModification() async {
208208
do {
209209
if UserDefaults.shared.value(for: \.alwaysAcceptSuggestionWithAccessibilityAPI) {
210210
throw CancellationError()

Core/Sources/SuggestionWidget/FeatureReducers/PromptToCodePanel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,13 @@ public struct PromptToCodePanel {
227227
case .acceptButtonTapped:
228228
state.hasEnded = true
229229
return .run { _ in
230-
await commandHandler.acceptPromptToCode()
230+
await commandHandler.acceptModification()
231231
activatePreviousActiveXcode()
232232
}
233233

234234
case .acceptAndContinueButtonTapped:
235235
return .run { _ in
236-
await commandHandler.acceptPromptToCode()
236+
await commandHandler.acceptModification()
237237
activateThisApp()
238238
}
239239

Tool/Sources/CommandHandler/CommandHandler.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public protocol CommandHandler {
2525

2626
// MARK: Modification
2727

28-
func acceptPromptToCode() async
28+
func acceptModification() async
2929
func presentModification(
3030
source: ModificationAgentRequest.ModificationSource,
3131
snippets: [ModificationSnippet]
@@ -103,8 +103,8 @@ public final class UniversalCommandHandler: CommandHandler {
103103
await commandHandler.sendChatMessage(message)
104104
}
105105

106-
public func acceptPromptToCode() async {
107-
await commandHandler.acceptPromptToCode()
106+
public func acceptModification() async {
107+
await commandHandler.acceptModification()
108108
}
109109

110110
public func presentModification(
@@ -164,7 +164,7 @@ struct NOOPCommandHandler: CommandHandler {
164164
print("send chat message")
165165
}
166166

167-
func acceptPromptToCode() async {
167+
func acceptModification() async {
168168
print("accept prompt to code")
169169
}
170170

0 commit comments

Comments
 (0)