MCPcopy Create free account
hub / github.com/StepfenShawn/ShitCodify / nodeToFile

Function nodeToFile

src/utils/promptGenerator.ts:194–201  ·  view source on GitHub ↗
(node: FileNode)

Source from the content-addressed store, hash-verified

192
193// 辅助函数:将树节点转换为文件
194export function nodeToFile(node: FileNode): File {
195 const file = new File([node.content || ''], node.name);
196 Object.defineProperty(file, 'webkitRelativePath', {
197 value: node.path,
198 writable: false
199 });
200 return file;
201}
202
203// 辅助函数:复制文本到剪贴板
204export function copyToClipboard(text: string): Promise<boolean> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected