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

Function createToolUseContext

src/tools/WorkflowTool/WorkflowTool.test.ts:14–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12} from './WorkflowTool.js'
13
14function createToolUseContext() {
15 let appState = getDefaultAppState()
16
17 const setAppState = (updater: (prev: typeof appState) => typeof appState) => {
18 appState = updater(appState)
19 }
20
21 return {
22 getAppState: () => appState,
23 setAppState,
24 setAppStateForTasks: setAppState,
25 context: {
26 options: {
27 commands: [],
28 debug: false,
29 mainLoopModel: 'opus',
30 tools: [],
31 verbose: false,
32 thinkingConfig: {} as never,
33 mcpClients: [],
34 mcpResources: {},
35 isNonInteractiveSession: false,
36 agentDefinitions: {
37 activeAgents: [GENERAL_PURPOSE_AGENT],
38 allAgents: [GENERAL_PURPOSE_AGENT],
39 },
40 },
41 abortController: new AbortController(),
42 readFileState: {} as never,
43 getAppState: () => appState,
44 setAppState,
45 setAppStateForTasks: setAppState,
46 setInProgressToolUseIDs: () => {},
47 setResponseLength: () => {},
48 updateFileHistoryState: () => {},
49 },
50 }
51}
52
53afterEach(async () => {
54 __setWorkflowRuntimeForTests()

Callers 1

Calls 1

getDefaultAppStateFunction · 0.85

Tested by

no test coverage detected