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

Function installReplPerfEnvironment

src/ink/replPerfHarness.tsx:68–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66let liveRoot: Root | null = null
67
68export function installReplPerfEnvironment(): void {
69 if (!(globalThis as { MACRO?: MacroGlobals }).MACRO) {
70 ;(globalThis as { MACRO?: MacroGlobals }).MACRO = {
71 VERSION: '0.0.0-test',
72 VERSION_CHANGELOG: '',
73 BUILD_TIME: 'test',
74 }
75 }
76
77 process.env.NODE_ENV ??= 'test'
78
79 if (mocksInstalled) {
80 return
81 }
82 mocksInstalled = true
83
84 mock.module('@ant/claude-for-chrome-mcp', () => ({
85 BROWSER_TOOLS: [],
86 createClaudeForChromeMcpServer: () => ({ connect: async () => {} }),
87 }))
88 mock.module('@ant/computer-use-mcp', () => ({
89 buildComputerUseTools: () => [],
90 bindSessionContext: () => {},
91 DEFAULT_GRANT_FLAGS: [],
92 API_RESIZE_PARAMS: {},
93 targetImageSize: () => ({ width: 0, height: 0 }),
94 }))
95 mock.module('@ant/computer-use-mcp/types', () => ({
96 DEFAULT_GRANT_FLAGS: [],
97 }))
98 mock.module('@ant/computer-use-mcp/sentinelApps', () => ({
99 getSentinelCategory: () => null,
100 }))
101 mock.module('@ant/computer-use-input', () => ({}))
102 mock.module('@ant/computer-use-swift', () => ({}))
103}
104
105export async function cleanupMountedRepl(): Promise<void> {
106 if (liveRoot) {

Callers 6

mountTranscriptMessagesFunction · 0.85
mountMarkdownFunction · 0.85
mountNodeFunction · 0.85
mountReplFunction · 0.85
mountHighlightedCodeFunction · 0.85
mountMountedComponentFunction · 0.85

Calls

no outgoing calls

Tested by 2

mountTranscriptMessagesFunction · 0.68
mountNodeFunction · 0.68