@mohak34/opencode-notifier 0.2.7 → 0.2.8-beta.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/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -815,7 +815,7 @@ function execWithTimeout(command, timeoutMs = 500) {
|
|
|
815
815
|
}
|
|
816
816
|
function execFileWithTimeout(command, args, timeoutMs = 500) {
|
|
817
817
|
try {
|
|
818
|
-
return execFileSync(command, args, { timeout: timeoutMs, encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim();
|
|
818
|
+
return execFileSync(command, args, { timeout: timeoutMs, encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"], windowsHide: true }).trim();
|
|
819
819
|
} catch {
|
|
820
820
|
return null;
|
|
821
821
|
}
|
|
@@ -902,9 +902,9 @@ function getLinuxWaylandActiveWindowId() {
|
|
|
902
902
|
}
|
|
903
903
|
function getWindowsActiveWindowId() {
|
|
904
904
|
const script = `$type=Add-Type -Name FocusHelper -Namespace OpenCodeNotifier -MemberDefinition '[DllImport("user32.dll")] public static extern IntPtr GetForegroundWindow();' -PassThru; $type::GetForegroundWindow()`;
|
|
905
|
-
let windowId = execFileWithTimeout("powershell", ["-NoProfile", "-NonInteractive", "-
|
|
905
|
+
let windowId = execFileWithTimeout("powershell", ["-NoProfile", "-NonInteractive", "-Command", script], 1000);
|
|
906
906
|
if (!windowId)
|
|
907
|
-
windowId = execFileWithTimeout("pwsh", ["-NoProfile", "-NonInteractive", "-
|
|
907
|
+
windowId = execFileWithTimeout("pwsh", ["-NoProfile", "-NonInteractive", "-Command", script], 1000);
|
|
908
908
|
return windowId;
|
|
909
909
|
}
|
|
910
910
|
function getMacOSActiveWindowId() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mohak34/opencode-notifier",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8-beta.0",
|
|
4
4
|
"description": "OpenCode plugin that sends system notifications and plays sounds when permission is needed, generation completes, or errors occur",
|
|
5
5
|
"author": "mohak34",
|
|
6
6
|
"license": "MIT",
|