MCPcopy Create free account

hub / github.com/TanStack/ai / functions

Functions5,196 in github.com/TanStack/ai

↓ 5 callersFunctioncreateGenerationConnection
( label: string, createResult: (data: Record<string, unknown>) => TResult, )
examples/ts-react-chat/src/routes/generation-hooks.tsx:573
↓ 5 callersFunctioncreateId
(prefix: string)
packages/ai/src/activities/generateVideo/index.ts:101
↓ 5 callersMethodcreateMessageState
* Create a new MessageStreamState for a message
packages/ai/src/activities/chat/stream/processor.ts:632
↓ 5 callersMethodcreateMetadataPayload
()
packages/ai-client/src/devtools.ts:682
↓ 5 callersFunctioncreateMockResponsesStream
( chunks: Array<Record<string, unknown>>, )
packages/ai-openai/tests/usage-extraction.test.ts:9
↓ 5 callersFunctioncreateMockStream
( chunks: Array<Record<string, unknown>>, )
packages/ai-anthropic/tests/usage-extraction.test.ts:35
↓ 5 callersFunctioncreateOllamaClient
(config: OllamaClientConfig = {})
packages/ai-ollama/src/utils/client.ts:12
↓ 5 callersFunctioncreateRecordingTextAdapter
* Fake text adapter that records the `modelOptions` it is handed and yields a * trivial summary stream. `name` is irrelevant here — the summarize wra
packages/ai/tests/summarize-max-length.test.ts:16
↓ 5 callersFunctioncreateResult
( toolName: string, executedOn: 'server' | 'client', args: { text?: string; delay?: number }, )
testing/panel/src/lib/simulator-tools.ts:25
↓ 5 callersFunctioncreateSummarize
( options: Omit<CreateSummarizeOptions, 'onResult'> & { onResult?: (result: SummarizationResult) => TTra
packages/ai-svelte/src/create-summarize.svelte.ts:98
↓ 5 callersMethodcreateVideoJob
( options: VideoGenerationOptions< FalVideoProviderOptions<TModel>, FalModelVideoSize<TModel>
packages/ai-fal/src/adapters/video.ts:146
↓ 5 callersFunctioncustomStrategy
({ iterationCount, messages, finishReason, }: AgentLoopState)
packages/ai/tests/agent-loop-strategies.test.ts:226
↓ 5 callersMethoddispose
()
examples/ts-group-chat/chat-server/capnweb-rpc.ts:141
↓ 5 callersFunctiondockerSandbox
(config: DockerSandboxConfig)
packages/ai-sandbox-docker/src/provider.ts:188
↓ 5 callersMethodemitTextUpdateForMessage
* Emit pending text update for a specific message. * * Calls updateTextPart() which has critical append-vs-replace logic: * - If last UIMessa
packages/ai/src/activities/chat/stream/processor.ts:1941
↓ 5 callersFunctionerrorStructuredOutputPart
( messages: Array<UIMessage>, messageId: string, errorMessage: string, )
packages/ai/src/activities/chat/stream/message-updaters.ts:397
↓ 5 callersMethodexec
( command: string, opts?: ProcessOptions, )
packages/ai-sandbox-sprites/src/handle.ts:189
↓ 5 callersFunctionexecute
(name, args, options)
packages/ai-sandbox/src/remote-tools.ts:132
↓ 5 callersFunctionexecuteHostTool
( tools: Array<AnyTool>, name: string, args: unknown, options: { context?: unknown; signal?: AbortSign
packages/ai-sandbox/src/remote-tools.ts:164
↓ 5 callersFunctionextensionFor
(mimeType: string)
packages/ai-grok/src/utils/audio.ts:144
↓ 5 callersFunctionfakeHandle
Minimal handle exposing only the fs/process bits a watcher touches.
packages/ai-sandbox/tests/watch.test.ts:12
↓ 5 callersFunctionfetchWithTimeout
* Fetch with timeout - prevents hanging on network issues
examples/ts-code-mode-web/src/lib/tools/github-tools.ts:22
↓ 5 callersFunctionfindStructuredOutputPart
( messages: Array<UIMessage>, messageId: string, )
packages/ai-client/tests/devtools.test.ts:203
↓ 5 callersMethodfireClose
()
packages/ai-sandbox-sprites/tests/client.test.ts:53
↓ 5 callersFunctionformatBytes
(bytes: number)
examples/ts-code-mode-web/src/lib/efficiency.ts:221
↓ 5 callersFunctionformatDuration
(ms: number)
examples/ts-code-mode-web/src/lib/efficiency.ts:227
↓ 5 callersFunctionfromChunks
Build an AsyncIterable from chunks, optionally throwing after some emit.
packages/ai-sandbox/tests/run.test.ts:20
↓ 5 callersMethodgenerateAudio
( options: AudioGenerationOptions<ElevenLabsAudioProviderOptions>, )
packages/ai-elevenlabs/src/adapters/audio.ts:116
↓ 5 callersFunctiongenerationCard
(page: Page, hookName: string)
testing/e2e/tests/devtools-helpers.ts:61
↓ 5 callersFunctiongetChunkRunId
(chunk: StreamChunk)
packages/ai-client/src/connection-adapters.ts:30
↓ 5 callersMethodgetExecutableTools
* Returns the tools that should be available for *execution* this turn. * * This is the advertised set (`getActiveTools()`, passed in as `active
packages/ai/src/activities/chat/tools/lazy-tool-manager.ts:116
↓ 5 callersFunctiongetGitHubHeaders
()
examples/ts-code-mode-web/src/lib/tools/github-tools.ts:7
↓ 5 callersMethodgetVideoStatus
(jobId: string)
packages/ai-gemini/src/adapters/video.ts:259
↓ 5 callersMethodgetVideoUrl
(jobId: string)
packages/ai-grok/src/adapters/video.ts:311
↓ 5 callersFunctiongrokSummarize
( model: TModel, config?: Omit<GrokSummarizeConfig, 'apiKey'>, )
packages/ai-grok/src/adapters/summarize.ts:69
↓ 5 callersFunctiongrokVideo
( model: TModel, config?: Omit<GrokVideoConfig, 'apiKey'>, )
packages/ai-grok/src/adapters/video.ts:456
↓ 5 callersFunctionhasWindow
()
examples/ts-react-chat/src/routes/threads.tsx:89
↓ 5 callersFunctionhookRow
(page: Page, displayName: string)
testing/e2e/tests/devtools-helpers.ts:30
↓ 5 callersFunctionhoverTargetMatchesElement
( target: HoverTarget, elementTarget: { messageIds?: string | null partIds?: string | null }, )
packages/ai-devtools/src/components/hooks/preview-model.ts:92
↓ 5 callersFunctionidOf
(c: Record<string, unknown>)
testing/e2e/tests/tool-call-lifecycle.spec.ts:25
↓ 5 callersFunctionimage
( value: string, role?: NonNullable<MediaInputMetadata['role']>, )
packages/ai/tests/media-prompt.test.ts:5
↓ 5 callersFunctionisHookRunning
( hook: HookRecord, runs: Record<string, RunRecord>, )
packages/ai-devtools/src/components/hooks/hook-dashboard-model.ts:104
↓ 5 callersMethodisSubscribed
Check if a component is subscribed to a signal
examples/ts-code-mode-web/src/lib/reports/types.ts:363
↓ 5 callersFunctionmakeCtx
()
packages/ai/tests/middleware-capabilities.test.ts:21
↓ 5 callersFunctionmakeCtx
(overrides: Partial<TranslateContext> = {})
packages/ai-acp/tests/translate.test.ts:12
↓ 5 callersFunctionmakeFakeHandle
Build a fake handle that records writes/execs and tracks existing paths.
packages/ai-grok-build/tests/projection.test.ts:47
↓ 5 callersFunctionmakeLogger
* Build a real `InternalLogger` so tests run against the actual logging API * surface (`request`, `provider`, `errors`, etc.) rather than a hand-craf
packages/ai-elevenlabs/tests/audio-adapter.test.ts:21
↓ 5 callersFunctionmakeSpyLogger
()
packages/ai/tests/logger/internal-logger.test.ts:7
↓ 5 callersFunctionmakeStream
()
packages/ai-client/tests/audio-recorder.test.ts:55
↓ 5 callersFunctionmakeStream
(bytes: Uint8Array)
packages/ai-elevenlabs/tests/speech-adapter.test.ts:23
↓ 5 callersFunctionmcpResourceToContentPart
(content: { uri?: string text?: string blob?: string [key: string]: unknown })
packages/ai-mcp/src/resources.ts:10
↓ 5 callersFunctionmediaItemFromSource
( value: unknown, defaultMimeType: string, extras: { format?: string duration?: number } = {},
packages/ai-client/src/devtools.ts:254
↓ 5 callersFunctionmergeChunkStreams
( base: AsyncIterable<StreamChunk>, side: AsyncIterable<StreamChunk>, )
packages/ai-sandbox/src/bridge-events.ts:77
↓ 5 callersFunctionmergePreviewMessagesForUserView
( conversationMessages: Array<TMessage>, snapshotMessages: Array<TMessage>, )
packages/ai-devtools/src/components/hooks/preview-messages.ts:14
↓ 5 callersFunctionmergeUse
( uses: Array<SpecifierUse>, specifier: string, names: Set<string> | undefined, )
testing/react-native-smoke/scripts/assert-import-surface.ts:114
↓ 5 callersFunctionnormalizeToUIMessage
( message: UIMessage | ModelMessage, generateId: () => string, )
packages/ai/src/activities/chat/messages.ts:636
↓ 5 callersMethodonAbort
()
packages/ai-sandbox-daytona/src/handle.ts:266
↓ 5 callersMethodopen
()
packages/ai-sandbox-sprites/tests/client.test.ts:47
↓ 5 callersFunctionparseGrokVideoSize
( size: string, )
packages/ai-grok/src/video/video-provider-options.ts:74
↓ 5 callersFunctionparseIssueUrl
(url: string)
examples/ts-react-chat/src/sandbox-triage.ts:34
↓ 5 callersFunctionpipeToRunLog
( stream: AsyncIterable<StreamChunk>, opts: PipeToRunLogOptions, )
packages/ai-sandbox/src/run.ts:66
↓ 5 callersFunctionprimitive
(tag: string)
testing/react-native-smoke/scripts/react-native-runtime-stub.tsx:11
↓ 5 callersMethodpush
(chunk: string)
packages/ai-sandbox-daytona/src/handle.ts:67
↓ 5 callersFunctionq
(value: string)
packages/ai-grok-build/src/adapters/text.ts:88
↓ 5 callersFunctionq
POSIX single-quote escape for embedding paths in `bash -c`.
packages/ai-sandbox-sprites/src/handle.ts:318
↓ 5 callersFunctionqueueMessageChunk
( conversationId: string, messageIndex: number, chunk: Chunk, )
packages/ai-devtools/src/store/ai-context.tsx:386
↓ 5 callersFunctionrace
(work: Promise<T>)
packages/ai-acp/src/session/acp-client.ts:122
↓ 5 callersFunctionrequireNonEmptyString
( value: Record<string, unknown>, key: string, )
packages/ai-sandbox-cloudflare/src/protocol.ts:106
↓ 5 callersFunctionreread
Re-read the now-terminal record; the run was just driven, so it must exist.
packages/ai-sandbox/src/run.ts:103
↓ 5 callersFunctionresolveGrokExecutable
( sandbox: SandboxHandle, preferred?: string, )
packages/ai-grok-build/src/process/resolve-executable.ts:14
↓ 5 callersMethodresume
(input: SandboxResumeInput)
packages/ai-sandbox-vercel/src/provider.ts:134
↓ 5 callersFunctionrethrowAudioAdapterError
* Translate the typed audio-adapter errors into a `ServerFnError` with a stable * `code`. Any other error is re-thrown untouched so the framework's d
examples/ts-react-chat/src/lib/server-fns.ts:59
↓ 5 callersFunctionrun
* Run a single lifecycle hook across each middleware in registration order, * awaiting each. Exceptions PROPAGATE (matching `chat()` middleware) — a
packages/ai/src/activities/middleware/run.ts:41
↓ 5 callersFunctionrunGenerationUsage
( middleware: ReadonlyArray<GenerationMiddleware> | undefined, ctx: GenerationMiddlewareContext, usage:
packages/ai/src/activities/middleware/run.ts:58
↓ 5 callersMethodsetIsSubscribed
(isSubscribed: boolean)
packages/ai-client/src/chat-client.ts:508
↓ 5 callersMethodsetTimeout
(callback: (...args: any[]) => void, msDelay?: number)
examples/sandbox-cloudflare/worker-configuration.d.ts:326
↓ 5 callersFunctionshellQuote
POSIX single-quote escape for embedding a value in a shell command.
packages/ai-claude-code/src/adapters/projection.ts:37
↓ 5 callersFunctionshouldSkipClientAssistantPlaceholder
( message: ClientAssistantPlaceholderInput, )
packages/ai-devtools/src/store/message-event-utils.ts:50
↓ 5 callersFunctionshutdown
(exitCode = 0)
examples/ts-react-native-chat/scripts/dev.mjs:319
↓ 5 callersMethodsnapDuration
* Coerce a raw seconds value to the closest valid duration (clamped to * [1, 15] and rounded to whole seconds).
packages/ai-grok/src/adapters/video.ts:384
↓ 5 callersFunctionspawnNdjson
( handle: SandboxHandle, command: string, options: SpawnNdjsonOptions = {}, )
packages/ai-sandbox/src/runner.ts:48
↓ 5 callersMethodstartAssistantMessage
* @deprecated Use prepareAssistantMessage() instead. This eagerly creates * an assistant message which can cause empty message flicker.
packages/ai/src/activities/chat/stream/processor.ts:279
↓ 5 callersFunctionstartHostToolBridge
( tools: Array<AnyTool>, options: StartBridgeOptions, )
packages/ai-sandbox/src/tool-bridge.ts:302
↓ 5 callersFunctionstream
( streamFactory: ( messages: Array<UIMessage> | Array<ModelMessage>, data?: Record<string, any>,
packages/ai-client/src/connection-adapters.ts:939
↓ 5 callersFunctionstreamGenerationResult
( generator: () => Promise<TResult>, options?: { runId?: string; threadId?: string }, )
packages/ai/src/activities/stream-generation-result.ts:25
↓ 5 callersMethodstreamResponse
* Stream a response from the LLM. * Returns true if the stream completed successfully, false on abort or error.
packages/ai-client/src/chat-client.ts:849
↓ 5 callersFunctionstripToSpec
(chunk: StreamChunk)
packages/ai/src/strip-to-spec-middleware.ts:13
↓ 5 callersFunctionstructuredOutputJsonItems
( source: StructuredOutputJsonSource, )
packages/ai-devtools/src/components/hooks/preview-model.ts:134
↓ 5 callersMethodsupportsCombinedToolsAndSchema
* Anthropic supports `output_config.format` + `tools` in a single streaming * Messages request only for Claude 4.5+ (GA 2026-01-29). For 4.4 and
packages/ai-anthropic/src/adapters/text.ts:591
↓ 5 callersMethodsupportsCombinedToolsAndSchema
* Groq's API rejects `response_format: json_schema` together with `tools` * + `stream` (returns 400 — see Groq Structured Outputs docs: * "Strea
packages/ai-groq/src/adapters/text.ts:115
↓ 5 callersFunctiontestHeaders
(testId?: string)
testing/e2e/src/lib/media-providers.ts:37
↓ 5 callersFunctiontoMimeType
(audioFormat: string)
packages/ai-grok/src/utils/audio.ts:110
↓ 5 callersFunctiontoolResultPartId
(toolCallId: string)
packages/ai-devtools/src/components/hooks/preview-model.ts:112
↓ 5 callersFunctiontsString
Escape a value as a TypeScript string literal (handles quotes/newlines).
packages/ai-mcp/src/cli/emit.ts:21
↓ 5 callersFunctiontypedTools
( adapter: TAdapter, tools: TextActivityOptions<TAdapter, undefined, true>['tools'], )
packages/ai-openai/tests/tools-per-model-type-safety.test.ts:27
↓ 5 callersFunctiontypedTools
( adapter: TAdapter, tools: TextActivityOptions<TAdapter, undefined, true>['tools'], )
packages/ai-anthropic/tests/tools-per-model-type-safety.test.ts:29
↓ 5 callersFunctiontypedTools
( adapter: TAdapter, tools: TextActivityOptions<TAdapter, undefined, true>['tools'], )
packages/ai-openrouter/tests/tools-per-model-type-safety.test.ts:16
↓ 5 callersMethodunsubscribe
* Unsubscribe and fully tear down live behavior. * This aborts an in-flight request and the subscription loop.
packages/ai-client/src/chat-client.ts:1112
↓ 5 callersFunctionuntilFinishReason
( stopReasons: Array<string>, )
packages/ai/src/activities/chat/agent-loop-strategies.ts:41
↓ 5 callersFunctionupdateToolCallApproval
( messages: Array<UIMessage>, messageId: string, toolCallId: string, approvalId: string, )
packages/ai/src/activities/chat/stream/message-updaters.ts:147
← previousnext →901–1,000 of 5,196, ranked by callers