@budibase/frontend-core 3.12.7 → 3.12.9

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": "@budibase/frontend-core",
3
- "version": "3.12.7",
3
+ "version": "3.12.9",
4
4
  "description": "Budibase frontend core libraries used in builder and client",
5
5
  "author": "Budibase",
6
6
  "license": "MPL-2.0",
@@ -17,5 +17,5 @@
17
17
  "shortid": "2.2.15",
18
18
  "socket.io-client": "^4.7.5"
19
19
  },
20
- "gitHead": "87d0fd4e2bfa88a5f45312ce133670856957b97b"
20
+ "gitHead": "549f9e9ee4b8ecd936f5df25bcf2dad85de09b2d"
21
21
  }
package/src/api/agents.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import {
2
2
  AgentChat,
3
+ AgentToolSource,
4
+ AgentToolSourceWithTools,
3
5
  ChatAgentRequest,
4
6
  ChatAgentResponse,
7
+ CreateToolSourceRequest,
5
8
  FetchAgentHistoryResponse,
6
9
  } from "@budibase/types"
7
10
  import { BaseAPIClient } from "./types"
@@ -11,6 +14,13 @@ export interface AgentEndpoints {
11
14
 
12
15
  removeChat: (historyId: string) => Promise<void>
13
16
  fetchChats: () => Promise<FetchAgentHistoryResponse>
17
+
18
+ fetchToolSources: () => Promise<AgentToolSourceWithTools[]>
19
+ createToolSource: (
20
+ toolSource: CreateToolSourceRequest
21
+ ) => Promise<{ created: true }>
22
+ updateToolSource: (toolSource: AgentToolSource) => Promise<AgentToolSource>
23
+ deleteToolSource: (toolSourceId: string) => Promise<{ deleted: true }>
14
24
  }
15
25
 
16
26
  export const buildAgentEndpoints = (API: BaseAPIClient): AgentEndpoints => ({
@@ -33,4 +43,30 @@ export const buildAgentEndpoints = (API: BaseAPIClient): AgentEndpoints => ({
33
43
  url: "/api/agent/history",
34
44
  })
35
45
  },
46
+
47
+ fetchToolSources: async () => {
48
+ return await API.get({
49
+ url: "/api/agent/toolsource",
50
+ })
51
+ },
52
+
53
+ createToolSource: async (toolSource: CreateToolSourceRequest) => {
54
+ return await API.post({
55
+ url: "/api/agent/toolsource",
56
+ body: toolSource as any,
57
+ })
58
+ },
59
+
60
+ updateToolSource: async (toolSource: AgentToolSource) => {
61
+ return await API.put({
62
+ url: "/api/agent/toolsource",
63
+ body: toolSource as any,
64
+ })
65
+ },
66
+
67
+ deleteToolSource: async (toolSourceId: string) => {
68
+ return await API.delete({
69
+ url: `/api/agent/toolsource/${toolSourceId}`,
70
+ })
71
+ },
36
72
  })
@@ -403,7 +403,7 @@
403
403
  Move right
404
404
  </MenuItem>
405
405
  <MenuItem
406
- disabled={column.primaryDisplay || !$config.showControls}
406
+ disabled={column.primaryDisplay}
407
407
  icon="VisibilityOff"
408
408
  on:click={hideColumn}
409
409
  >