Skip to content

Commit 92cc4c6

Browse files
committed
Post explanation from ModificationAgent
1 parent 914f6b4 commit 92cc4c6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Core/Sources/SuggestionWidget/FeatureReducers/PromptToCodePanel.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,14 @@ public struct PromptToCodePanel {
188188
description: ""
189189
)
190190
)))
191+
case let .explanation(explanation):
192+
await send(.snippetPanel(.element(
193+
id: snippet.id,
194+
action: .modifyCodeChunkReceived(
195+
code: "",
196+
description: explanation
197+
)
198+
)))
191199
}
192200
}
193201
} catch is CancellationError {

Tool/Sources/ModificationBasic/ModificationAgent.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import SuggestionBasic
55

66
public enum ModificationAgentResponse {
77
case code(String)
8+
case explanation(String)
89
}
910

1011
public struct ModificationAgentRequest {

0 commit comments

Comments
 (0)