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
↓ 1,141 callers
Method
now
()
packages/ai-sandbox/src/run-log.ts:115
↓ 867 callers
Method
push
(value: T)
packages/ai-acp/src/stream/queue.ts:15
↓ 503 callers
Function
chat
( options: TextActivityOptionsWithContext< TAdapter, TSchema, TStream, TTools, TMiddlewa
packages/ai/src/activities/chat/index.ts:2666
↓ 498 callers
Method
processChunk
* Process a single chunk from the stream. * * Central dispatch for all AG-UI events. Each event type maps to a specific * handler. Events not
packages/ai/src/activities/chat/stream/processor.ts:506
↓ 482 callers
Method
get
( key: string, options: R2GetOptions & { onlyIf: R2Conditional | Headers }, )
examples/sandbox-cloudflare/worker-configuration.d.ts:2458
↓ 472 callers
Method
resolve
Map a virtual `/workspace` (or other absolute/relative) path onto the host root.
packages/ai-sandbox-local-process/src/handle.ts:259
↓ 442 callers
Function
createMockConnectionAdapter
( options: MockConnectionAdapterOptions = {}, )
packages/ai-client/tests/test-utils.ts:83
↓ 437 callers
Method
log
* The **`console.log()`** static method outputs a message to the console. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console
examples/sandbox-cloudflare/worker-configuration.d.ts:188
↓ 429 callers
Function
t
(light: string, dark: string)
packages/ai-devtools/src/styles/use-styles.ts:10
↓ 361 callers
Method
sendMessage
(message: string)
examples/ts-group-chat/src/hooks/useChatConnection.ts:6
↓ 295 callers
Method
parse
* Parse a potentially incomplete JSON string * @param jsonString - The JSON string to parse (may be incomplete) * @returns The parsed object, or
packages/ai/src/activities/chat/stream/json-parser.ts:31
↓ 274 callers
Method
set
* Set a new stored value
examples/sandbox-cloudflare/worker-configuration.d.ts:13708
↓ 229 callers
Method
generate
* Generate a new watermark profile * @param input The image stream to upload * @param params The watermark creation parameters. * @returns Th
examples/sandbox-cloudflare/worker-configuration.d.ts:15111
↓ 225 callers
Function
createTextChunks
( text: string, messageId: string = 'msg-1', model: string = 'test', )
packages/ai-client/tests/test-utils.ts:140
↓ 219 callers
Method
error
* The **`console.error()`** static method outputs a message to the console at the 'error' log level. * * [MDN Reference](https://developer.mozil
examples/sandbox-cloudflare/worker-configuration.d.ts:158
↓ 218 callers
Function
toolDefinition
( config: ToolDefinitionConfig<TInput, TOutput, TName>, )
packages/ai/src/activities/chat/tools/tool-definition.ts:191
↓ 208 callers
Method
has
(handle: CapabilityHandle)
packages/ai/src/activities/chat/middleware/capabilities.ts:76
↓ 188 callers
Function
renderHook
* Renders a Vue composable inside a minimal defineComponent wrapper. * Returns the hook result (with `.value` access for refs) and the wrapper.
packages/ai-vue/tests/use-generation.test.ts:82
↓ 182 callers
Function
createMockAdapter
(options: { chatStreamFn?: (opts: any) => AsyncIterable<StreamChunk> /** Array of chunk sequences: chatStr
packages/ai/tests/test-utils.ts:151
↓ 178 callers
Function
collectChunks
( stream: AsyncIterable<StreamChunk>, )
packages/ai/tests/test-utils.ts:224
↓ 176 callers
Method
json
()
examples/sandbox-cloudflare/worker-configuration.d.ts:2533
↓ 167 callers
Method
update
* Update hosted image metadata * @param options Properties to update * @returns Updated image metadata * @throws {@link ImagesError} if updat
examples/sandbox-cloudflare/worker-configuration.d.ts:13916
↓ 139 callers
Function
s
()
packages/ai-devtools/src/components/conversation/IterationCard.tsx:158
↓ 129 callers
Method
getMessages
Get the final messages array after the chat loop completes
packages/ai/src/activities/chat/index.ts:731
↓ 124 callers
Method
replace
( content: string | ReadableStream | Response, options?: ContentOptions, )
examples/sandbox-cloudflare/worker-configuration.d.ts:1899
↓ 123 callers
Method
from
(options: ChatMCPOptions | undefined)
packages/ai/src/activities/chat/mcp/manager.ts:49
↓ 120 callers
Method
toString
()
examples/sandbox-cloudflare/worker-configuration.d.ts:641
↓ 119 callers
Method
delete
(keys: string | string[])
examples/sandbox-cloudflare/worker-configuration.d.ts:2494
↓ 119 callers
Function
generateImage
( options: ImageActivityOptions<TAdapter, TStream>, )
packages/ai/src/activities/generateImage/index.ts:221
↓ 115 callers
Method
errors
* Log a caught error. Defaults to on even when `debug` is unspecified. * Uses the underlying logger's `error` level.
packages/ai/src/logger/internal-logger.ts:105
↓ 110 callers
Method
getMessages
* Get current messages
packages/ai-client/src/chat-client.ts:1375
↓ 106 callers
Method
clear
* The **`console.clear()`** static method clears the console if possible. * * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console
examples/sandbox-cloudflare/worker-configuration.d.ts:122
↓ 101 callers
Method
prepareAssistantMessage
* Prepare for a new assistant message stream. * Does NOT create the message immediately -- the message is created lazily * when the first conten
packages/ai/src/activities/chat/stream/processor.ts:270
↓ 100 callers
Method
close
()
examples/sandbox-cloudflare/worker-configuration.d.ts:3795
↓ 98 callers
Method
connect
* Connect directly to Hyperdrive as if it's your database, returning a TCP socket. * * Calling this method returns an identical socket to if you
examples/sandbox-cloudflare/worker-configuration.d.ts:13722
↓ 92 callers
Function
logInfo
(message: string)
packages/ai-code-mode-skills/test-cli/test-utils.ts:101
↓ 89 callers
Method
shouldEmit
(_chunk: string, _accumulated: string)
packages/ai/src/activities/chat/stream/strategies.ts:39
↓ 85 callers
Method
dispose
()
packages/ai-client/src/chat-client.ts:1520
↓ 85 callers
Function
fetchServerSentEvents
( url: string | (() => string), options: | FetchConnectionOptions | (() => FetchConnectionOptions
packages/ai-client/src/connection-adapters.ts:490
↓ 85 callers
Method
push
(value: T)
packages/ai-opencode/src/stream/queue.ts:16
↓ 81 callers
Function
defineConfig
(config: MCPCodegenConfig)
packages/ai-mcp/src/cli/define-config.ts:15
↓ 81 callers
Method
push
(delta: string)
packages/ai-grok-build/src/stream/thought-router.ts:352
↓ 79 callers
Method
append
( content: string | ReadableStream | Response, options?: ContentOptions, )
examples/sandbox-cloudflare/worker-configuration.d.ts:1851
↓ 77 callers
Function
convertSchemaToJsonSchema
( schema: SchemaInput | undefined, options: ConvertSchemaOptions = {}, )
packages/ai/src/activities/chat/tools/schema-converter.ts:324
↓ 77 callers
Method
write
(chunk, _enc, cb)
packages/ai-sandbox-docker/src/handle.ts:194
↓ 75 callers
Function
createChatOptions
( options: TextActivityOptionsWithContext< TAdapter, TSchema, TStream, TTools, TMiddlewa
packages/ai/src/activities/chat/index.ts:340
↓ 74 callers
Function
sendMessage
(page: Page, text: string)
testing/e2e/tests/helpers.ts:15
↓ 71 callers
Method
push
(value: string)
packages/ai-sandbox-cloudflare/src/handle.ts:59
↓ 69 callers
Function
serverTool
( name: string, executeFn: (args: unknown) => unknown, )
packages/ai/tests/test-utils.ts:253
↓ 68 callers
Method
addEventListener
(type: string, fn: Listener)
packages/ai-sandbox-sprites/tests/client.test.ts:35
↓ 68 callers
Function
renderUseChat
( options?: UseChatOptions, )
packages/ai-react/tests/test-utils.ts:24
↓ 68 callers
Method
status
Current run record, or null if the run is unknown.
packages/ai-sandbox/src/run.ts:159
↓ 66 callers
Function
useChat
( options: UseChatOptions<TTools, TSchema, TContext>, )
packages/ai-react/src/use-chat.ts:26
↓ 66 callers
Method
values
(options?: ReadableStreamValuesOptions)
examples/sandbox-cloudflare/worker-configuration.d.ts:2760
↓ 65 callers
Function
chunk
Create a typed StreamChunk by event type. Narrows the return to the * matching variant via `Extract`.
packages/ai/tests/stream-processor.test.ts:25
↓ 65 callers
Method
exec
( query: string, ...bindings: any[] )
examples/sandbox-cloudflare/worker-configuration.d.ts:3758
↓ 65 callers
Function
generateId
(prefix: string)
packages/ai-utils/src/id.ts:1
↓ 65 callers
Method
getAttribute
(name: string)
examples/sandbox-cloudflare/worker-configuration.d.ts:1835
↓ 64 callers
Method
execute
(code: string)
packages/ai-isolate-node/src/isolate-context.ts:28
↓ 64 callers
Function
resolveDebugOption
( debug: DebugOption | undefined, )
packages/ai/src/logger/resolve.ts:60
↓ 63 callers
Function
createMemorySkillStorage
( optionsOrSkills: MemorySkillStorageOptions | Array<Skill> = [], )
packages/ai-code-mode-skills/src/storage/memory-storage.ts:26
↓ 63 callers
Function
mockImage
* Factory function to create mock image adapters with proper type inference
packages/ai/tests/image-per-model-type-safety.test.ts:245
↓ 63 callers
Method
request
( path: string, init?: Omit<RequestInit, 'headers'>, )
packages/ai-grok/src/adapters/video.ts:140
↓ 63 callers
Method
warn
* The **`console.warn()`** static method outputs a warning message to the console at the 'warning' log level. * * [MDN Reference](https://develo
examples/sandbox-cloudflare/worker-configuration.d.ts:225
↓ 61 callers
Function
toRunErrorPayload
( error: unknown, fallbackMessage = 'Unknown error occurred', )
packages/ai/src/activities/error-payload.ts:32
↓ 59 callers
Function
openaiText
( model: TModel, config?: Omit<OpenAITextConfig, 'apiKey'>, )
packages/ai-openai/src/adapters/text.ts:192
↓ 57 callers
Function
renderUseChat
( options: UseChatOptions = {} as UseChatOptions, )
packages/ai-preact/tests/test-utils.ts:25
↓ 56 callers
Method
destroy
(error?: any)
examples/sandbox-cloudflare/worker-configuration.d.ts:3870
↓ 56 callers
Function
logError
(message: string)
packages/ai-code-mode-skills/test-cli/test-utils.ts:94
↓ 56 callers
Function
renderUseChat
(options?: UseChatOptions)
packages/ai-vue/tests/test-utils.ts:26
↓ 56 callers
Function
renderUseChat
(options?: UseChatOptions)
packages/ai-solid/tests/test-utils.ts:25
↓ 55 callers
Method
abort
()
examples/sandbox-cloudflare/worker-configuration.d.ts:2505
↓ 55 callers
Method
create
* Create a new repository with an initial access token. * @param name Repository name (alphanumeric, dots, hyphens, underscores). * @param opts
examples/sandbox-cloudflare/worker-configuration.d.ts:11515
↓ 55 callers
Function
otelMiddleware
( options: OtelMiddlewareOptions, )
packages/ai/src/middlewares/otel.ts:214
↓ 55 callers
Function
s
()
packages/ai-devtools/src/components/conversation/IterationTimeline.tsx:30
↓ 54 callers
Method
end
(end: DocumentEnd)
examples/sandbox-cloudflare/worker-configuration.d.ts:1823
↓ 54 callers
Function
fetch
(request, env, ctx)
examples/sandbox-cloudflare/src/server.ts:42
↓ 53 callers
Method
chatStream
( options: TextOptions<CodexTextProviderOptions>, )
packages/ai-codex/src/adapters/text.ts:201
↓ 53 callers
Function
createAdapter
()
packages/ai-openrouter/tests/openrouter-adapter.test.ts:37
↓ 53 callers
Function
toServerSentEventsResponse
( stream: AsyncIterable<StreamChunk>, init?: ResponseInit & { abortController?: AbortController }, )
packages/ai/src/stream-to-response.ts:120
↓ 52 callers
Function
anthropicText
( model: TModel, config?: Omit<AnthropicTextConfig, 'apiKey'>, )
packages/ai-anthropic/src/adapters/text.ts:1436
↓ 51 callers
Function
featureUrl
( provider: string, feature: string, testId: string, aimockPort: number, mode?: string, )
testing/e2e/tests/helpers.ts:3
↓ 51 callers
Function
setupMockSdkClient
( streamChunks: Array<Record<string, unknown>>, nonStreamResponse?: Record<string, unknown>, )
packages/ai-openrouter/tests/openrouter-adapter.test.ts:66
↓ 50 callers
Function
generateSpeech
(options: TTSActivityOptions<TAdapter, TStream>)
packages/ai/src/activities/generateSpeech/index.ts:142
↓ 50 callers
Method
getState
* Get current processor state (aggregated across all messages)
packages/ai/src/activities/chat/stream/processor.ts:2148
↓ 50 callers
Method
text
()
examples/sandbox-cloudflare/worker-configuration.d.ts:2532
↓ 49 callers
Function
createFakeTracer
()
packages/ai/tests/middlewares/fake-otel.ts:141
↓ 49 callers
Function
createMessage
( id: string, role: 'user' | 'assistant' | 'system' = 'assistant', parts: UIMessage['parts'] = [], )
packages/ai/tests/message-updaters.test.ts:22
↓ 49 callers
Function
nextTick
()
packages/ai-client/tests/connection-adapters-xhr.test.ts:71
↓ 49 callers
Method
provider
Log a raw chunk/frame received from a provider SDK.
packages/ai/src/logger/internal-logger.ts:67
↓ 48 callers
Function
applyHookEvent
( state: HookRegistryState, eventName: string, event: RuntimeScopedHookEvent, )
packages/ai-devtools/src/store/hook-registry.ts:252
↓ 48 callers
Method
start
(options?: ContainerStartupOptions)
examples/sandbox-cloudflare/worker-configuration.d.ts:3868
↓ 47 callers
Function
maxIterations
(max: number)
packages/ai/src/activities/chat/agent-loop-strategies.ts:20
↓ 46 callers
Method
getStatus
* Get current status
packages/ai-client/src/chat-client.ts:1389
↓ 45 callers
Function
getMetadata
(page: Page)
testing/e2e/tests/tools-test/helpers.ts:245
↓ 44 callers
Method
chatStream
( options: TextOptions<ResolveProviderOptions<TModel>>, )
packages/ai-openrouter/src/adapters/text.ts:118
↓ 44 callers
Function
runTest
(page: Page)
testing/e2e/tests/tools-test/helpers.ts:95
↓ 44 callers
Function
selectScenario
( page: Page, scenario: string, testId?: string, aimockPort?: number, )
testing/e2e/tests/tools-test/helpers.ts:26
↓ 43 callers
Method
updateOptions
( options: ChatClientUpdateOptionsWithoutContext<TTools> & { context?: TContext | undefined },
packages/ai-client/src/chat-client.ts:1440
↓ 42 callers
Method
emit
( level: 'debug' | 'info' | 'warn' | 'error', message: string, meta?: Record<string, unknown>, )
packages/ai/src/logger/console-logger.ts:122
next →
1–100 of 5,196, ranked by callers