feat 完善注释
This commit is contained in:
@@ -15,7 +15,6 @@ function nowTime(): string {
|
||||
return `今天 ${pad(date.getHours())}:${pad(date.getMinutes())}`
|
||||
}
|
||||
|
||||
/** 历史会话(欢迎语 + 用户提问 + 文件资料) */
|
||||
export function getChatHistory(): Promise<ChatMessage[]> {
|
||||
return Promise.resolve([
|
||||
{
|
||||
@@ -40,7 +39,6 @@ export function getChatHistory(): Promise<ChatMessage[]> {
|
||||
])
|
||||
}
|
||||
|
||||
/** 发送文本消息(echo 用户消息,携带当前时间) */
|
||||
export function sendChatMessage(content: string): Promise<ChatMessage> {
|
||||
return Promise.resolve({
|
||||
id: nextId('chat'),
|
||||
@@ -50,7 +48,6 @@ export function sendChatMessage(content: string): Promise<ChatMessage> {
|
||||
})
|
||||
}
|
||||
|
||||
/** 上传聊天文件(生成文件卡片消息) */
|
||||
export function uploadChatFile(file: File): Promise<ChatMessage> {
|
||||
return Promise.resolve({
|
||||
id: nextId('chat'),
|
||||
@@ -61,7 +58,6 @@ export function uploadChatFile(file: File): Promise<ChatMessage> {
|
||||
})
|
||||
}
|
||||
|
||||
/** 客服自动回复 */
|
||||
export function mockAutoReply(): Promise<ChatMessage> {
|
||||
return Promise.resolve({
|
||||
id: nextId('chat'),
|
||||
|
||||
Reference in New Issue
Block a user