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

Function handleSave

client-next/src/app/config/page.tsx:45–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43 };
44
45 const handleSave = async () => {
46 if (!validateJson()) return;
47
48 try {
49 setSaving(true);
50 const parsed = JSON.parse(content);
51 await saveConfig(parsed);
52 toast.success("Config saved");
53 setHasChanges(false);
54 } catch {
55 toast.error("Failed to save config");
56 } finally {
57 setSaving(false);
58 }
59 };
60
61 const handleReset = () => {
62 if (config) {

Callers

nothing calls this directly

Calls 2

validateJsonFunction · 0.85
saveConfigFunction · 0.50

Tested by

no test coverage detected