Team Ai
Datasetpublic

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.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
launchApp.js129 linesDownload Raw Back to server
1"use strict";2var __create = Object.create;3var __defProp = Object.defineProperty;4var __getOwnPropDesc = Object.getOwnPropertyDescriptor;5var __getOwnPropNames = Object.getOwnPropertyNames;6var __getProtoOf = Object.getPrototypeOf;7var __hasOwnProp = Object.prototype.hasOwnProperty;8var __export = (target, all) => {9  for (var name in all)10    __defProp(target, name, { get: all[name], enumerable: true });11};12var __copyProps = (to, from, except, desc) => {13  if (from && typeof from === "object" || typeof from === "function") {14    for (let key of __getOwnPropNames(from))15      if (!__hasOwnProp.call(to, key) && key !== except)16        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });17  }18  return to;19};20var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(21  // If the importer is in node compatibility mode or this is not an ESM22  // file that has been converted to a CommonJS file using a Babel-23  // compatible transform (i.e. "__esModule" has not been set), then set24  // "default" to the CommonJS "module.exports" for node compatibility.25  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,26  mod27));28var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);29var launchApp_exports = {};30__export(launchApp_exports, {31  launchApp: () => launchApp,32  syncLocalStorageWithSettings: () => syncLocalStorageWithSettings33});34module.exports = __toCommonJS(launchApp_exports);35var import_fs = __toESM(require("fs"));36var import_path = __toESM(require("path"));37var import_utils = require("../utils");38var import_registry = require("./registry");39var import_registry2 = require("./registry");40var import_progress = require("./progress");41async function launchApp(browserType, options) {42  const args = [...options.persistentContextOptions?.args ?? []];43  let channel = options.persistentContextOptions?.channel;44  if (browserType.name() === "chromium") {45    args.push(46      "--app=data:text/html,",47      `--window-size=${options.windowSize.width},${options.windowSize.height}`,48      ...options.windowPosition ? [`--window-position=${options.windowPosition.x},${options.windowPosition.y}`] : [],49      "--test-type="50    );51    if (!channel && !options.persistentContextOptions?.executablePath)52      channel = (0, import_registry.findChromiumChannelBestEffort)(options.sdkLanguage);53  }54  const controller = new import_progress.ProgressController();55  let context;56  try {57    context = await controller.run((progress) => browserType.launchPersistentContext(progress, "", {58      ignoreDefaultArgs: ["--enable-automation"],59      ...options?.persistentContextOptions,60      channel,61      noDefaultViewport: options.persistentContextOptions?.noDefaultViewport ?? true,62      acceptDownloads: options?.persistentContextOptions?.acceptDownloads ?? ((0, import_utils.isUnderTest)() ? "accept" : "internal-browser-default"),63      colorScheme: options?.persistentContextOptions?.colorScheme ?? "no-override",64      args65    }), 0);66  } catch (error) {67    if (channel) {68      error = (0, import_utils.rewriteErrorMessage)(error, [69        `Failed to launch "${channel}" channel.`,70        "Using custom channels could lead to unexpected behavior due to Enterprise policies (chrome://policy).",71        "Install the default browser instead:",72        (0, import_utils.wrapInASCIIBox)(`${(0, import_registry.buildPlaywrightCLICommand)(options.sdkLanguage, "install")}`, 2)73      ].join("\n"));74    }75    throw error;76  }77  const [page] = context.pages();78  if (browserType.name() === "chromium" && process.platform === "darwin") {79    context.on("page", async (newPage) => {80      if (newPage.mainFrame().url() === "chrome://new-tab-page/") {81        await page.bringToFront();82        await newPage.close();83      }84    });85  }86  if (browserType.name() === "chromium")87    await installAppIcon(page);88  return { context, page };89}90async function installAppIcon(page) {91  const icon = await import_fs.default.promises.readFile(require.resolve("./chromium/appIcon.png"));92  const crPage = page.delegate;93  await crPage._mainFrameSession._client.send("Browser.setDockTile", {94    image: icon.toString("base64")95  });96}97async function syncLocalStorageWithSettings(page, appName) {98  if ((0, import_utils.isUnderTest)())99    return;100  const settingsFile = import_path.default.join(import_registry2.registryDirectory, ".settings", `${appName}.json`);101  const controller = new import_progress.ProgressController();102  await controller.run(async (progress) => {103    await page.exposeBinding(progress, "_saveSerializedSettings", false, (_, settings2) => {104      import_fs.default.mkdirSync(import_path.default.dirname(settingsFile), { recursive: true });105      import_fs.default.writeFileSync(settingsFile, settings2);106    });107    const settings = await import_fs.default.promises.readFile(settingsFile, "utf-8").catch(() => "{}");108    await page.addInitScript(109      progress,110      `(${String((settings2) => {111        if (location && location.protocol === "data:")112          return;113        if (window.top !== window)114          return;115        Object.entries(settings2).map(([k, v]) => localStorage[k] = v);116        window.saveSettings = () => {117          window._saveSerializedSettings(JSON.stringify({ ...localStorage }));118        };119      })})(${settings});120    `121    );122  });123}124// Annotate the CommonJS export names for ESM import in node:1250 && (module.exports = {126  launchApp,127  syncLocalStorageWithSettings128});129 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai