{$i18n.t('Tools')}
{#each $tools.filter((t) => query === '' || t.name.includes(query)) as tool}
{tool.name}
{tool.id}
{tool.meta.description}
{ sessionStorage.tool = JSON.stringify(tool); goto('/workspace/tools/create'); }} >
{ const res = await deleteToolById(localStorage.token, tool.id).catch((error) => { toast.error(error); return null; }); if (res) { toast.success('Tool deleted successfully'); tools.set(await getTools(localStorage.token)); } }} >
{/each}
{ console.log(importFiles); const reader = new FileReader(); reader.onload = async (event) => { const tools = JSON.parse(event.target.result); console.log(tools); }; reader.readAsText(importFiles[0]); }} />
{ toolsImportInputElement.click(); }} >
{$i18n.t('Import Tools')}
{ let blob = new Blob([JSON.stringify($tools)], { type: 'application/json' }); saveAs(blob, `tools-export-${Date.now()}.json`); }} >
{$i18n.t('Export Tools')}