feat: remove install, logs, restore, status, trash, and uninstall commands
- Deleted the install.ts command file, removing the installation logic for the Claude Memory System. - Removed logs.ts command file, eliminating the log viewing functionality. - Deleted restore.ts command file, which handled restoring files from trash. - Removed status.ts command file, which provided system status checks. - Deleted trash-empty.ts and trash-view.ts command files, removing trash management features. - Removed trash.ts command file, which handled moving files to trash. - Deleted uninstall.ts command file, eliminating the uninstallation process for the memory system. - Updated new.ts hook to enforce plugin mode for Claude Code integration. - Cleaned up config.ts by removing unused export for CLI_NAME.
This commit is contained in:
+9
-15
@@ -48,25 +48,19 @@ export function newHook(input?: UserPromptSubmitInput): void {
|
||||
db.close();
|
||||
|
||||
// Start SDK worker in background as detached process
|
||||
// In plugin mode, use bundled worker; otherwise use global CLI
|
||||
const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT;
|
||||
let child;
|
||||
|
||||
if (pluginRoot) {
|
||||
// Plugin mode: use bundled worker
|
||||
const workerPath = path.join(pluginRoot, 'scripts', 'hooks', 'worker.js');
|
||||
child = spawn('bun', [workerPath, sessionId.toString()], {
|
||||
detached: true,
|
||||
stdio: 'ignore'
|
||||
});
|
||||
} else {
|
||||
// Traditional mode: use global CLI
|
||||
child = spawn('claude-mem', ['worker', sessionId.toString()], {
|
||||
detached: true,
|
||||
stdio: 'ignore'
|
||||
});
|
||||
if (!pluginRoot) {
|
||||
throw new Error('CLAUDE_PLUGIN_ROOT not set - claude-mem must be installed as a Claude Code plugin');
|
||||
}
|
||||
|
||||
// Use bundled worker
|
||||
const workerPath = path.join(pluginRoot, 'scripts', 'hooks', 'worker.js');
|
||||
const child = spawn('bun', [workerPath, sessionId.toString()], {
|
||||
detached: true,
|
||||
stdio: 'ignore'
|
||||
});
|
||||
|
||||
child.unref();
|
||||
|
||||
// Output hook response
|
||||
|
||||
Reference in New Issue
Block a user