Skip to main content

getActiveThreadStep

client.chat.getActiveThreadStep(threadId: string): Promise<ChatThreadStep | null>

Retrieves the currently active step for a thread.

Returns the step that is currently in progress, or null if no step is active.

Parameters

ParameterTypeRequiredDescription
threadIdstringYesThe unique identifier of the thread

Returns

Promise<ChatThreadStep | null> — A promise that resolves to the active ChatThreadStep or null

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.chat.getActiveThreadStep('threadId');
console.log(result);