File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Core/Sources/SuggestionWidget/FeatureReducers
Tool/Sources/PromptToCodeCustomization Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -139,9 +139,10 @@ public struct PromptToCodePanel {
139139
140140 return . run { send in
141141 do {
142- let context = await contextInputController. resolveContext ( onStatusChange: {
143- await send ( . statusUpdated( $0) )
144- } )
142+ let context = await contextInputController. resolveContext (
143+ forDocumentURL: copiedState. promptToCodeState. source. documentURL,
144+ onStatusChange: { await send ( . statusUpdated( $0) ) }
145+ )
145146 await send ( . referencesUpdated( context. references) )
146147 let agentFactory = context. agent ?? { SimpleModificationAgent ( ) }
147148 _ = try await withThrowingTaskGroup ( of: Void . self) { group in
Original file line number Diff line number Diff line change @@ -55,7 +55,10 @@ public protocol PromptToCodeContextInputControllerDelegate {
5555public protocol PromptToCodeContextInputController : Perception . Perceptible {
5656 var instruction : NSAttributedString { get set }
5757
58- func resolveContext( onStatusChange: @escaping ( [ String ] ) async -> Void ) async -> (
58+ func resolveContext(
59+ forDocumentURL: URL ,
60+ onStatusChange: @escaping ( [ String ] ) async -> Void
61+ ) async -> (
5962 instruction: String ,
6063 references: [ ChatMessage . Reference ] ,
6164 topics: [ ChatMessage . Reference ] ,
@@ -100,7 +103,10 @@ public final class DefaultPromptToCodeContextInputController: PromptToCodeContex
100103 instruction = mutable
101104 }
102105
103- public func resolveContext( onStatusChange: @escaping ( [ String ] ) async -> Void ) -> (
106+ public func resolveContext(
107+ forDocumentURL: URL ,
108+ onStatusChange: @escaping ( [ String ] ) async -> Void
109+ ) -> (
104110 instruction: String ,
105111 references: [ ChatMessage . Reference ] ,
106112 topics: [ ChatMessage . Reference ] ,
You can’t perform that action at this time.
0 commit comments