@tencent-ai/codebuddy-code 2.52.0-next.2b9cb1a.20260228 → 2.52.0-next.3e42bcd.20260227
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.
- package/bin/codebuddy +0 -25
- package/dist/codebuddy-headless.js +73 -73
- package/dist/codebuddy.js +57 -57
- package/package.json +1 -1
- package/product.cloudhosted.json +2 -2
- package/product.internal.json +2 -2
- package/product.ioa.json +2 -2
- package/product.json +2 -2
- package/product.selfhosted.json +2 -2
package/bin/codebuddy
CHANGED
|
@@ -40,31 +40,6 @@ if (compareVersions(process.versions.node, minNode) < 0) {
|
|
|
40
40
|
|
|
41
41
|
require('events').EventEmitter.defaultMaxListeners = 50;
|
|
42
42
|
|
|
43
|
-
// Fast path for --version / -v: print version and exit before loading any bundle.
|
|
44
|
-
// This avoids the full DI container initialization (~150 components), network requests,
|
|
45
|
-
// and stdin reads that can cause multi-second startup delays on first install.
|
|
46
|
-
{
|
|
47
|
-
const args = process.argv.slice(2);
|
|
48
|
-
const hasVersionFlag = args.includes('--version') || args.includes('-v');
|
|
49
|
-
// Only apply fast path when no positional sub-command is present
|
|
50
|
-
// (e.g. "cbc mcp add -v somevalue" should NOT be treated as a version request)
|
|
51
|
-
const hasSubCommand = args.some(a => !a.startsWith('-'));
|
|
52
|
-
if (hasVersionFlag && !hasSubCommand) {
|
|
53
|
-
try {
|
|
54
|
-
const pkg = require('../package.json');
|
|
55
|
-
const version = (pkg && pkg.publishConfig && pkg.publishConfig.customPackage && pkg.publishConfig.customPackage.version)
|
|
56
|
-
|| (pkg && pkg.version)
|
|
57
|
-
|| 'unknown';
|
|
58
|
-
// eslint-disable-next-line no-console
|
|
59
|
-
console.log(version);
|
|
60
|
-
} catch (_e) {
|
|
61
|
-
// eslint-disable-next-line no-console
|
|
62
|
-
console.log('unknown');
|
|
63
|
-
}
|
|
64
|
-
process.exit(0);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
43
|
// Route to headless bundle when TUI is not needed
|
|
69
44
|
const args = process.argv.slice(2);
|
|
70
45
|
const isHeadless = args.includes('--print') || args.includes('-p')
|