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

Function pickDemoResponse

ui/src/composables/useChatV2.ts:63–69  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

61 ];
62
63 const pickDemoResponse = (content: string) => {
64 const list = config.demoResponses?.length ? config.demoResponses : fallbackResponses;
65 const index = demoCursor % list.length;
66 demoCursor += 1;
67 const template = list[index] ?? "";
68 return template.includes("{question}") ? template.split("{question}").join(content) : template;
69 };
70
71 // ==================
72 // 事件处理器

Callers 1

sendMessageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected