feat: allow modification of built-in tool types
Remove restrictions on updating and deleting built-in tool types. Show delete button for all tool types in Tool Workshop.
This commit is contained in:
@@ -561,44 +561,26 @@ export const ToolWorkshopPage = () => {
|
||||
{toolType.category || "Uncategorized"} · {toolType.interface_type === "web" ? `Port ${toolType.default_port}` : "Terminal"}
|
||||
</div>
|
||||
</div>
|
||||
{toolType.is_builtin && (
|
||||
<span
|
||||
style={{
|
||||
fontSize: "0.625rem",
|
||||
textTransform: "uppercase",
|
||||
padding: "0.125rem 0.375rem",
|
||||
borderRadius: "9999px",
|
||||
background: selectedToolTypeId === toolType.id ? "rgba(255,255,255,0.25)" : "var(--muted)",
|
||||
color: selectedToolTypeId === toolType.id ? "white" : "var(--muted)",
|
||||
fontWeight: 600,
|
||||
flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
Built-in
|
||||
</span>
|
||||
)}
|
||||
{!toolType.is_builtin && (
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handleDeleteToolType(toolType.id);
|
||||
}}
|
||||
style={{
|
||||
background: "none",
|
||||
border: "none",
|
||||
color: selectedToolTypeId === toolType.id ? "rgba(255,255,255,0.8)" : "var(--muted)",
|
||||
cursor: "pointer",
|
||||
padding: "0.25rem",
|
||||
borderRadius: "0.25rem",
|
||||
flexShrink: 0,
|
||||
opacity: 0,
|
||||
}}
|
||||
className="delete-btn"
|
||||
title="Delete tool type"
|
||||
>
|
||||
<Icon name="delete" size="sm" />
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
handleDeleteToolType(toolType.id);
|
||||
}}
|
||||
style={{
|
||||
background: "none",
|
||||
border: "none",
|
||||
color: selectedToolTypeId === toolType.id ? "rgba(255,255,255,0.8)" : "var(--muted)",
|
||||
cursor: "pointer",
|
||||
padding: "0.25rem",
|
||||
borderRadius: "0.25rem",
|
||||
flexShrink: 0,
|
||||
opacity: 0,
|
||||
}}
|
||||
className="delete-btn"
|
||||
title="Delete tool type"
|
||||
>
|
||||
<Icon name="delete" size="sm" />
|
||||
</button>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user