Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1import fs from 'fs';2import path from 'path';3import { validate, v4 } from 'uuid';4 5const ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json";6const plugin = (options) => ({7 name: "devtools-json",8 enforce: "post",9 configureServer(server) {10 const { config } = server;11 const { logger } = config;12 if (!config.env.DEV) {13 return;14 }15 const getOrCreateUUID = () => {16 if (options?.uuid) {17 return options.uuid;18 }19 let { cacheDir } = config;20 if (!path.isAbsolute(cacheDir)) {21 let { root } = config;22 if (!path.isAbsolute(root)) {23 root = path.resolve(process.cwd(), root);24 }25 cacheDir = path.resolve(root, cacheDir);26 }27 const uuidPath = path.resolve(cacheDir, "uuid.json");28 if (fs.existsSync(uuidPath)) {29 const uuid2 = fs.readFileSync(uuidPath, { encoding: "utf-8" });30 if (validate(uuid2)) {31 return uuid2;32 }33 }34 if (!fs.existsSync(cacheDir)) {35 fs.mkdirSync(cacheDir, { recursive: true });36 }37 const uuid = v4();38 fs.writeFileSync(uuidPath, uuid, { encoding: "utf-8" });39 logger.info(`Generated UUID '${uuid}' for DevTools project settings.`);40 return uuid;41 };42 server.middlewares.use(ENDPOINT, async (req, res) => {43 let { root } = config;44 if (!path.isAbsolute(root)) {45 root = path.resolve(process.cwd(), root);46 }47 if (process.env.WSL_DISTRO_NAME) {48 root = path.join("\\\\wsl.localhost", process.env.WSL_DISTRO_NAME, root).replace(/\//g, "\\");49 }50 const uuid = getOrCreateUUID();51 const devtoolsJson = {52 workspace: {53 root,54 uuid55 }56 };57 res.setHeader("Content-Type", "application/json");58 res.end(JSON.stringify(devtoolsJson, null, 2));59 });60 }61});62 63export { plugin as default };64 