Skip to main content

addThreadStep

client.chat.addThreadStep(threadId: string, stepData: Record<string, unknown>): Promise<ChatThreadStep>

Adds a step to a chat thread.

Creates a new step within the thread's step sequence, representing a discrete unit of work or progress in the conversation.

Parameters

ParameterTypeRequiredDescription
threadIdstringYesThe unique identifier of the thread
stepDataRecord<string, unknown>YesThe step definition including type and content

Returns

Promise<ChatThreadStep> — A promise that resolves to the created ChatThreadStep

Example

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

const client = new CodeBoltClient();

const result = await client.chat.addThreadStep('threadId', /* Record<string, unknown> */);
console.log(result);