MCPcopy
hub / github.com/solidSpoon/DashPlayer / HumanNormalMessage

Class HumanNormalMessage

src/common/types/msg/HumanNormalMessage.ts:5–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import { ModelMessage } from 'ai';
4
5class HumanNormalMessage implements CustomMessage<HumanNormalMessage> {
6 public content: string;
7 private readonly topic: Topic;
8 constructor(topic: Topic, content: string) {
9 this.topic = topic;
10 this.content = content;
11 }
12
13 async toMsg(): Promise<ModelMessage[]> {
14 return [{
15 role: 'user',
16 content: this.content,
17 }];
18 }
19
20
21 copy(): HumanNormalMessage {
22 return new HumanNormalMessage(this.topic, this.content);
23 }
24
25 msgType: MsgType = 'human-normal';
26
27 getTopic(): Topic {
28 return this.topic;
29 }
30
31 getTaskIds(): number[] {
32 return [];
33 }
34}
35
36export default HumanNormalMessage;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected