MCPcopy Create free account
hub / github.com/SKaplanOfficial/Raycast-PromptLab / addTextFileDetails

Function addTextFileDetails

src/hooks/useFiles.ts:398–408  ·  view source on GitHub ↗
(filepath: string, currentData: { [key: string]: string; contents: string })

Source from the content-addressed store, hash-verified

396};
397
398const addTextFileDetails = (filepath: string, currentData: { [key: string]: string; contents: string }) => {
399 try {
400 if (fs.lstatSync(filepath).size > 10000000) return;
401 const rawText = fs.readFileSync(filepath, "utf8");
402 const text = rawText;
403 const instruction = `\n<Text of the file: ###${text}###>`;
404 currentData.contents += instruction;
405 } catch (err) {
406 console.error(err);
407 }
408};
409
410const attemptAddRawText = (filepath: string, currentData: { [key: string]: string; contents: string }) => {
411 try {

Callers 1

getFileContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected