File tree Expand file tree Collapse file tree 6 files changed +162
-56
lines changed
routes/page/agent/[agentId] Expand file tree Collapse file tree 6 files changed +162
-56
lines changed Original file line number Diff line number Diff line change 123123/**
124124 * @typedef {Object } AgentUtility
125125 * @property {string } name
126+ * @property {boolean } disabled
126127 * @property {UtilityBase[] } functions
127128 * @property {UtilityBase[] } templates
128129 */
Original file line number Diff line number Diff line change 111111 .merge-utility {
112112 display : flex ;
113113 gap : 3px ;
114-
114+
115115 input {
116116 outline : none !important ;
117117 box-shadow : none !important ;
150150
151151 .utility-row-primary {
152152 display : flex ;
153+
154+ .utility-label {
155+ display : flex ;
156+ gap : 10px ;
157+
158+ .utility-tooltip {
159+ display : flex ;
160+ gap : 3px ;
161+ }
162+
163+ input {
164+ outline : none !important ;
165+ box-shadow : none !important ;
166+ }
167+ }
153168 }
154169
155170 .utility-row-secondary {
Original file line number Diff line number Diff line change @@ -84,10 +84,10 @@ export async function createAgent(agent) {
8484
8585/**
8686 * Get agent utilities
87- * @returns {Promise<string []> }
87+ * @returns {Promise<import('$agentTypes').AgentUtility []> }
8888 */
89- export async function getAgentUtilities ( ) {
90- const url = endpoints . agentUtilitiesUrl ;
89+ export async function getAgentUtilityOptions ( ) {
90+ const url = endpoints . agentUtilityOptionsUrl ;
9191 const response = await axios . get ( url ) ;
9292 return response . data ;
9393}
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export const endpoints = {
3333 agentDetailUrl : `${ host } /agent/{id}` ,
3434 agentRefreshUrl : `${ host } /refresh-agents` ,
3535 agentCreateUrl : `${ host } /agent` ,
36- agentUtilitiesUrl : `${ host } /agent/utilities ` ,
36+ agentUtilityOptionsUrl : `${ host } /agent/utility/options ` ,
3737
3838 // agent task
3939 agentTaskListUrl : `${ host } /agent/tasks` ,
Original file line number Diff line number Diff line change 44 import InPlaceEdit from ' $lib/common/InPlaceEdit.svelte'
55 import { format } from ' $lib/helpers/datetime' ;
66 import { AgentType } from ' $lib/helpers/enums' ;
7- import { getAgentUtilities } from ' $lib/services/agent-service' ;
87
98 const profileLimit = 10 ;
109
1514 /** @type {string[]} */
1615 export let profiles = [];
1716
18- /** @type {string[]} */
19- let utilityOptions = [];
20-
21- onMount (() => {
22- getAgentUtilities ().then (data => {
23- const list = data? .filter (x => x? .trim ()? .length > 0 ) || [];
24- utilityOptions = [" " , ... list];
25- });
26- });
17+ onMount (() => {});
2718
2819 function addProfile () {
2920 if (!!! agent) return ;
You can’t perform that action at this time.
0 commit comments