stopAgent

Stops the agent the way the chat's own Stop control does: cancels the client tools the browser is running for it, then calls agent.stop().

A client tool runs in the browser after the run that asked for it has ended, so agent.stop() alone cannot reach its handler. Call this from an application-owned stop control; a cancelled call is recorded as cancelled and does not continue the run.

import { stopAgent } from '@threadplane/angular/chat';

Declaration · overload 1

export declare function stopAgent(agent: Pick<Agent, 'stop'>): Promise<void>;

Parameters

agent · required
Pick<Agent, 'stop'>

Returns

Promise<void>