refactor and add list_snippets

This commit is contained in:
pablof7z
2025-03-31 12:26:50 +01:00
parent 6d0e5a8e79
commit f74736191a
15 changed files with 494 additions and 190 deletions

7
lib/cache/snippets.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
import type { CodeSnippet } from "../types/index.js";
/**
* In-memory cache to store snippets by ID for efficient retrieval
* Used by list_snippets and fetch_snippet_by_id commands
*/
export const snippetsCache: Record<string, CodeSnippet> = {};