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

Function makeBaseOptions

src/session/replSubmitDispatch.test.ts:16–57  ·  view source on GitHub ↗
(overrides: Record<string, unknown> = {})

Source from the content-addressed store, hash-verified

14}
15
16function makeBaseOptions(overrides: Record<string, unknown> = {}) {
17 return {
18 input: '/clear',
19 helpers: {
20 setCursorOffset: () => {},
21 clearBuffer: () => {},
22 },
23 speculationAccept: undefined,
24 fromKeybinding: false,
25 inputMode: 'prompt',
26 isLoading: false,
27 commands: [makeCommand('clear')],
28 isCommandEnabled: () => true,
29 isRemoteMode: false,
30 pastedContents: {},
31 queryGuardActive: false,
32 userType: undefined,
33 willowMode: 'off',
34 idleReturnDismissed: false,
35 skipIdleCheck: false,
36 lastQueryCompletionTimeMs: 5,
37 getTotalInputTokens: () => 42,
38 tokenThreshold: 100_000,
39 idleThresholdMinutes: 75,
40 expandPastedTextRefs: (input: string) => input,
41 parseBackgroundPRShortcutInput: () => null,
42 getInputValue: () => '/clear',
43 mainLoopModel: 'gpt-test',
44 stashedPrompt: undefined,
45 getMessageCount: () => 7,
46 cwd: '/repo',
47 readFileState: { current: {} },
48 ideSelection: undefined,
49 abortController: null,
50 isExternalLoading: false,
51 streamMode: 'streaming',
52 hasInterruptibleToolInProgress: false,
53 querySource: 'repl',
54 nowProvider: () => 123,
55 ...overrides,
56 } as const
57}
58
59describe('dispatchReplSubmit', () => {
60 test('short-circuits after a handled prelude', async () => {

Callers 1

Calls 1

makeCommandFunction · 0.70

Tested by

no test coverage detected