File tree Expand file tree Collapse file tree 2 files changed +5
-16
lines changed
Core/Core/Common/Extensions/Foundation
Horizon/Horizon/Sources/Features/Assist/AssistChat/Domain Expand file tree Collapse file tree 2 files changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -316,8 +316,10 @@ public extension URL {
316
316
317
317
public extension String {
318
318
func replaceHostWithCanvasForCareer( ) -> String {
319
- replacing ( " pd.instructure.com " , with: " pd.canvasforcareer.com " )
320
- . replacing ( " intelvio.instructure.com " , with: " intelvio.canvasforcareer.com " )
321
- . replacing ( " horizon.cd.instructure.com " , with: " dev.cd.canvashorizon.com " )
319
+ let newString = replacing ( " horizon.cd.instructure.com " , with: " dev.cd.canvashorizon.com " )
320
+ if let range = newString. range ( of: " instructure.com " ) {
321
+ return newString. replacingCharacters ( in: range, with: " canvasforcareer.com " )
322
+ }
323
+ return newString
322
324
}
323
325
}
Original file line number Diff line number Diff line change @@ -355,19 +355,6 @@ class AssistChatInteractorLive: AssistChatInteractor {
355
355
return
356
356
chatMethod
357
357
. map { AssistChatResponse ( message: AssistChatMessage ( botResponse: $0) , chatHistory: history) }
358
- . flatMap { [ weak self] response in
359
- guard let self = self else {
360
- return Empty < AssistChatResponse , Error > ( completeImmediately: true ) . eraseToAnyPublisher ( )
361
- }
362
- return self . chipGenerator ( history: response. chatHistory, pageContext: pageContext)
363
- . map { chipOptions in
364
- AssistChatResponse (
365
- chipOptions: chipOptions,
366
- chatHistory: response. chatHistory
367
- )
368
- }
369
- . eraseToAnyPublisher ( )
370
- }
371
358
. eraseToAnyPublisher ( )
372
359
case . flashcards:
373
360
return flashcards (
You can’t perform that action at this time.
0 commit comments