This commit is contained in:
Timothy Jaeryang Baek committed 2026-08-16 23:51:38 -07:00
1 parent 805bfca5af
commit 954613944b
5 files changed
+349 -205

No files matched your search

+5 -2
View File
@@ -31,10 +31,13 @@ export const createNewSkill = async (token: string, skill: object) => {
return res;
};
export const getSkills = async (token: string = '') => {
export const getSkills = async (token: string = '', query: string | null = null) => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/skills/`, {
const searchParams = new URLSearchParams();
if (query) searchParams.append('query', query);
const res = await fetch(`${WEBUI_API_BASE_URL}/skills/?${searchParams.toString()}`, {
method: 'GET',
headers: {
Accept: 'application/json',
+5 -2
View File
@@ -65,10 +65,13 @@ export const loadToolByUrl = async (token: string = '', url: string) => {
return res;
};
export const getTools = async (token: string = '') => {
export const getTools = async (token: string = '', query: string | null = null) => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/tools/`, {
const searchParams = new URLSearchParams();
if (query) searchParams.append('query', query);
const res = await fetch(`${WEBUI_API_BASE_URL}/tools/?${searchParams.toString()}`, {
method: 'GET',
headers: {
Accept: 'application/json',