@cloudbase/cli 2.7.4 → 2.7.5

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.
@@ -37,6 +37,13 @@
37
37
  const envId = urlParams.get('envId'); // 获取 envId 参数
38
38
  const port = urlParams.get('port'); // 获取 port 参数
39
39
 
40
+ const EList = {
41
+ HTTP: 'HTTP',
42
+ WEBSOCKET: 'WebSocket',
43
+ SSE: 'Server-sent Event',
44
+ AGENT: 'AGENT',
45
+ };
46
+
40
47
  // 监听来自VSCode扩展的消息
41
48
  window.addEventListener('message', (event) => {
42
49
  const message = event.data;
@@ -54,12 +61,13 @@
54
61
  url: `http://127.0.0.1:${port}${type === 'agent' ? `/v1/aibot/bots/${agentId}/send-message` : ''}`,
55
62
  resourceType: 'FunctionV2',
56
63
  body: type === "agent" ? { botId: agentId, msg: 'hi', searchEnable: false, files: [] } : {},
57
- defaultType: type === 'agent' ? 'AGENT' : 'HTTP',
64
+ defaultType: type === 'agent' ? EList.AGENT : EList.HTTP,
58
65
  agentConfig: {
59
66
  uin: '',
60
67
  envId,
61
68
  ibotId: agentId,
62
69
  },
70
+ options: { showTabs: type === 'agent' ? [EList.AGENT, EList.SSE, EList.HTTP] : null },
63
71
  }
64
72
  });
65
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/cli",
3
- "version": "2.7.4",
3
+ "version": "2.7.5",
4
4
  "description": "cli tool for cloudbase",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {