MCPcopy Create free account
hub / github.com/msgbyte/tailchat / handleSendFile

Function handleSendFile

client/web/src/components/ChatBox/ChatInputBox/Addon.tsx:35–45  ·  view source on GitHub ↗
(file: File)

Source from the content-addressed store, hash-verified

33 };
34
35 const handleSendFile = (file: File) => {
36 // 发送文件
37 if (file) {
38 // 发送图片
39 uploadMessageFile(file).then(({ name, url }) => {
40 actionContext.sendMsg(
41 getMessageTextDecorators().card(name, { type: 'file', url })
42 );
43 });
44 }
45 };
46
47 const menu: MenuProps = {
48 items: [

Callers 1

Addon.tsxFile · 0.85

Calls 2

uploadMessageFileFunction · 0.90
getMessageTextDecoratorsFunction · 0.90

Tested by

no test coverage detected