Skip to content

Commit 20f3c48

Browse files
authored
[Horizon] Remove Chips From Answer Prompt in Assist (#3392)
1 parent 22df472 commit 20f3c48

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

Core/Core/Common/Extensions/Foundation/URLExtensions.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,10 @@ public extension URL {
316316

317317
public extension String {
318318
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
322324
}
323325
}

Horizon/Horizon/Sources/Features/Assist/AssistChat/Domain/AssistChatInteractor.swift

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -355,19 +355,6 @@ class AssistChatInteractorLive: AssistChatInteractor {
355355
return
356356
chatMethod
357357
.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-
}
371358
.eraseToAnyPublisher()
372359
case .flashcards:
373360
return flashcards(

0 commit comments

Comments
 (0)