MCPcopy Create free account
hub / github.com/Noumena-Network/code / onInit

Function onInit

src/screens/REPL.tsx:3264–3285  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3262 handlers: messageActionHandlers
3263 } = useMessageActions(cursor, setCursor, cursorNavRef, messageActionCaps);
3264 async function onInit() {
3265 await dispatchReplStartupMemory({
3266 reverify: () => {
3267 // Always verify API key on startup, so we can show the user an error in the
3268 // bottom right corner of the screen if the API key is invalid.
3269 void reverify();
3270 },
3271 getMemoryFiles,
3272 logDebug: message => {
3273 logForDebugging(message);
3274 },
3275 cacheReadFileState: (path, value) => {
3276 // When the injected content doesn't match disk (stripped HTML comments,
3277 // stripped frontmatter, MEMORY.md truncation), cache the RAW disk bytes
3278 // with isPartialView so Edit/Write require a real Read first while
3279 // getChangedFiles + nested_memory dedup still work.
3280 readFileState.current.set(path, value);
3281 }
3282 });
3283
3284 // Initial message handling is done via the initialMessage effect
3285 }
3286
3287 // Register cost summary tracker
3288 useCostSummary(useFpsMetrics());

Callers 2

REPLFunction · 0.85
useRemoteSessionFunction · 0.85

Calls 3

setMethod · 0.80
logForDebuggingFunction · 0.50

Tested by

no test coverage detected