***

title: setResetConsolidate
slug: /reference/typescript/agents/context-builder/step/set-reset-consolidate
description: Set whether to consolidate conversation history on context switch.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[ref-step]: /docs/server-sdks/reference/typescript/agents/context-builder/step

Set whether to consolidate conversation history when this step switches contexts.

## **Parameters**

<ParamField path="consolidate" type="boolean" required={true} toc={true}>
  Whether to summarize previous conversation on context switch.
</ParamField>

## **Returns**

[`Step`][ref-step] -- Self for method chaining.

## **Example**

```typescript {9}
import { ContextBuilder } from '@signalwire/sdk';

const builder = new ContextBuilder();
const ctx = builder.addContext('default');
ctx.addStep('greet').setText('Welcome the caller.');
const transfer = ctx.addStep('transfer');
transfer.setText('Transfer the caller to support.');
transfer.setValidContexts(['support']);
transfer.setResetConsolidate(true);
builder.addContext('support').addStep('help').setText('Help the caller with their issue.');
```