MCPcopy Create free account
hub / github.com/ScattrdBlade/bigFileUpload / applyArgs

Function applyArgs

settings.tsx:608–630  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

606 };
607
608 const applyArgs = (text: string) => {
609 setArgsText(text);
610 const next = readShareXConfigObject(store.sharexConfig);
611
612 if (text.trim() === "") {
613 delete next.Arguments;
614 store.sharexConfig = JSON.stringify(next, null, 2);
615 setArgsInvalid(false);
616 update();
617 return;
618 }
619
620 try {
621 const parsed = JSON.parse(text);
622 if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("not an object");
623 next.Arguments = parsed;
624 store.sharexConfig = JSON.stringify(next, null, 2);
625 setArgsInvalid(false);
626 update();
627 } catch {
628 setArgsInvalid(true);
629 }
630 };
631
632 return (
633 <>

Callers

nothing calls this directly

Calls 1

readShareXConfigObjectFunction · 0.85

Tested by

no test coverage detected