ChatToolCallsComponent

Renders tool calls with optional grouping, custom templates, and cards for spawned subagents.

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

Declaration

export declare class ChatToolCallsComponent  {
  constructor();
  readonly agent: import("@angular/core").InputSignal<Agent>;
  readonly excludeToolNames: import("@angular/core").InputSignal<readonly string[]>;
  readonly expandedGroups: Signal<Set<string>>;
  readonly grouping: import("@angular/core").InputSignal<"none" | "auto">;
  readonly groupRelated: import("@angular/core").InputSignal<boolean>;
  readonly groups: Signal<Group[]>;
  readonly groupSummary: import("@angular/core").InputSignal<((name: string, count: number) => string) | undefined>;
  readonly message: import("@angular/core").InputSignal<Message | undefined>;
  readonly resultTemplates: Signal<readonly ChatToolResultTemplateDirective[]>;
  readonly templates: Signal<readonly ChatToolCallTemplateDirective[]>;
  toggleGroup(index: string): void;
  readonly toolCalls: Signal<readonly ({
        readonly id: string;
        readonly name: string;
        readonly args: import("@threadplane/core").PlainValue;
    } & ({
        readonly status: "pending" | "running";
    } | {
        readonly status: "complete";
        readonly result: import("@threadplane/core").PlainValue;
        readonly parts?: readonly import("@threadplane/core").PlainValue[];
    } | {
        readonly status: "error";
        readonly error: string;
        readonly parts?: readonly import("@threadplane/core").PlainValue[];
    }))[]>;
  readonly toolCallTemplates: import("@angular/core").InputSignal<readonly ChatToolCallTemplateDirective[]>;
  readonly toolLabel: import("@angular/core").InputSignal<((name: string, args?: unknown) => string | undefined) | undefined>;
  readonly toolOutcome: import("@angular/core").InputSignal<((activity: ToolActivityInfo) => ToolActivityOutcome | undefined) | undefined>;
  readonly toolResultTemplates: import("@angular/core").InputSignal<readonly ChatToolResultTemplateDirective[]>;
  readonly toolRetry: import("@angular/core").OutputEmitterRef<ToolActivityInfo>;
}

Angular template API

Selector: chat-tool-calls

Inputs

agent · required
Agent
excludeToolNames
readonly string[]
grouping
"none" | "auto"
groupRelated
boolean
groupSummary
((name: string, count: number) => string) | undefined
message
Message | undefined
toolCallTemplates
readonly ChatToolCallTemplateDirective[]
toolLabel
((name: string, args?: unknown) => string | undefined) | undefined
toolOutcome
((activity: ToolActivityInfo) => ToolActivityOutcome | undefined) | undefined
toolResultTemplates
readonly ChatToolResultTemplateDirective[]

Outputs

toolRetry
ToolActivityInfo

Members

Constructor · overload 1

Constructs a new instance of the ChatToolCallsComponent class

constructor();

agent

readonly agent: import("@angular/core").InputSignal<Agent>;

excludeToolNames

Tool names whose groups should be hidden. Used by chat compositions to filter out internal/orchestration tools (e.g. GenUI dispatchers) whose args streaming is not meaningful to surface in the chat. Default empty — preserves prior behavior for non-filtering consumers.

readonly excludeToolNames: import("@angular/core").InputSignal<readonly string[]>;

expandedGroups

readonly expandedGroups: Signal<Set<string>>;

grouping

readonly grouping: import("@angular/core").InputSignal<"none" | "auto">;

groupRelated

Group default tool rows across names; false retains adjacent same-name grouping. None disables all grouping.

readonly groupRelated: import("@angular/core").InputSignal<boolean>;

groups

readonly groups: Signal<Group[]>;

groupSummary

readonly groupSummary: import("@angular/core").InputSignal<((name: string, count: number) => string) | undefined>;

message

readonly message: import("@angular/core").InputSignal<Message | undefined>;

resultTemplates

App-owned per-call result or action templates registered as content children.

readonly resultTemplates: Signal<readonly ChatToolResultTemplateDirective[]>;

templates

Per-tool-name + wildcard templates registered as content children.

readonly templates: Signal<readonly ChatToolCallTemplateDirective[]>;

toggleGroup · overload 1

toggleGroup(index: string): void;

Parameters

index · required
string

Returns

void

toolCalls

readonly toolCalls: Signal<readonly ({
        readonly id: string;
        readonly name: string;
        readonly args: import("@threadplane/core").PlainValue;
    } & ({
        readonly status: "pending" | "running";
    } | {
        readonly status: "complete";
        readonly result: import("@threadplane/core").PlainValue;
        readonly parts?: readonly import("@threadplane/core").PlainValue[];
    } | {
        readonly status: "error";
        readonly error: string;
        readonly parts?: readonly import("@threadplane/core").PlainValue[];
    }))[]>;

toolCallTemplates

Per-tool-name + wildcard templates supplied by a parent composition. Compositions that forward templates projected into themselves (such as <chat>) pass them here, because a content query cannot see templates re-projected through another component. Templates registered as content children of this component take precedence for the same tool name.

readonly toolCallTemplates: import("@angular/core").InputSignal<readonly ChatToolCallTemplateDirective[]>;

toolLabel

App-owned readable labels. Receives the call's arguments so repeated calls to one tool can say what each did, such as "Read toSorted". Technical names remain in Details.

readonly toolLabel: import("@angular/core").InputSignal<((name: string, args?: unknown) => string | undefined) | undefined>;

toolOutcome

App-authored confirmed result previews, or status: 'failed' to show a completed call as failed; custom tool templates keep ownership.

readonly toolOutcome: import("@angular/core").InputSignal<((activity: ToolActivityInfo) => ToolActivityOutcome | undefined) | undefined>;

toolResultTemplates

Per-tool-name + wildcard result templates supplied by a parent composition, for the same reason as toolCallTemplates. Content children win by name.

readonly toolResultTemplates: import("@angular/core").InputSignal<readonly ChatToolResultTemplateDirective[]>;

toolRetry

Emits the failed activity when a retry declared by toolOutcome is activated. The control is offered only while the agent is idle and no later call repeats the same tool and arguments. The application owns what a retry does.

readonly toolRetry: import("@angular/core").OutputEmitterRef<ToolActivityInfo>;