@myassis/gateway 1.0.32 → 1.0.33

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.
@@ -47,8 +47,8 @@ const getEnvPath = () => {
47
47
  }
48
48
  // 2. pkg 环境:从 snapshot 虚拟路径读取打包的 .env
49
49
  if (process.pkg) {
50
- // __dirname 在 pkg 中指向 /snapshot/pocketclaw/gateway/dist/config
51
- // 打包的 .env 在 /snapshot/pocketclaw/gateway/dist/.env
50
+ // __dirname 在 pkg 中指向 /snapshot/myassis/gateway/dist/config
51
+ // 打包的 .env 在 /snapshot/myassis/gateway/dist/.env
52
52
  const snapshotEnvPath = path.resolve(__dirname, '..', '.env');
53
53
  if (fs.existsSync(snapshotEnvPath)) {
54
54
  return snapshotEnvPath;
@@ -151,12 +151,18 @@ class LLMClient {
151
151
  return [{
152
152
  role: 'tool',
153
153
  tool_call_id: m.tool_call_id,
154
- content: JSON.stringify({
155
- success: contentObj.success,
156
- result_type: 'image',
157
- image_url: contentObj.output,
158
- text_for_llm: '工具生成了一张图片,图片地址已返回。'
159
- }),
154
+ content: '内容在user里面返回',
155
+ }, {
156
+ role: 'user',
157
+ content: [{
158
+ type: 'text',
159
+ text: '请识别这张屏幕截图,然后继续当前任务'
160
+ }, {
161
+ type: 'image_url',
162
+ image_url: {
163
+ url: `data:image/png;base64,${contentObj.output}`
164
+ }
165
+ }]
160
166
  }];
161
167
  }
162
168
  else {
@@ -15,7 +15,7 @@ exports.screenshotTool = {
15
15
  const base64 = imgBuffer.toString('base64');
16
16
  return {
17
17
  success: true,
18
- output: `data:image/jpeg;base64,${base64}`,
18
+ output: `${base64}`,
19
19
  };
20
20
  }
21
21
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myassis/gateway",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "description": "我的助手 Gateway Service - 本地 AI 网关服务,支持认证、WebSocket 实时通信和任务调度",
5
5
  "main": "dist/index.js",
6
6
  "bin": {