dimcode 0.0.67-beta.0 → 0.0.67-beta.10

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 (3) hide show
  1. package/bin/dim.mjs +3 -45
  2. package/package.json +7 -8
  3. package/dist/ink.mjs +0 -1297
package/bin/dim.mjs CHANGED
@@ -4,7 +4,7 @@ import fs from 'node:fs'
4
4
  import os from 'node:os'
5
5
  import path from 'node:path'
6
6
  import process from 'node:process'
7
- import { fileURLToPath, pathToFileURL } from 'node:url'
7
+ import { fileURLToPath } from 'node:url'
8
8
 
9
9
  const __filename = fileURLToPath(import.meta.url)
10
10
  const __dirname = path.dirname(__filename)
@@ -26,50 +26,8 @@ const wrapperPm
26
26
  : 'npm'
27
27
 
28
28
  const args = process.argv.slice(2)
29
- const routing = resolveRouting(args)
30
-
31
- if (routing.target === 'opentui') {
32
- runOpentui(routing.forwardArgs)
33
- }
34
- else {
35
- await runInk()
36
- }
37
-
38
- function resolveRouting(argv) {
39
- // Explicit `dim ink ...` forces the Ink TUI fallback.
40
- if (argv[0] === 'ink')
41
- return { target: 'ink', forwardArgs: argv.slice(1) }
42
- // Explicit `dim opentui ...` also routes to the opentui binary
43
- // (kept for symmetry; opentui is the default).
44
- if (argv[0] === 'opentui')
45
- return { target: 'opentui', forwardArgs: argv.slice(1) }
46
-
47
- // Default: everything goes to the opentui binary.
48
- return { target: 'opentui', forwardArgs: argv }
49
- }
50
-
51
- async function runInk() {
52
- const inkEntry = path.join(__dirname, '..', 'dist', 'ink.mjs')
53
- if (!fs.existsSync(inkEntry)) {
54
- console.error('[dim] Ink bundle missing: ' + inkEntry)
55
- console.error('[dim] Try reinstalling dimcode@beta.')
56
- process.exit(1)
57
- }
58
- // Inner CLI's DEFAULT_PACKAGE_NAME is already 'dimcode', so no override
59
- // needed. Pass wrapper version through for diagnostics.
60
- process.env.DIMCODE_NPM_PACKAGE = 'dimcode'
61
- process.env.DIMCODE_NPM_PACKAGE_MANAGER = wrapperPm
62
- if (wrapperVersion)
63
- process.env.DIMCODE_NPM_PACKAGE_VERSION = wrapperVersion
64
- try {
65
- await import(pathToFileURL(inkEntry).href)
66
- }
67
- catch (err) {
68
- console.error('[dim] Failed to start Ink TUI:')
69
- console.error(err)
70
- process.exit(1)
71
- }
72
- }
29
+ const forwardArgs = args[0] === 'opentui' ? args.slice(1) : args
30
+ runOpentui(forwardArgs)
73
31
 
74
32
  function runOpentui(restArgs) {
75
33
  const envPath = process.env.DIMCODE_BIN_PATH
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dimcode",
3
- "version": "0.0.67-beta.0",
3
+ "version": "0.0.67-beta.10",
4
4
  "description": "AI coding agent CLI and terminal coding assistant with an interactive TUI (beta channel)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,14 +8,13 @@
8
8
  "dimcode": "./bin/dim.mjs"
9
9
  },
10
10
  "files": [
11
- "bin",
12
- "dist"
11
+ "bin"
13
12
  ],
14
13
  "optionalDependencies": {
15
- "dimcode-darwin-arm64": "0.0.67-beta.0",
16
- "dimcode-darwin-x64": "0.0.67-beta.0",
17
- "dimcode-linux-arm64": "0.0.67-beta.0",
18
- "dimcode-linux-x64": "0.0.67-beta.0",
19
- "dimcode-windows-x64": "0.0.67-beta.0"
14
+ "dimcode-darwin-arm64": "0.0.67-beta.10",
15
+ "dimcode-darwin-x64": "0.0.67-beta.10",
16
+ "dimcode-linux-arm64": "0.0.67-beta.10",
17
+ "dimcode-linux-x64": "0.0.67-beta.10",
18
+ "dimcode-windows-x64": "0.0.67-beta.10"
20
19
  }
21
20
  }