config.ts
services/autoDream/config.ts
22
Lines
892
Bytes
1
Exports
2
Imports
10
Keywords
What this is
This page documents one file from the repository and includes its full source so you can read it without leaving the docs site.
Beginner explanation
This file is one piece of the larger system. Its name, directory, imports, and exports show where it fits. Start by reading the exports and related files first.
How it is used
Start from the exports list and related files. Those are the easiest clues for where this file fits into the system.
Expert explanation
Architecturally, this file intersects with integrations. It contains 22 lines, 2 detected imports, and 1 detected exports.
Important relationships
Detected exports
isAutoDreamEnabled
Keywords
settingenabledsettingsgetinitialsettingsgetfeaturevalue_cached_may_be_stalegrowthbookautodreamenabledtengu_onyx_ploverleafconfig
Detected imports
../../utils/settings/settings.js../analytics/growthbook.js
Source notes
This page embeds the full file contents. Small or leaf files are still indexed honestly instead of being over-explained.
Full source
// Leaf config module — intentionally minimal imports so UI components
// can read the auto-dream enabled state without dragging in the forked
// agent / task registry / message builder chain that autoDream.ts pulls in.
import { getInitialSettings } from '../../utils/settings/settings.js'
import { getFeatureValue_CACHED_MAY_BE_STALE } from '../analytics/growthbook.js'
/**
* Whether background memory consolidation should run. User setting
* (autoDreamEnabled in settings.json) overrides the GrowthBook default
* when explicitly set; otherwise falls through to tengu_onyx_plover.
*/
export function isAutoDreamEnabled(): boolean {
const setting = getInitialSettings().autoDreamEnabled
if (setting !== undefined) return setting
const gb = getFeatureValue_CACHED_MAY_BE_STALE<{ enabled?: unknown } | null>(
'tengu_onyx_plover',
null,
)
return gb?.enabled === true
}