MCPcopy Create free account
hub / github.com/Microck/opencode-studio / handleApply

Function handleApply

client-next/src/components/presets-manager.tsx:93–102  ·  view source on GitHub ↗
(id: string, mode: 'exclusive' | 'additive')

Source from the content-addressed store, hash-verified

91 };
92
93 const handleApply = async (id: string, mode: 'exclusive' | 'additive') => {
94 try {
95 await applyPreset(id, mode);
96 toast.success(`Preset applied (${mode})`);
97 refreshData();
98 setOpen(false); // Close dialog on success
99 } catch {
100 toast.error("Failed to apply preset");
101 }
102 };
103
104 const handleDelete = async (id: string) => {
105 if (!confirm("Delete this preset?")) return;

Callers 1

PresetsManagerFunction · 0.85

Calls 1

applyPresetFunction · 0.90

Tested by

no test coverage detected