opencode-plugin-boops 2.5.2 → 2.5.3

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 (2) hide show
  1. package/cli/browse +2 -26
  2. package/package.json +1 -1
package/cli/browse CHANGED
@@ -5,6 +5,7 @@ import { fileURLToPath } from "url";
5
5
  import { homedir } from "os";
6
6
  import { spawn, exec } from "child_process";
7
7
  import https from "https";
8
+ import { parse } from "smol-toml";
8
9
 
9
10
  // Get the directory where this script is located
10
11
  const __filename = fileURLToPath(import.meta.url);
@@ -96,32 +97,7 @@ function loadCurrentConfig() {
96
97
 
97
98
  try {
98
99
  const content = readFileSync(configPath, "utf-8");
99
- const config = {};
100
-
101
- // Simple TOML parser for our use case
102
- const lines = content.split("\n");
103
- let currentSection = null;
104
-
105
- for (const line of lines) {
106
- const trimmed = line.trim();
107
- if (!trimmed || trimmed.startsWith("#")) continue;
108
-
109
- // Section header
110
- if (trimmed.startsWith("[") && trimmed.endsWith("]")) {
111
- currentSection = trimmed.slice(1, -1);
112
- if (!config[currentSection]) config[currentSection] = {};
113
- continue;
114
- }
115
-
116
- // Key = value (handle quoted keys like "session.error")
117
- const match = trimmed.match(/^"?([^"=]+)"?\s*=\s*"?([^"]+)"?$/);
118
- if (match && currentSection) {
119
- const [, key, value] = match;
120
- config[currentSection][key.trim()] = value.trim().replace(/"/g, "");
121
- }
122
- }
123
-
124
- return config;
100
+ return parse(content);
125
101
  } catch (e) {
126
102
  return {};
127
103
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-plugin-boops",
3
- "version": "2.5.2",
3
+ "version": "2.5.3",
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",