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

Class HumanTopicMessage

src/common/types/msg/HumanTopicMessage.ts:6–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected