MCPcopy Create free account
hub / github.com/angular/examples / addUserPrompt

Method addUserPrompt

dynamic-sdui-app/src/app/chat/chat.service.ts:42–50  ·  view source on GitHub ↗
(newPrompt: string)

Source from the content-addressed store, hash-verified

40 .filter(message => message.author === 'agent').length);
41
42 addUserPrompt(newPrompt: string): void {
43 if (!this.magicAiService.isStreamComplete()) {
44 return;
45 }
46
47 this.magicAiService.prompt.set(newPrompt);
48 this.router.navigate([`/magic/${this.nextIndex()}`]);
49 this.addToConversation({ author: 'user', text: newPrompt });
50 }
51
52 addToConversation(message: Message): void {
53 this.conversationHistory.update(history => {

Callers 8

updatePromptMethod · 0.80
learnMoreMethod · 0.80
searchByTermMethod · 0.80
viewDetailsMethod · 0.80
viewDetailMethod · 0.80
viewDetailsMethod · 0.80
findListingsMethod · 0.80
sendMessageMethod · 0.80

Calls 1

addToConversationMethod · 0.95

Tested by

no test coverage detected