Skip to main content

getActiveThreadStep

plugin.chatApi.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 plugin from '@codebolt/plugin-sdk';

const result = await plugin.chatApi.getActiveThreadStep('threadId');
console.log(result);