Release v4.3.3: Configurable session display and first-time setup UX
Improvements: - Made session display count configurable (DISPLAY_SESSION_COUNT = 8) - Added first-time setup detection with helpful user messaging - Improved UX: First install message clarifies Plugin Hook Error display - Cleaned up code comments Technical changes: - Updated src/hooks/context-hook.ts (configurable session count) - Updated src/hooks/user-message-hook.ts (first-time setup detection) - Rebuilt plugin/scripts/context-hook.js - Rebuilt plugin/scripts/user-message-hook.js - Bumped version to 4.3.3 in all metadata files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,35 @@
|
||||
import { execSync } from "child_process";
|
||||
import { join } from "path";
|
||||
import { homedir } from "os";
|
||||
import { existsSync } from "fs";
|
||||
|
||||
// Check if node_modules exists - if not, this is first run
|
||||
const pluginDir = join(homedir(), '.claude', 'plugins', 'marketplaces', 'thedotmack');
|
||||
const nodeModulesPath = join(pluginDir, 'node_modules');
|
||||
|
||||
if (!existsSync(nodeModulesPath)) {
|
||||
// First-time installation - dependencies not yet installed
|
||||
console.error(`
|
||||
---
|
||||
🎉 Note: This appears under Plugin Hook Error, but it's not an error. That's the only option for
|
||||
user messages in Claude Code UI until a better method is provided.
|
||||
---
|
||||
|
||||
⚠️ Claude-Mem: First-Time Setup
|
||||
|
||||
Dependencies have been installed in the background. This only happens once.
|
||||
|
||||
💡 TIPS:
|
||||
• Memories will start generating while you work
|
||||
• Use /init to write or update your CLAUDE.md for better project context
|
||||
• Try /clear after one session to see what context looks like
|
||||
|
||||
Thank you for installing Claude-Mem!
|
||||
|
||||
This message was not added to your startup context, so you can continue working as normal.
|
||||
`);
|
||||
process.exit(3);
|
||||
}
|
||||
|
||||
try {
|
||||
// Cross-platform path to context-hook.js in the installed plugin
|
||||
|
||||
Reference in New Issue
Block a user