@christianriedl/utils 1.0.135 → 1.0.136

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": "@christianriedl/utils",
3
- "version": "1.0.135",
3
+ "version": "1.0.136",
4
4
  "description": "Interfaces, local storage, service worker, configuration, application state",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,8 +30,8 @@
30
30
  const selectedVectorStoreName = ref('');
31
31
  const selectedVectorStoreFile = ref('');
32
32
  const showFunctions = ref(false);
33
- const toolName = ref<>('');
34
- const functions = ref<IFunction[]>([]);
33
+ const toolName = ref('');
34
+ const toolFunctions = reactive<IFunction[]>([]);
35
35
  let fileHandle: FileSystemFileHandle | null = null;
36
36
 
37
37
  initializeTools();
@@ -78,7 +78,8 @@
78
78
  toolName.value = serverLabel;
79
79
  const res = await openAI.getToolFunctions(serverLabel);
80
80
  if (res.json) {
81
- functions.value = res.json as IFunction[];
81
+ const funcs = res.json.tools as IFunction[];
82
+ toolFunctions.splice(0, toolFunctions.length, ...funcs);
82
83
  showFunctions.value = true;
83
84
  }
84
85
  }
@@ -245,8 +246,8 @@
245
246
  density="compact" label="Approval" @update:modelValue="onToolChange">
246
247
  </v-select>
247
248
  </v-col>
248
- <v-col v-if="!props.isMobile" cols="1">
249
- <v-btn variant="text" prepend-icon="$search" @click="showTools(tool.server_label))">TOOLS </v-btn>
249
+ <v-col v-if="!props.ismobile" cols="1">
250
+ <v-btn variant="text" prepend-icon="$search" @click="showTools(tool.server_label)">TOOLS</v-btn>
250
251
  </v-col>
251
252
  <v-col cols="1">
252
253
  <v-checkbox v-model="use[key]" label="Use" hide-details density="compact" @update:modelValue="onUseChange"></v-checkbox>
@@ -333,9 +334,9 @@
333
334
  <v-dialog v-model="showFunctions">
334
335
  <v-container fluid class="bg-office overflow-y-auto">
335
336
  <h4>{{toolName + " functions"}}</h4>
336
- <v-row dense align="center" v-for="func in functions" v-key="func.name">
337
- <v-col cols="5">{{func.name}}</v-col>
338
- <v-col cols="7">{{func.description}}</v-col>
337
+ <v-row dense align="center" v-for="func in toolFunctions" :key="func.name">
338
+ <v-col cols="4">{{func.name}}</v-col>
339
+ <v-col cols="8">{{func.description}}</v-col>
339
340
  </v-row>
340
341
  <v-row dense align="center">
341
342
  <v-col cols="2">