@tdsoft-tech/aikit 0.1.8 → 0.1.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.
- package/dist/cli.js +8 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4117,13 +4117,18 @@ var CliDetector = class {
|
|
|
4117
4117
|
try {
|
|
4118
4118
|
const opencodePath = process.platform === "win32" ? process.env.APPDATA || join12(homedir2(), "AppData", "Roaming") : join12(homedir2(), ".config");
|
|
4119
4119
|
const opencodeConfig = join12(opencodePath, "opencode", "opencode.json");
|
|
4120
|
-
|
|
4120
|
+
let installed = existsSync4(opencodeConfig);
|
|
4121
4121
|
let version;
|
|
4122
4122
|
if (installed) {
|
|
4123
4123
|
try {
|
|
4124
4124
|
execSync("opencode --version", { stdio: "ignore" });
|
|
4125
4125
|
version = "installed";
|
|
4126
|
-
} catch {
|
|
4126
|
+
} catch (error) {
|
|
4127
|
+
if (existsSync4(opencodeConfig)) {
|
|
4128
|
+
version = "installed (config exists)";
|
|
4129
|
+
} else {
|
|
4130
|
+
installed = false;
|
|
4131
|
+
}
|
|
4127
4132
|
}
|
|
4128
4133
|
}
|
|
4129
4134
|
return {
|
|
@@ -4236,7 +4241,7 @@ program.command("init").description("Initialize AIKit configuration").option("-g
|
|
|
4236
4241
|
const cliTools = await CliDetector.checkAll();
|
|
4237
4242
|
const installableTools = CliDetector.filterInstallable(cliTools);
|
|
4238
4243
|
for (const tool of cliTools) {
|
|
4239
|
-
const status = tool.
|
|
4244
|
+
const status = tool.isInstalled ? chalk2.green("\u2713 Installed") : chalk2.yellow("\u2717 Not installed");
|
|
4240
4245
|
const version = tool.version ? chalk2.gray(` (${tool.version})`) : "";
|
|
4241
4246
|
console.log(` ${status} ${chalk2.cyan(tool.displayName)}${version}`);
|
|
4242
4247
|
}
|