@dcrays/dcgchat-test 0.1.18 → 0.1.19
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 +1 -1
- package/src/bot.ts +3 -4
- package/src/channel.ts +5 -0
package/package.json
CHANGED
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
|
|
136
|
+
body: messageBody,
|
|
138
137
|
});
|
|
139
138
|
|
|
140
139
|
const ctxPayload = core.channel.reply.finalizeInboundContext({
|
|
141
140
|
Body: bodyFormatted,
|
|
142
|
-
RawBody: text
|
|
143
|
-
CommandBody: text
|
|
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,11 @@ export const dcgchatPlugin: ChannelPlugin<ResolvedDcgchatAccount> = {
|
|
|
85
85
|
effects: true,
|
|
86
86
|
// blockStreaming: true,
|
|
87
87
|
},
|
|
88
|
+
agentPrompt: {
|
|
89
|
+
messageToolHints: () => [
|
|
90
|
+
"- 如果有文件生成,直接将文件生成到根目录的/upload文件夹下,并将文件发送给我",
|
|
91
|
+
],
|
|
92
|
+
},
|
|
88
93
|
reload: { configPrefixes: ["channels.dcgchat"] },
|
|
89
94
|
configSchema: {
|
|
90
95
|
schema: {
|