MCPcopy Create free account
hub / github.com/error311/FileRise / isRemoteSourceId

Function isRemoteSourceId

public/js/fileEditor.js:122–140  ·  view source on GitHub ↗
(sourceId)

Source from the content-addressed store, hash-verified

120}
121
122function isRemoteSourceId(sourceId) {
123 const id = String(sourceId || '').trim();
124 if (!id) return false;
125 let type = '';
126 try {
127 if (typeof window.__frGetSourceTypeById === 'function') {
128 type = String(window.__frGetSourceTypeById(id) || '');
129 }
130 } catch (e) { /* ignore */ }
131 if (!type) {
132 const sel = document.getElementById('sourceSelector');
133 if (sel) {
134 const opt = Array.from(sel.options).find(o => o.value === id);
135 if (opt) type = String(opt.dataset?.sourceType || '');
136 }
137 }
138 type = type.toLowerCase();
139 return type !== '' && type !== 'local';
140}
141
142function showEditorLoading(fileName, seq) {
143 if (!editorLoadingEl) {

Callers 1

editFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected