@toothfairyai/tfcode 1.0.0-beta.8 → 1.0.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/tfcode.js +6 -6
  2. package/package.json +1 -1
package/bin/tfcode.js CHANGED
@@ -4,9 +4,13 @@ import yargs from 'yargs';
4
4
  import { hideBin } from 'yargs/helpers';
5
5
  import { spawn } from 'child_process';
6
6
  import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
7
- import { join } from 'path';
7
+ import { join, dirname } from 'path';
8
8
  import { homedir } from 'os';
9
9
  import * as readline from 'readline';
10
+ import { fileURLToPath } from 'url';
11
+
12
+ const __filename = fileURLToPath(import.meta.url);
13
+ const __dirname = dirname(__filename);
10
14
 
11
15
  const TFCODE_DIR = join(homedir(), '.tfcode');
12
16
  const TOOLS_FILE = join(TFCODE_DIR, 'tools.json');
@@ -446,12 +450,8 @@ const cli = yargs(hideBin(process.argv))
446
450
  .command({
447
451
  command: '*',
448
452
  describe: 'start tfcode TUI',
449
- handler: async () => {
453
+ handler: () => {
450
454
  // Try to run the full TUI
451
- const { spawn } = await import('child_process');
452
- const { existsSync } = await import('fs');
453
- const { join } = await import('path');
454
-
455
455
  // Check if we're in the source repo
456
456
  const possiblePaths = [
457
457
  join(__dirname, '..', 'src', 'index.ts'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toothfairyai/tfcode",
3
- "version": "1.0.0-beta.8",
3
+ "version": "1.0.0-beta.9",
4
4
  "description": "ToothFairyAI's official AI coding agent",
5
5
  "keywords": ["toothfairyai", "ai", "coding", "cli"],
6
6
  "author": "ToothFairyAI",