Open History to see the last commit
1---
2id: CodeModeSnippetErrorEvent
3title: CodeModeSnippetErrorEvent
4---
5
6Defined in: packages/ai/src/types.ts:1872
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:1756
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_error";
38```
39
40Defined in: packages/ai/src/types.ts:1873
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:1755
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:1874
74
75The payload. Any JSON value, and required.
76
77#### duration
78
79```ts
80duration: number;
81```
82
83#### error
84
85```ts
86error: string;
87```
88
89#### snippet
90
91```ts
92snippet: string;
93```
94
95#### timestamp
96
97```ts
98timestamp: number;
99```
100
101#### Overrides
102
103```ts
104CustomEvent.value
105```