Skip to content

Commit 1333620

Browse files
committed
revert an not needed commit
This reverts commit cf084f3.
1 parent cf084f3 commit 1333620

File tree

1 file changed

+8
-31
lines changed

1 file changed

+8
-31
lines changed

src/cli.ts

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -35,35 +35,13 @@ function addPlugin(pluginName: string) {
3535
config.plugin = [];
3636
}
3737

38-
const existing = config.plugin.includes(pluginName);
39-
if (!existing) {
40-
config.plugin.push(pluginName);
41-
console.log(`✅ Added "${pluginName}" to plugins`);
42-
} else {
43-
console.log(`ℹ️ "${pluginName}" already in plugins - ensuring latest version`);
44-
}
45-
saveConfig(config);
46-
console.log(`\n📌 Next steps:`);
47-
console.log(` 1. Restart OpenCode to load latest version`);
48-
}
49-
50-
function updatePlugin(pluginName: string) {
51-
const config = getConfig();
52-
53-
if (!config.plugin) {
54-
config.plugin = [];
55-
}
56-
57-
const existing = config.plugin.includes(pluginName);
58-
if (!existing) {
38+
if (!config.plugin.includes(pluginName)) {
5939
config.plugin.push(pluginName);
40+
saveConfig(config);
6041
console.log(`✅ Added "${pluginName}" to plugins`);
6142
} else {
62-
console.log(`ℹ️ "${pluginName}" already in plugins - forcing reload`);
43+
console.log(`ℹ️ "${pluginName}" is already in plugins`);
6344
}
64-
saveConfig(config);
65-
console.log(`\n📌 Next steps:`);
66-
console.log(` 1. Restart OpenCode to load new version`);
6745
}
6846

6947
function removePlugin(pluginName: string) {
@@ -84,10 +62,10 @@ const command = args[0];
8462
switch (command) {
8563
case 'install':
8664
addPlugin('opencode-workaholic');
87-
break;
88-
89-
case 'update':
90-
updatePlugin('opencode-workaholic');
65+
console.log('\n📌 Next steps:');
66+
console.log(' 1. Restart OpenCode');
67+
console.log(' 2. Run: opencode -c');
68+
console.log(' 3. Verify: workaholic.start, workaholic.status, workaholic.stop');
9169
break;
9270

9371
case 'uninstall':
@@ -101,8 +79,7 @@ opencode-workaholic CLI
10179
10280
Usage:
10381
opencode-workaholic install Add plugin to OpenCode config
104-
opencode-workaholic update Update plugin (reload even if already installed)
105-
opencode-workaholic uninstall Remove plugin from OpenCode config
82+
opencode-workaholic uninstall Remove plugin from OpenCode config
10683
10784
Or use directly:
10885
bunx opencode-workaholic@latest install

0 commit comments

Comments
 (0)