@mohak34/opencode-notifier 0.2.4 → 0.2.5-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/README.md CHANGED
@@ -67,6 +67,7 @@ Create `~/.config/opencode/opencode-notifier.json` with the defaults:
67
67
  "bell": false,
68
68
  "timeout": 5,
69
69
  "showProjectName": true,
70
+ "showFullPath": false,
70
71
  "showSessionTitle": false,
71
72
  "showIcon": true,
72
73
  "customIconPath": null,
@@ -145,6 +146,7 @@ Create `~/.config/opencode/opencode-notifier.json` with the defaults:
145
146
  "bell": false,
146
147
  "timeout": 5,
147
148
  "showProjectName": true,
149
+ "showFullPath": false,
148
150
  "showSessionTitle": false,
149
151
  "showIcon": true,
150
152
  "suppressWhenFocused": true,
@@ -158,6 +160,7 @@ Create `~/.config/opencode/opencode-notifier.json` with the defaults:
158
160
  - `bell` - Emit terminal BEL (`\x07`) on events (default: false). Behavior depends on your terminal/WM settings
159
161
  - `timeout` - How long notifications show in seconds, Linux only (default: 5)
160
162
  - `showProjectName` - Show folder name in notification title (default: true)
163
+ - `showFullPath` - Show full absolute path instead of folder name in notification title and `{projectName}` token (default: false). When true, shows `OpenCode (/home/user/projects/myapp)` instead of `OpenCode (myapp)`
161
164
  - `showSessionTitle` - Include the session title in notification messages via `{sessionTitle}` placeholder (default: false)
162
165
  - `showIcon` - Show OpenCode icon, Windows/Linux only (default: true)
163
166
  - `customIconPath` - Path to a custom icon for notifications. Useful on WSL where Windows paths are needed (default: null)
package/dist/index.js CHANGED
@@ -94,6 +94,7 @@ var DEFAULT_CONFIG = {
94
94
  bell: false,
95
95
  timeout: 5,
96
96
  showProjectName: true,
97
+ showFullPath: false,
97
98
  showSessionTitle: false,
98
99
  showIcon: true,
99
100
  customIconPath: null,
@@ -229,6 +230,7 @@ function loadConfig() {
229
230
  bell: globalBell,
230
231
  timeout: typeof userConfig.timeout === "number" && userConfig.timeout > 0 ? userConfig.timeout : DEFAULT_CONFIG.timeout,
231
232
  showProjectName: userConfig.showProjectName ?? DEFAULT_CONFIG.showProjectName,
233
+ showFullPath: userConfig.showFullPath ?? DEFAULT_CONFIG.showFullPath,
232
234
  showSessionTitle: userConfig.showSessionTitle ?? DEFAULT_CONFIG.showSessionTitle,
233
235
  showIcon: userConfig.showIcon ?? DEFAULT_CONFIG.showIcon,
234
236
  customIconPath: userConfig.customIconPath ?? DEFAULT_CONFIG.customIconPath,
@@ -1737,7 +1739,7 @@ var NotifierPlugin = async ({ client, directory }) => {
1737
1739
  return {};
1738
1740
  }
1739
1741
  const getConfig = () => loadConfig();
1740
- const projectName = directory ? basename(directory) : null;
1742
+ const projectName = directory ? getConfig().showFullPath ? directory : basename(directory) : null;
1741
1743
  setTimeout(() => {
1742
1744
  handleEvent(getConfig(), "client_connected", projectName, null);
1743
1745
  }, 100);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohak34/opencode-notifier",
3
- "version": "0.2.4",
3
+ "version": "0.2.5-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",