@dcrays/dcgchat-test 0.1.18 → 0.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcrays/dcgchat-test",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "type": "module",
5
5
  "description": "OpenClaw channel plugin for 书灵墨宝 (WebSocket)",
6
6
  "main": "index.ts",
package/src/bot.ts CHANGED
@@ -127,20 +127,19 @@ export async function handleDcgchatMessage(params: {
127
127
  const envelopeOptions = core.channel.reply.resolveEnvelopeFormatOptions(cfg);
128
128
  // const messageBody = `${userId}: ${text}`;
129
129
  // 补充消息
130
- const supplementMessage = `\n<br/> 如果有文件生成,直接将文件生成到 ${targetPath}/upload 目录下,并将文件发送给我,如果没有生成文件请忽略`;
131
130
  const messageBody = text;
132
131
  const bodyFormatted = core.channel.reply.formatAgentEnvelope({
133
132
  channel: "书灵墨宝",
134
133
  from: userId,
135
134
  timestamp: new Date(),
136
135
  envelope: envelopeOptions,
137
- body: messageBody + supplementMessage,
136
+ body: messageBody,
138
137
  });
139
138
 
140
139
  const ctxPayload = core.channel.reply.finalizeInboundContext({
141
140
  Body: bodyFormatted,
142
- RawBody: text + supplementMessage,
143
- CommandBody: text + supplementMessage,
141
+ RawBody: text,
142
+ CommandBody: text,
144
143
  From: userId,
145
144
  To: userId,
146
145
  SessionKey: route.sessionKey,
package/src/channel.ts CHANGED
@@ -85,6 +85,13 @@ export const dcgchatPlugin: ChannelPlugin<ResolvedDcgchatAccount> = {
85
85
  effects: true,
86
86
  // blockStreaming: true,
87
87
  },
88
+ agentPrompt: {
89
+ messageToolHints: () => {
90
+ return [
91
+ `- 如果有文件生成,直接将文件生成到根目录的${uploadRoot}文件夹下,并将文件发送给我`,
92
+ ]
93
+ },
94
+ },
88
95
  reload: { configPrefixes: ["channels.dcgchat"] },
89
96
  configSchema: {
90
97
  schema: {