{ formLoading = true; formData.append("tool", JSON.stringify(editableTool)); return async ({ result }) => { if (result.type === "success" && result.data && typeof result.data.toolId === "string") { $settings.tools = [...($settings.tools ?? []), result.data.toolId]; await goto(`${base}/tools/${result.data.toolId}`).then(() => { formLoading = false; }); } else { await applyAction(result).then(() => { formLoading = false; }); } }; }} > {#if tool}

{readonly ? "View" : "Edit"} Tool: {tool.displayName}

{#if !readonly}

Modifying an existing tool will propagate the changes to all users.

{/if} {:else}

Create new tool

Create and share your own tools. All tools are public

{/if}
{#key editableTool.color + editableTool.icon} {/key}