Open History to see the last commit
1---
2id: SnippetRegisteredEvent
3title: SnippetRegisteredEvent
4---
5
6Defined in: [packages/ai/src/types.ts:1949](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1949)
7
8Custom event for extensibility.
9
10@ag-ui/core provides: `name`, `value`, `subagentRunId?`
11
12## Extends
13
14- [`CustomEvent`](CustomEvent.md)
15
16## Properties
17
18### metadata?
19
20```ts
21optional metadata?: Record<string, any>;
22```
23
24Defined in: [packages/ai/src/types.ts:1789](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1789)
25
26Extra information attached to this event.
27
28#### Inherited from
29
30[`CustomEvent`](CustomEvent.md).[`metadata`](CustomEvent.md#metadata)
31
32***
33
34### name
35
36```ts
37name: "snippet:registered";
38```
39
40Defined in: [packages/ai/src/types.ts:1950](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1950)
41
42What this custom event is. Required: without it a consumer cannot route
43the value.
44
45#### Overrides
46
47```ts
48CustomEvent.name
49```
50
51***
52
53### type
54
55```ts
56type: "CUSTOM";
57```
58
59Defined in: [packages/ai/src/types.ts:1788](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1788)
60
61#### Inherited from
62
63[`CustomEvent`](CustomEvent.md).[`type`](CustomEvent.md#type)
64
65***
66
67### value
68
69```ts
70value: object;
71```
72
73Defined in: [packages/ai/src/types.ts:1951](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1951)
74
75The payload. Any JSON value, and required.
76
77#### description
78
79```ts
80description: string;
81```
82
83#### id
84
85```ts
86id: string;
87```
88
89#### name
90
91```ts
92name: string;
93```
94
95#### timestamp
96
97```ts
98timestamp: number;
99```
100
101#### Overrides
102
103```ts
104CustomEvent.value
105```