MCPcopy Index your code
hub / github.com/TanStack/ai / capabilityContextWith

Function capabilityContextWith

packages/ai-claude-code/tests/text-adapter.test.ts:54–61  ·  view source on GitHub ↗

Build a capability context that hands the adapter the given sandbox.

(handle: SandboxHandle)

Source from the content-addressed store, hash-verified

52
53/** Build a capability context that hands the adapter the given sandbox. */
54function capabilityContextWith(handle: SandboxHandle): CapabilityContext {
55 const [, provideSandbox] = SandboxCapability
56 const ctx = {
57 capabilities: { markProvided: () => {}, has: () => true },
58 } as unknown as CapabilityContext
59 provideSandbox(ctx, handle)
60 return ctx
61}
62
63async function collect(
64 stream: AsyncIterable<StreamChunk>,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected