fix: address Copilot review on release/3.3.2
Non-ASCII glyphs (regression of the #681 class of Windows UnicodeEncodeError): - mempalace/cli.py: "✗" → "ERROR:", "⚠" → "WARNING:", em dash → "-" - mempalace/sweeper.py: "⚠" → "WARNING:" Backend arg validation: - mempalace/backends/chroma.py: `_normalize_get_collection_args` now raises TypeError on unexpected trailing positional args instead of silently dropping them — surfaces call-site bugs early. Docs site: - website/.vitepress/config.mts: gate Google Analytics scripts behind MEMPALACE_DOCS_GA_ID env var (default off). Self-hosters no longer get GA injected unconditionally. Landing page SPA hygiene: - website/.vitepress/theme/landing/useLandingEffects.js: collect all IntersectionObserver disconnects and removeEventListener thunks in a shared `cleanups` registry; drain it in `onBeforeUnmount` so observers and form/replay listeners don't leak across SPA navigations.
This commit is contained in:
@@ -11,6 +11,7 @@ function normalizeBase(base?: string): string {
|
||||
|
||||
const docsBase = normalizeBase(process.env.DOCS_BASE || '/')
|
||||
const editBranch = process.env.DOCS_EDIT_BRANCH || 'main'
|
||||
const gaId = process.env.MEMPALACE_DOCS_GA_ID
|
||||
|
||||
export default withMermaid(
|
||||
defineConfig({
|
||||
@@ -26,8 +27,10 @@ export default withMermaid(
|
||||
['meta', { property: 'og:title', content: 'MemPalace — AI Memory System' }],
|
||||
['meta', { property: 'og:description', content: '96.6% LongMemEval recall. Zero API calls. Local, free, open source.' }],
|
||||
['meta', { property: 'og:image', content: `${docsBase}mempalace_logo.png` }],
|
||||
['script', { async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-PPQE4Z7P1K' }],
|
||||
['script', {}, `window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', 'G-PPQE4Z7P1K');`],
|
||||
...(gaId ? [
|
||||
['script', { async: '', src: `https://www.googletagmanager.com/gtag/js?id=${gaId}` }],
|
||||
['script', {}, `window.dataLayer = window.dataLayer || [];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js', new Date());\ngtag('config', '${gaId}');`],
|
||||
] as const : []),
|
||||
],
|
||||
|
||||
themeConfig: {
|
||||
|
||||
Reference in New Issue
Block a user