Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TanStack/ai
/ functions
Functions
5,196 in github.com/TanStack/ai
⨍
Functions
5,196
◇
Types & classes
2,311
↓ 15 callers
Function
selectHook
(page: Page, displayName: string)
testing/e2e/tests/devtools-helpers.ts:34
↓ 15 callers
Function
stringField
( record: UnknownRecord | undefined, field: string, )
packages/ai-client/src/devtools.ts:323
↓ 15 callers
Function
stripTypeScript
(code: string)
packages/ai-code-mode/src/strip-typescript.ts:54
↓ 15 callers
Function
tc
()
packages/ai-devtools/src/components/conversation/IterationCard.tsx:399
↓ 15 callers
Function
toolCacheMiddleware
( options: ToolCacheMiddlewareOptions = {}, )
packages/ai/src/activities/chat/middleware/tool-cache-middleware.ts:135
↓ 15 callers
Function
undoNullWidening
(value: T, map?: NullWideningMap)
packages/ai-utils/src/transforms.ts:121
↓ 14 callers
Function
collect
( events: Array<OpencodeStreamEvent>, ctx: TranslateContext = makeCtx(), )
packages/ai-opencode/tests/translate.test.ts:32
↓ 14 callers
Function
createAdapter
()
packages/ai-fal/tests/image-adapter.test.ts:37
↓ 14 callers
Function
createMCPClients
( // When TServers is a generated `MCPServers` map, the config keys are // constrained to the declared ser
packages/ai-mcp/src/pool.ts:52
↓ 14 callers
Function
createMockDriver
( executeResult: ExecutionResult = { success: true, value: 42, logs: [] }, )
packages/ai-code-mode/tests/create-code-mode-tool.test.ts:12
↓ 14 callers
Function
createPersistence
( storedMessages?: Array<UIMessage> | null, )
packages/ai-client/tests/chat-client.test.ts:34
↓ 14 callers
Function
defineChatMiddleware
( middleware: ChatMiddleware<TContext> & { requires?: TRequires provides?: TProvides }, )
packages/ai/src/activities/chat/middleware/define.ts:23
↓ 14 callers
Function
done
( overrides: Partial<OpencodeAssistantMessage> = {}, )
packages/ai-opencode/tests/translate.test.ts:45
↓ 14 callers
Function
generateSkillTypes
(skills: Array<Skill>)
packages/ai-code-mode-skills/src/generate-skill-types.ts:106
↓ 14 callers
Function
getLastAssistantMessage
(page: Page)
testing/e2e/tests/helpers.ts:80
↓ 14 callers
Function
makeProvisioningHandle
* Build a fake handle that: * - Reports the source repo as already cloned (`fs.exists` → true for `/.git`). * - Records git.clone and fs.write calls
packages/ai-sandbox/tests/bootstrap.test.ts:371
↓ 14 callers
Function
msg
()
packages/ai-devtools/src/components/conversation/IterationCard.tsx:227
↓ 14 callers
Method
notifyMessagesChanged
* Record a message-list change and queue a `setItem` write for it. Skips a * single write after {@link beginClear} so the clear's empty snapshot is
packages/ai-client/src/client-persistor.ts:123
↓ 14 callers
Function
parseWithStandardSchema
(schema: unknown, data: unknown)
packages/ai/src/activities/chat/tools/schema-converter.ts:443
↓ 14 callers
Method
progress
(text: string)
packages/ai-client/tests/connection-adapters-xhr.test.ts:47
↓ 14 callers
Function
summarize
( options: SummarizeActivityOptions<TAdapter, TStream>, )
packages/ai/src/activities/summarize/index.ts:152
↓ 14 callers
Function
xhrServerSentEvents
( url: string | (() => string), options: XhrConnectionOptionsResolver = {}, )
packages/ai-client/src/connection-adapters.ts:825
↓ 13 callers
Function
addChunkToMessage
(conversationId: string, chunk: Chunk)
packages/ai-devtools/src/store/ai-context.tsx:470
↓ 13 callers
Method
addToolCallArgsEvent
* Add a TOOL_CALL_ARGS event to accumulate arguments (AG-UI)
packages/ai/src/activities/chat/tools/tool-calls.ts:251
↓ 13 callers
Method
chatStream
( options: TextOptions<ResolveModelOptions<TModel>>, )
packages/ai-ollama/src/adapters/text.ts:103
↓ 13 callers
Function
collect
( messages: Array<AgentSdkMessage>, )
packages/ai-claude-code/tests/translate.test.ts:24
↓ 13 callers
Function
collectStream
( iter: AsyncIterable<StreamChunk>, )
packages/ai-ollama/tests/text-adapter.test.ts:32
↓ 13 callers
Function
createAdapter
()
packages/ai-openrouter/tests/image-adapter.test.ts:21
↓ 13 callers
Function
createCodeModeSystemPrompt
(config: CodeModeToolConfig)
packages/ai-code-mode/src/create-system-prompt.ts:28
↓ 13 callers
Function
createExecBackedGit
( process: SandboxProcess, defaultRoot: string, )
packages/ai-sandbox/src/git-exec.ts:43
↓ 13 callers
Function
createGeminiSpeech
( model: TModel, apiKey: string, config?: Omit<GeminiTTSConfig, 'apiKey'>, )
packages/ai-gemini/src/adapters/tts.ts:405
↓ 13 callers
Function
createGroqText
( model: TModel, apiKey: string, config?: Omit<GroqTextConfig, 'apiKey'>, )
packages/ai-groq/src/adapters/text.ts:148
↓ 13 callers
Method
discover
* Discover + merge tools from all sources. Throws on a fatal discovery error * (no `onDiscoveryError`, or it re-threw) or a duplicate tool name; in
packages/ai/src/activities/chat/mcp/manager.ts:74
↓ 13 callers
Function
emit
( event: TEvent, payload: Parameters<RealtimeEventHandler<TEvent>>[0], )
packages/ai-elevenlabs/src/realtime/adapter.ts:77
↓ 13 callers
Method
emitState
Emit the latest snapshot without touching run state.
packages/ai-client/src/devtools.ts:1436
↓ 13 callers
Method
fetch
(request: Request)
examples/sandbox-cloudflare/worker-configuration.d.ts:616
↓ 13 callers
Method
generateId
()
packages/ai-client/src/realtime-client.ts:547
↓ 13 callers
Method
generateImages
( options: ImageGenerationOptions<OpenRouterImageProviderOptions>, )
packages/ai-openrouter/src/adapters/image.ts:81
↓ 13 callers
Function
getApiKeyFromEnv
(envVarName: string)
packages/ai-utils/src/env.ts:1
↓ 13 callers
Method
getIsSubscribed
* Get whether the subscription loop is active
packages/ai-client/src/chat-client.ts:1396
↓ 13 callers
Method
getReader
* The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it. * * [MDN Reference](https://develope
examples/sandbox-cloudflare/worker-configuration.d.ts:2729
↓ 13 callers
Function
getTool
( tools: ReturnType<typeof createSkillManagementTools>, name: string, )
packages/ai-code-mode-skills/tests/create-skill-management-tools.test.ts:11
↓ 13 callers
Function
makeAdapter
(opts: { agentIterations?: Array<Array<StreamChunk>> structuredValue?: Person structuredRunFinishedUsage
packages/ai/tests/structured-output-middleware.test.ts:139
↓ 13 callers
Function
makeSkill
(overrides: Partial<Skill> = {})
packages/ai-code-mode-skills/tests/skills-to-tools.test.ts:9
↓ 13 callers
Function
makeSkill
(overrides: Partial<Skill> = {})
packages/ai-code-mode-skills/tests/generate-skill-types.test.ts:5
↓ 13 callers
Function
mapImageInputsToFalFields
( model: TModel, imageInputs?: ReadonlyArray<ImagePart<MediaInputMetadata>>, )
packages/ai-fal/src/image/image-inputs.ts:145
↓ 13 callers
Function
mockContext
()
packages/ai-code-mode-skills/tests/create-skill-management-tools.test.ts:9
↓ 13 callers
Function
options
( overrides?: Partial<UseMcpAppBridgeOptions>, )
packages/ai-react/tests/use-mcp-app-bridge.test.ts:9
↓ 13 callers
Function
parseJsonishValue
(value: unknown)
packages/ai-devtools/src/components/hooks/preview-model.ts:120
↓ 13 callers
Function
q
POSIX single-quote escape for embedding paths in `sh -c`.
packages/ai-sandbox-daytona/src/handle.ts:50
↓ 13 callers
Method
request
Log outgoing request metadata before an adapter SDK call.
packages/ai/src/logger/internal-logger.ts:110
↓ 13 callers
Function
resolveGitSkillDir
( root: string, skill: Extract<WorkspaceSkill, { kind: 'git' }>, )
packages/ai-sandbox/src/agents-file.ts:35
↓ 13 callers
Function
runStarted
(runId: string, threadId: string = 'thread-1')
packages/ai-client/tests/client-persistor.test.ts:42
↓ 13 callers
Function
sendMessage
(page: Page, message: string)
testing/panel/tests/helpers.ts:83
↓ 13 callers
Method
setStatus
(status: ChatClientState)
packages/ai-client/src/chat-client.ts:502
↓ 13 callers
Function
shouldSkipInstrumentation
Check if a middleware should be skipped for instrumentation events.
packages/ai/src/activities/chat/middleware/compose.ts:22
↓ 13 callers
Function
takeBillableUnits
( requestId: string | undefined, )
packages/ai-fal/src/utils/billing.ts:65
↓ 13 callers
Function
toolCallStart
Helper to create a ToolCallStartEvent from plain fields (avoids EventType enum issues).
packages/ai/tests/tool-call-manager.test.ts:19
↓ 13 callers
Function
uiMessagesToWire
( messages: Array<UIMessage>, )
packages/ai/src/utilities/ag-ui-wire.ts:47
↓ 13 callers
Function
unreached
(method: string)
packages/ai-mcp/tests/apps/call-handler.test.ts:40
↓ 12 callers
Function
addToolApprovalResponse
(response: { id: string approved: boolean })
packages/ai-vue/src/use-chat.ts:227
↓ 12 callers
Method
arrayBuffer
()
examples/sandbox-cloudflare/worker-configuration.d.ts:2530
↓ 12 callers
Function
asTextPrompt
* Narrows a wire `MediaPrompt` to a text-only prompt, throwing if any image / * video / audio part is present (text-to-image models can't accept inpu
examples/ts-react-media/src/lib/server-functions.ts:43
↓ 12 callers
Function
asyncIterable
(chunks: Array<T>)
packages/ai-ollama/tests/text-adapter.test.ts:28
↓ 12 callers
Function
buildBaseUsage
( input: BaseUsageInput, )
packages/ai/src/utilities/usage.ts:33
↓ 12 callers
Function
chunk
(text: string)
packages/ai-sandbox/tests/run-log.test.ts:5
↓ 12 callers
Function
computeSandboxKey
(input: SandboxKeyInput)
packages/ai-sandbox/src/key.ts:61
↓ 12 callers
Function
createDefaultTrustStrategy
()
packages/ai-code-mode-skills/src/trust-strategies.ts:28
↓ 12 callers
Function
createSkillsSystemPrompt
({ selectedSkills, totalSkillCount, skillsAsTools = true, }: CreateSkillsSystemPromptOptions)
packages/ai-code-mode-skills/src/create-skills-system-prompt.ts:47
↓ 12 callers
Function
createTextAdapter
()
packages/ai-gemini/tests/gemini-adapter.test.ts:54
↓ 12 callers
Method
emit
(type: string, ev: unknown = {})
packages/ai-sandbox-sprites/tests/client.test.ts:43
↓ 12 callers
Function
expectFixture
( name: string, ext: 'ts' | 'tsx' = 'ts', )
codemods/move-sampling-to-model-options/transform.test.ts:55
↓ 12 callers
Function
extendAdapter
( factory: AnyAdapterFactory, _customModels: ReadonlyArray<ExtendedModelDef>, )
packages/ai/src/extend-adapter.ts:253
↓ 12 callers
Function
falVideo
( model: TModel, config?: FalClientConfig, )
packages/ai-fal/src/adapters/video.ts:280
↓ 12 callers
Function
getHookUnseenEventCount
( state: HookRegistryState, hookId: string, )
packages/ai-devtools/src/store/hook-registry.ts:433
↓ 12 callers
Method
getToolCalls
* Get all complete tool calls (filtered for valid ID and name)
packages/ai/src/activities/chat/tools/tool-calls.ts:289
↓ 12 callers
Function
json
(status: number, error: string)
examples/ts-react-chat/src/routes/api.sandbox-triage.ts:16
↓ 12 callers
Function
makeAdapter
* Minimal AnyTextAdapter shell — only the fields the orchestrator touches in * the no-tools structured-output streaming path. Optional callbacks let
packages/ai/tests/chat-structured-output-stream.test.ts:43
↓ 12 callers
Function
mergeAgentTools
( serverTools: ReadonlyArray<Tool<SchemaInput, SchemaInput, string, TContext>>, clientTools: ReadonlyArray
packages/ai/src/utilities/chat-params.ts:187
↓ 12 callers
Function
openRouterText
( model: TModel, config?: Omit<SDKOptions, 'apiKey'>, )
packages/ai-openrouter/src/adapters/text.ts:1439
↓ 12 callers
Method
output
* Retrieve the image that results from applying the transforms to the * provided input * @param options Options that apply to the output e.g. ou
examples/sandbox-cloudflare/worker-configuration.d.ts:13995
↓ 12 callers
Method
pipeThroughMiddleware
( synthChunk: StreamChunk, )
packages/ai/src/activities/chat/index.ts:2067
↓ 12 callers
Method
push
(chunk: string)
packages/ai-sandbox-sprites/src/client.ts:127
↓ 12 callers
Function
readStream
(stream: ReadableStream<Uint8Array>)
packages/ai/tests/stream-to-response.test.ts:19
↓ 12 callers
Function
resolveBedrockAuth
( config: BedrockAuthConfig, endpoint: BedrockEndpoint, )
packages/ai-bedrock/src/utils/auth.ts:43
↓ 12 callers
Method
snapshotClear
* Capture the message/run ids that exist at the moment of a clear so chunks * still arriving for them can be ignored.
packages/ai-client/src/client-persistor.ts:191
↓ 12 callers
Function
step
()
packages/ai-devtools/src/components/hooks/HookDetails.tsx:1237
↓ 12 callers
Method
structuredOutput
( _options: StructuredOutputOptions<CodexTextProviderOptions>, )
packages/ai-codex/src/adapters/text.ts:356
↓ 12 callers
Function
text
(delta: string)
packages/ai-sandbox/tests/run.test.ts:8
↓ 12 callers
Function
tool
(name: string)
packages/ai/tests/chat-mcp-manager.test.ts:48
↓ 12 callers
Function
validateNumberOfImages
( model: string, numberOfImages: number | undefined, )
packages/ai-openai/src/image/image-provider-options.ts:258
↓ 12 callers
Function
valueToString
(value: unknown)
examples/ts-react-native-chat/src/App.tsx:119
↓ 12 callers
Function
webFetchTool
( options?: WebFetchServerTool['parameters'], )
packages/ai-openrouter/src/tools/web-fetch-tool.ts:69
↓ 11 callers
Method
abs
(p: string)
packages/ai-sandbox-cloudflare/src/handle.ts:186
↓ 11 callers
Method
abs
Map the conventional `/workspace` virtual root to the Sprite workdir.
packages/ai-sandbox-sprites/src/handle.ts:177
↓ 11 callers
Method
abs
Map the conventional `/workspace` virtual root to the container workdir.
packages/ai-sandbox-docker/src/handle.ts:164
↓ 11 callers
Method
abs
Map the conventional `/workspace` virtual root to the sandbox workdir.
packages/ai-sandbox-daytona/src/handle.ts:201
↓ 11 callers
Function
addChunk
(conversationId: string, chunk: Chunk)
packages/ai-devtools/src/store/ai-context.tsx:1076
↓ 11 callers
Function
arrayBufferToBase64
(buffer: ArrayBuffer)
packages/ai-utils/src/base64.ts:27
↓ 11 callers
Function
buildSessionUpdate
( config: Partial<RealtimeSessionConfig>, )
packages/ai-openai/src/realtime/session-update.ts:16
← previous
next →
301–400 of 5,196, ranked by callers