Refactor: Update stderr-test-hook to user-message-hook and improve path handling

This commit is contained in:
Alex Newman
2025-10-27 00:04:26 -04:00
parent 15c55a57a3
commit ea54a03fae
3 changed files with 8 additions and 4 deletions
+5 -1
View File
@@ -7,9 +7,13 @@
* since it's currently the only way to display messages in Claude Code UI.
*/
import { execSync } from "child_process";
import { join } from "path";
import { homedir } from "os";
try {
const output = execSync("node ~/.claude/plugins/marketplaces/thedotmack/plugin/scripts/context-hook.js --colors", {
// Cross-platform path to context-hook.js in the installed plugin
const contextHookPath = join(homedir(), '.claude', 'plugins', 'marketplaces', 'thedotmack', 'plugin', 'scripts', 'context-hook.js');
const output = execSync(`node "${contextHookPath}" --colors`, {
encoding: 'utf8'
});