MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / makeCtx

Function makeCtx

test/codegraph.test.ts:184–196  ·  view source on GitHub ↗
(cwd: string)

Source from the content-addressed store, hash-verified

182import type { ToolContext } from '../src/tools/base.js';
183
184function makeCtx(cwd: string): ToolContext {
185 // The three navigation tools are read-only and don't touch transaction/permissions,
186 // so a loose stub is fine. Cast through unknown to silence the strict ToolContext type.
187 return {
188 cwd,
189 sessionId: 'test',
190 transaction: {} as any,
191 permissions: { check: () => ({ ok: true }) } as any,
192 askUser: async () => 'allow',
193 signal: new AbortController().signal,
194 onUiEvent: () => {},
195 } as ToolContext;
196}
197
198describe('Code graph: navigation tools (v0.4.0)', () => {
199 it('find_callers locates call sites and excludes the definition line', async () => {

Callers 1

codegraph.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected