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

Function refreshVisibleFolderForAutomationDetail

public/js/aiChat.js:1176–1192  ·  view source on GitHub ↗
(detail)

Source from the content-addressed store, hash-verified

1174 };
1175
1176 const refreshVisibleFolderForAutomationDetail = (detail) => {
1177 const job = (detail && typeof detail === 'object' && detail.job && typeof detail.job === 'object') ? detail.job : null;
1178 const payload = (job && job.payload && typeof job.payload === 'object') ? job.payload : null;
1179 const result = (payload && payload.aiResult && typeof payload.aiResult === 'object') ? payload.aiResult : null;
1180 if (!result) return;
1181
1182 const mode = String(result.mode || '').trim().toLowerCase();
1183 if (!['tag_images', 'images_tag', 'image_tagging', 'transcribe_audio_tag', 'audio_transcribe_tag', 'transcribe_audio'].includes(mode)) {
1184 return;
1185 }
1186
1187 const resultSourceId = normalizeSourceId(result.sourceId || 'local');
1188 const resultFolder = normalizeFolderPath(result.folder || 'root');
1189 if (resultSourceId !== getActiveSourceId()) return;
1190 if (resultFolder !== getActiveFolder()) return;
1191 refreshFolderView(resultFolder);
1192 };
1193
1194 const refreshVisibleFolderForToolResult = (tool, ws) => {
1195 if (!tool || typeof tool !== 'object') return;

Callers 1

pollFunction · 0.85

Calls 5

getActiveFolderFunction · 0.85
refreshFolderViewFunction · 0.85
normalizeSourceIdFunction · 0.70
normalizeFolderPathFunction · 0.70
getActiveSourceIdFunction · 0.70

Tested by

no test coverage detected