@dcrays/dcgchat-test 0.1.19 → 0.1.21

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/channel.ts +6 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcrays/dcgchat-test",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "type": "module",
5
5
  "description": "OpenClaw channel plugin for 书灵墨宝 (WebSocket)",
6
6
  "main": "index.ts",
package/src/channel.ts CHANGED
@@ -8,7 +8,7 @@ import { logDcgchat } from "./log.js";
8
8
  import { getWsConnection } from "./connection.js";
9
9
  import { getMsgParams } from "./tool.js";
10
10
 
11
- const uploadRoot = resolve(os.homedir(), '../', "upload");
11
+ const uploadRoot = resolve('/', "upload");
12
12
  logDcgchat.info(`uploadRoot: ${uploadRoot}`);
13
13
 
14
14
  function isPathInside(parentPath: string, targetPath: string): boolean {
@@ -86,9 +86,11 @@ export const dcgchatPlugin: ChannelPlugin<ResolvedDcgchatAccount> = {
86
86
  // blockStreaming: true,
87
87
  },
88
88
  agentPrompt: {
89
- messageToolHints: () => [
90
- "- 如果有文件生成,直接将文件生成到根目录的/upload文件夹下,并将文件发送给我",
91
- ],
89
+ messageToolHints: () => {
90
+ return [
91
+ `- 如果有文件生成,直接将文件生成到${uploadRoot}文件夹下,并将文件发送给我`,
92
+ ]
93
+ },
92
94
  },
93
95
  reload: { configPrefixes: ["channels.dcgchat"] },
94
96
  configSchema: {