Saltar al contenido principal
Versión: 0.25.0

Type Alias: ChatEvent

type ChatEvent =
| {
event: AgentEvent;
type: "agent";
}
| {
text: string;
type: "user";
}
| {
text: string;
tone: NoticeTone;
type: "notice";
}
| {
type: "turn-start";
}
| {
seconds: number;
type: "turn-end";
}
| {
fromResume: boolean;
messages: object[];
type: "conversation";
updatedAt: Date;
}
| {
mode: Mode;
type: "mode";
}
| {
type: "session";
};

Defined in: chat/chatController.ts:144

What happens in the chat, in order, for a view that draws as it goes (a terminal).

Union Members​

Type Literal​

{
event: AgentEvent;
type: "agent";
}

Type Literal​

{
text: string;
type: "user";
}

Type Literal​

{
text: string;
tone: NoticeTone;
type: "notice";
}

Type Literal​

{
type: "turn-start";
}

Type Literal​

{
seconds: number;
type: "turn-end";
}

Type Literal​

{
fromResume: boolean;
messages: object[];
type: "conversation";
updatedAt: Date;
}

An earlier conversation to draw: the run's, at start or after /resume.


Type Literal​

{
mode: Mode;
type: "mode";
}

The mode changed (the person, or the agent leaving plan mode).


Type Literal​

{
type: "session";
}

The session was opened again (resumed, or an extension enabled or disabled).