This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tools: { | |
change_directory: tool({ | |
description: "Change the current working directory to navigate to different folders.", | |
inputSchema: z.object({ | |
path: z.string().describe("The directory path to change to (relative or absolute)"), | |
}), | |
execute: async ({ path }) => { | |
try { | |
const resolvedPath = path.startsWith('/') ? path : path; | |
process.chdir(resolvedPath); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use client"; | |
import { useRouter } from 'next/navigation'; | |
import { useState } from 'react'; | |
import { app } from '@/firebaseconfig'; | |
import { getDownloadURL, getStorage, ref, uploadBytesResumable } from 'firebase/storage'; | |
import { doc, getFirestore, setDoc } from 'firebase/firestore'; | |
import { useUser } from "@clerk/nextjs"; | |
import UploadForm from './_components/UploadForm'; | |
const Upload = () => { |