mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 04:00:36 +00:00
chore: remove tiktoken dependency and replace with character-based token estimation
This commit is contained in:
parent
ff5ea3c6d7
commit
35c865968f
22 changed files with 329 additions and 595 deletions
|
|
@ -98,17 +98,6 @@ console.log('Creating package.json for distribution...');
|
|||
const rootPackageJson = JSON.parse(
|
||||
fs.readFileSync(path.join(rootDir, 'package.json'), 'utf-8'),
|
||||
);
|
||||
const corePackageJson = JSON.parse(
|
||||
fs.readFileSync(
|
||||
path.join(rootDir, 'packages', 'core', 'package.json'),
|
||||
'utf-8',
|
||||
),
|
||||
);
|
||||
|
||||
const runtimeDependencies = {};
|
||||
if (corePackageJson.dependencies?.tiktoken) {
|
||||
runtimeDependencies.tiktoken = corePackageJson.dependencies.tiktoken;
|
||||
}
|
||||
|
||||
// Create a clean package.json for the published package
|
||||
const distPackageJson = {
|
||||
|
|
@ -124,7 +113,7 @@ const distPackageJson = {
|
|||
},
|
||||
files: ['cli.js', 'vendor', '*.sb', 'README.md', 'LICENSE', 'locales'],
|
||||
config: rootPackageJson.config,
|
||||
dependencies: runtimeDependencies,
|
||||
dependencies: {},
|
||||
optionalDependencies: {
|
||||
'@lydell/node-pty': '1.1.0',
|
||||
'@lydell/node-pty-darwin-arm64': '1.1.0',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue