MCPcopy Index your code
hub / github.com/stackblitz/bolt.new / updateFile

Method updateFile

app/lib/stores/editor.ts:77–94  ·  view source on GitHub ↗
(filePath: string, newContent: string)

Source from the content-addressed store, hash-verified

75 }
76
77 updateFile(filePath: string, newContent: string) {
78 const documents = this.documents.get();
79 const documentState = documents[filePath];
80
81 if (!documentState) {
82 return;
83 }
84
85 const currentContent = documentState.value;
86 const contentChanged = currentContent !== newContent;
87
88 if (contentChanged) {
89 this.documents.setKey(filePath, {
90 ...documentState,
91 value: newContent,
92 });
93 }
94 }
95}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected