ToolCallStatus

Lifecycle states of a tool call as it streams in and executes.

Overview

ToolCallStatus describes where a tool call is in its lifecycle, from arguments still streaming in to a fully executed result. You receive it as the status prop of a tool call render component, for example in useRenderTool or the render option of useFrontendTool.

Import

import { ToolCallStatus } from "@copilotkit/core";

Definition

enum ToolCallStatus {
  InProgress = "inProgress",
  Executing = "executing",
  Complete = "complete",
}

Members

Prop

Type

Usage

import { ToolCallStatus } from "@copilotkit/core";

function renderToolCall(status: ToolCallStatus) {
  switch (status) {
    case ToolCallStatus.InProgress:
      return "Receiving arguments…";
    case ToolCallStatus.Executing:
      return "Running…";
    case ToolCallStatus.Complete:
      return "Done";
  }
}

How is this guide?