Open History to see the last commit
1---
2id: CodeModeSnippetCallEvent
3title: CodeModeSnippetCallEvent
4---
5
6Defined in: [packages/ai/src/types.ts:1559](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1559)
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:1416](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1416)
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: "code_mode:snippet_call";
38```
39
40Defined in: [packages/ai/src/types.ts:1560](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1560)
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:1415](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1415)
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:1561](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1561)
74
75The payload. Any JSON value, and required.
76
77#### input
78
79```ts
80input: unknown;
81```
82
83#### snippet
84
85```ts
86snippet: string;
87```
88
89#### timestamp
90
91```ts
92timestamp: number;
93```
94
95#### Overrides
96
97```ts
98CustomEvent.value
99```