feat: create tm-core and apps/cli (#1093)

- add typescript
- add npm workspaces
This commit is contained in:
Ralph Khreish
2025-09-01 21:44:43 +02:00
parent a7ad4c8e92
commit 0f3ab00f26
162 changed files with 22235 additions and 706 deletions

View File

@@ -4,12 +4,7 @@
*/
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
import supportedModels from './supported-models.json' with { type: 'json' };
/**
* Updates the config file with correct maxTokens values from supported-models.json
@@ -18,12 +13,6 @@ const __dirname = dirname(__filename);
*/
export function updateConfigMaxTokens(configPath) {
try {
// Load supported models
const supportedModelsPath = path.join(__dirname, 'supported-models.json');
const supportedModels = JSON.parse(
fs.readFileSync(supportedModelsPath, 'utf-8')
);
// Load config
const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));