You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!response.ok) {
const errorText = await response.text();
console.error('Error:', errorText);
throw new Error(`Failed to fetch: ${response.statusText}`);
}
const data = await response.json();
console.log('Response Data:', data);
if (!Array.isArray(data.paths)) {
throw new Error('Expected an array for paths');
}
buildTree(data.paths); // Ensure data.paths is an array
} catch (error) {
console.error('Error in handleBatch:', error);
}
}
function buildTree(paths) {
if (!Array.isArray(paths)) {
console.error('Expected an array for paths, but got:', paths);
return;
}
paths.forEach(path => {
console.log('Path:', path);
// Your tree-building logic here
});
}
The text was updated successfully, but these errors were encountered:
I have not been able to get the llama-fs running yet. With the help of GPT, I was able to get down to only two error messages:
Call Stack
buildTree
renderer.dev.js:49482:11
handleBatch
renderer.dev.js:49532:26
GPT is telling me to do these two more things but I'm not sure where they will go or if it will fix it.
async function handleBatch() {
try {
const response = await fetch("http://127.0.0.1:8000/batch", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
base_path: "C:\Users\slyre\Downloads\",
src_path: "src_folder",
dst_path: "dst_folder"
})
});
}
function buildTree(paths) {
if (!Array.isArray(paths)) {
console.error('Expected an array for paths, but got:', paths);
return;
}
}
The text was updated successfully, but these errors were encountered: