opencode-plugin-boops 2.1.3 → 2.2.0

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/README.md CHANGED
@@ -49,13 +49,14 @@ Then restart OpenCode. The plugin will be automatically downloaded and installed
49
49
  # Install plugin (adds to OpenCode config)
50
50
  npx opencode-plugin-boops install
51
51
 
52
+ # Configure sounds (TUI browser)
53
+ npx opencode-plugin-boops config # Same as browse
54
+ npx opencode-plugin-boops browse # Browse 448 sounds with semantic tags
55
+
52
56
  # Uninstall plugin (removes from config)
53
57
  npx opencode-plugin-boops uninstall # Interactive - asks about data cleanup
54
58
  npx opencode-plugin-boops uninstall --full # Remove plugin + data
55
59
 
56
- # Browse 448 sounds with semantic tags
57
- npx opencode-plugin-boops browse
58
-
59
60
  # Show help
60
61
  npx opencode-plugin-boops
61
62
  ```
package/cli/browse CHANGED
@@ -1116,9 +1116,20 @@ async function browse() {
1116
1116
  const currentSound = config.sounds ? config.sounds[event] : null;
1117
1117
 
1118
1118
  const bg = isSelected ? '\x1b[48;5;235m' : '';
1119
- const eventText = event.length > pickerWidth - 6
1120
- ? event.slice(0, pickerWidth - 9) + '...'
1121
- : event.padEnd(pickerWidth - 6);
1119
+
1120
+ // Show current sound if selected event has one
1121
+ let eventText;
1122
+ if (isSelected && currentSound) {
1123
+ const soundName = currentSound.length > 15 ? currentSound.slice(0, 12) + '...' : currentSound;
1124
+ const label = event.length > pickerWidth - soundName.length - 10
1125
+ ? event.slice(0, pickerWidth - soundName.length - 13) + '...'
1126
+ : event;
1127
+ eventText = `${label} \x1b[38;5;240m→ \x1b[38;5;76m${soundName}\x1b[0m${bg}`.padEnd(pickerWidth - 6 + 20); // +20 for ANSI codes
1128
+ } else {
1129
+ eventText = event.length > pickerWidth - 6
1130
+ ? event.slice(0, pickerWidth - 9) + '...'
1131
+ : event.padEnd(pickerWidth - 6);
1132
+ }
1122
1133
 
1123
1134
  const indicator = currentSound ? '•' : ' ';
1124
1135
  const indicatorColor = currentSound ? '\x1b[38;5;76m' : '';
package/cli/main CHANGED
@@ -17,6 +17,7 @@ const commands = {
17
17
  install: join(__dirname, "install"),
18
18
  uninstall: join(__dirname, "uninstall"),
19
19
  browse: join(__dirname, "browse"),
20
+ config: join(__dirname, "browse"), // Alias for browse
20
21
  };
21
22
 
22
23
  // Show help if no command or invalid command
@@ -25,7 +26,8 @@ if (!command || !commands[command]) {
25
26
  console.log("Usage:");
26
27
  console.log(" npx opencode-plugin-boops install - Add plugin to OpenCode config");
27
28
  console.log(" npx opencode-plugin-boops uninstall - Remove plugin from config");
28
- console.log(" npx opencode-plugin-boops browse - Browse and test sounds");
29
+ console.log(" npx opencode-plugin-boops config - Configure sounds (TUI)");
30
+ console.log(" npx opencode-plugin-boops browse - Browse and test sounds (same as config)");
29
31
  console.log("");
30
32
  console.log("448 sounds with semantic tags (human, speech, ding, alarm, etc.)");
31
33
  process.exit(command ? 1 : 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-plugin-boops",
3
- "version": "2.1.3",
3
+ "version": "2.2.0",
4
4
  "description": "Sound notifications for OpenCode - plays pleasant sounds when tasks complete or input is needed",
5
5
  "main": "index.ts",
6
6
  "type": "module",