(content: string)
| 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) => { |