Open History to see the last commit
1// Main entry point
2export {
3 codeModeWithSnippets,
4 createCodeModeWithSnippetsConfig,
5} from './code-mode-with-snippets'
6export type {
7 CodeModeWithSnippetsOptions,
8 CodeModeWithSnippetsResult,
9} from './code-mode-with-snippets'
10
11// Trust strategies
12export {
13 createDefaultTrustStrategy,
14 createAlwaysTrustedStrategy,
15 createRelaxedTrustStrategy,
16 createCustomTrustStrategy,
17} from './trust-strategies'
18export type { TrustStrategy } from './trust-strategies'
19
20// Snippet selection
21export { selectRelevantSnippets } from './select-relevant-snippets'
22
23// Snippets to tools (for direct calling)
24export { snippetsToTools, snippetToTool } from './snippets-to-tools'
25export type { SnippetToToolOptions } from './snippets-to-tools'
26
27// Snippets to bindings (for sandbox injection - legacy)
28export {
29 snippetsToBindings,
30 snippetsToSimpleBindings,
31} from './snippets-to-bindings'
32
33// Snippet management tools
34export { createSnippetManagementTools } from './create-snippet-management-tools'
35
36// System prompt generation
37export { createSnippetsSystemPrompt } from './create-snippets-system-prompt'
38
39// Type generation
40export { generateSnippetTypes } from './generate-snippet-types'
41
42// Storage implementations
43//
44// Only the worker/browser-safe in-memory storage is re-exported from the root
45// entry. The Node-only file storage (`createFileSnippetStorage`) imports
46// `node:fs` / `node:path`, so it lives behind the `@tanstack/ai-code-mode-snippets/storage`
47// subpath to keep this root export safe for Cloudflare Workers and browser bundlers.
48export { createMemorySnippetStorage } from './storage/memory-storage'
49export type { MemorySnippetStorageOptions } from './storage/memory-storage'
50
51// All types
52export type {
53 Snippet,
54 SnippetIndexEntry,
55 SnippetStorage,
56 SnippetsConfig,
57 SnippetStats,
58 TrustLevel,
59 SnippetBinding,
60} from './types'