27 lines
802 B
TypeScript
27 lines
802 B
TypeScript
import memoize from 'lodash-es/memoize.js'
|
|
import { setCachedClaudeMdContent } from './bootstrap/state.js'
|
|
|
|
// System prompt injection remains a local cache-busting hook only.
|
|
let systemPromptInjection: string | null = null
|
|
|
|
export function getSystemPromptInjection(): string | null {
|
|
return systemPromptInjection
|
|
}
|
|
|
|
export function setSystemPromptInjection(value: string | null): void {
|
|
systemPromptInjection = value
|
|
getUserContext.cache.clear?.()
|
|
getSystemContext.cache.clear?.()
|
|
}
|
|
|
|
export const getGitStatus = memoize(async (): Promise<string | null> => null)
|
|
|
|
export const getSystemContext = memoize(
|
|
async (): Promise<Record<string, string>> => ({}),
|
|
)
|
|
|
|
export const getUserContext = memoize(async (): Promise<Record<string, string>> => {
|
|
setCachedClaudeMdContent(null)
|
|
return {}
|
|
})
|