MCPcopy
hub / github.com/srcbookdev/srcbook / onChangeSource

Function onChangeSource

packages/web/src/components/use-package-json.tsx:103–113  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

101 }
102
103 function onChangeSource(source: string) {
104 const updates = { ...cell, source };
105 updateCellOnClient(updates);
106
107 const error = getValidationError(source);
108 setValidationError(error);
109
110 if (error === null) {
111 updateCellOnServer(updates);
112 }
113 }
114
115 const context: PackageJsonContextValue = {
116 source: cell.source,

Callers

nothing calls this directly

Calls 2

getValidationErrorFunction · 0.70
updateCellOnServerFunction · 0.70

Tested by

no test coverage detected