remove uses of 'require'
This commit is contained in:
parent
6719bc756c
commit
7dcec281a7
2 changed files with 8 additions and 3 deletions
|
|
@ -1,10 +1,12 @@
|
|||
import path from "node:path";
|
||||
import { parentPort } from "node:worker_threads";
|
||||
|
||||
import {
|
||||
env,
|
||||
pipeline,
|
||||
} from "../../vendor/node_modules/@xenova/transformers/types/transformers";
|
||||
|
||||
import TransformersJsEmbeddingsProvider from "./TransformersJsEmbeddingsProvider";
|
||||
const { parentPort } = require("node:worker_threads");
|
||||
|
||||
env.allowLocalModels = true;
|
||||
env.allowRemoteModels = false;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
import childProcess from "node:child_process";
|
||||
import util from "node:util";
|
||||
|
||||
import { ToolImpl } from ".";
|
||||
const util = require("node:util");
|
||||
const asyncExec = util.promisify(require("node:child_process").exec);
|
||||
|
||||
const asyncExec = util.promisify(childProcess.exec);
|
||||
|
||||
export const runTerminalCommandImpl: ToolImpl = async (args, extras) => {
|
||||
const ideInfo = await extras.ide.getIdeInfo();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue