MCPcopy Create free account
hub / github.com/astercloud/aster / pickDemoResponse

Function pickDemoResponse

ui/src/composables/useChat.ts:78–84  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

76 ];
77
78 const pickDemoResponse = (content: string): string => {
79 const list = config.demoResponses?.length ? config.demoResponses : fallbackResponses;
80 const index = demoCursor.value % list.length;
81 demoCursor.value += 1;
82 const template = list[index] ?? "";
83 return template.includes("{question}") ? template.split("{question}").join(content) : template;
84 };
85
86 // 发送消息
87 const sendMessage = async (content: string) => {

Callers 1

sendMessageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected