MCPcopy Create free account
hub / github.com/camenduru/TostUI / loadTextFileContent

Function loadTextFileContent

components/canvas-editor.tsx:4619–4629  ·  view source on GitHub ↗
(filePath: string, fileKey: string)

Source from the content-addressed store, hash-verified

4617 }
4618
4619 const loadTextFileContent = async (filePath: string, fileKey: string) => {
4620 try {
4621 const response = await fetch(filePath)
4622 if (response.ok) {
4623 const content = await response.text()
4624 setTextFileContents(prev => ({ ...prev, [fileKey]: content }))
4625 }
4626 } catch (error) {
4627 console.error('Failed to load text file:', error)
4628 }
4629 }
4630
4631 const getTextFileKey = (serviceId: string, type: string, file: string) => {
4632 return `${serviceId}-${type}-${file}`

Callers 1

handleViewExamplesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected