@builder.io/ai-utils 0.17.2 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/codegen.d.ts +3 -1
- package/src/completion.d.ts +151 -147
- package/src/events.d.ts +333 -281
- package/src/mapping.d.ts +66 -66
- package/src/messages.d.ts +283 -214
- package/src/messages.js +12 -12
- package/src/organization.d.ts +351 -334
- package/src/projects.d.ts +573 -424
- package/src/projects.js +18 -17
- package/src/repo-indexing.d.ts +114 -96
- package/src/repo-indexing.js +5 -5
- package/src/settings.d.ts +15 -13
- package/src/settings.js +27 -26
- package/src/vscode-tunnel.d.ts +23 -8
- package/src/vscode-tunnel.js +36 -22
package/src/messages.d.ts
CHANGED
|
@@ -3,266 +3,317 @@ import type { ContentUpdatePatch } from "./events.js";
|
|
|
3
3
|
* Message param does not know the id of the message.
|
|
4
4
|
* This is an input message.
|
|
5
5
|
*/
|
|
6
|
-
export type MessageParam =
|
|
6
|
+
export type MessageParam =
|
|
7
|
+
| SystemMessageParam
|
|
8
|
+
| UserMessageParam
|
|
9
|
+
| AssistantMessageParam;
|
|
7
10
|
export interface ContentMessageItemText {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
type: "text";
|
|
12
|
+
text: string;
|
|
13
|
+
cache?: boolean;
|
|
14
|
+
citations?: TextCitationParam[] | null;
|
|
15
|
+
ephemeral?: boolean;
|
|
16
|
+
thoughtSignature?: string;
|
|
17
|
+
tag?: string;
|
|
15
18
|
}
|
|
16
19
|
export interface ContentMessageItemImage {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
type: "image";
|
|
21
|
+
source: ImageBase64Source | ImageUrlSource;
|
|
22
|
+
cache?: boolean;
|
|
23
|
+
ephemeral?: boolean;
|
|
21
24
|
}
|
|
22
25
|
export interface ContentMessageItemDocument {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
type: "document";
|
|
27
|
+
source: DocumentBase64Source | DocumentUrlSource | DocumentTextSource;
|
|
28
|
+
cache?: boolean;
|
|
29
|
+
ephemeral?: boolean;
|
|
30
|
+
title?: string;
|
|
28
31
|
}
|
|
29
32
|
export interface ContentMessageItemVideo {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
type: "video";
|
|
34
|
+
source: VideoUrlSource;
|
|
35
|
+
cache?: boolean;
|
|
36
|
+
ephemeral?: boolean;
|
|
34
37
|
}
|
|
35
38
|
export interface DocumentBase64Source {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
type: "base64";
|
|
40
|
+
media_type: "application/pdf";
|
|
41
|
+
data: string;
|
|
42
|
+
original_url?: string;
|
|
40
43
|
}
|
|
41
44
|
export interface DocumentUrlSource {
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
type: "url";
|
|
46
|
+
url: string;
|
|
44
47
|
}
|
|
45
48
|
export interface DocumentTextSource {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
type: "text";
|
|
50
|
+
media_type: "text/plain";
|
|
51
|
+
data: string;
|
|
49
52
|
}
|
|
50
53
|
export interface ContentMessageItemToolResult {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
type: "tool_result";
|
|
55
|
+
tool_use_id: string;
|
|
56
|
+
tool_name?: string;
|
|
57
|
+
tool_input?: string;
|
|
58
|
+
title?: string;
|
|
59
|
+
content: string | (ContentMessageItemText | ContentMessageItemImage)[];
|
|
60
|
+
is_error?: boolean;
|
|
61
|
+
cache?: boolean;
|
|
62
|
+
ephemeral?: boolean;
|
|
63
|
+
structured_result?: Record<string, any>;
|
|
61
64
|
}
|
|
62
65
|
export interface ImageBase64Source {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
type: "base64";
|
|
67
|
+
media_type: "image/webp" | "image/png" | "image/jpeg" | "image/gif";
|
|
68
|
+
data: string;
|
|
69
|
+
original_url?: string;
|
|
67
70
|
}
|
|
68
71
|
export interface ImageUrlSource {
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
type: "url";
|
|
73
|
+
url: string;
|
|
71
74
|
}
|
|
72
75
|
export interface VideoUrlSource {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
type: "url";
|
|
77
|
+
url: string;
|
|
78
|
+
media_type?:
|
|
79
|
+
| "video/mp4"
|
|
80
|
+
| "video/mov"
|
|
81
|
+
| "video/mpeg"
|
|
82
|
+
| "video/mpg"
|
|
83
|
+
| "video/avi"
|
|
84
|
+
| "video/wmv"
|
|
85
|
+
| "video/webm"
|
|
86
|
+
| "video/flv";
|
|
76
87
|
}
|
|
77
88
|
export interface ContentMessageItemThinking {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
89
|
+
type: "thinking";
|
|
90
|
+
thinking: string;
|
|
91
|
+
signature: string;
|
|
92
|
+
source?: "openai" | "gemini";
|
|
93
|
+
id?: string;
|
|
83
94
|
}
|
|
84
95
|
export interface ContentMessageItemRedactedThinking {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
96
|
+
type: "redacted_thinking";
|
|
97
|
+
data: string;
|
|
98
|
+
source?: "openai" | "gemini";
|
|
99
|
+
id?: string;
|
|
89
100
|
}
|
|
90
101
|
export interface ContentMessageItemToolUse {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
102
|
+
type: "tool_use";
|
|
103
|
+
id: string;
|
|
104
|
+
provider_id?: string;
|
|
105
|
+
input: unknown;
|
|
106
|
+
completion?: string;
|
|
107
|
+
thoughtSignature?: string;
|
|
108
|
+
name: string;
|
|
98
109
|
}
|
|
99
110
|
export interface CitationCharLocationParam {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
111
|
+
cited_text: string;
|
|
112
|
+
document_index: number;
|
|
113
|
+
document_title: string | null;
|
|
114
|
+
end_char_index: number;
|
|
115
|
+
start_char_index: number;
|
|
116
|
+
type: "char_location";
|
|
106
117
|
}
|
|
107
118
|
export interface CitationContentBlockLocationParam {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
119
|
+
cited_text: string;
|
|
120
|
+
document_index: number;
|
|
121
|
+
document_title: string | null;
|
|
122
|
+
end_block_index: number;
|
|
123
|
+
start_block_index: number;
|
|
124
|
+
type: "content_block_location";
|
|
114
125
|
}
|
|
115
126
|
export interface CitationPageLocationParam {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
127
|
+
cited_text: string;
|
|
128
|
+
document_index: number;
|
|
129
|
+
document_title: string | null;
|
|
130
|
+
end_page_number: number;
|
|
131
|
+
start_page_number: number;
|
|
132
|
+
type: "page_location";
|
|
122
133
|
}
|
|
123
134
|
export interface CitationWebSearchResultLocationParam {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
export type TextCitationParam =
|
|
135
|
+
cited_text: string;
|
|
136
|
+
encrypted_index: string;
|
|
137
|
+
title: string | null;
|
|
138
|
+
type: "web_search_result_location";
|
|
139
|
+
url: string;
|
|
140
|
+
}
|
|
141
|
+
export type TextCitationParam =
|
|
142
|
+
| CitationCharLocationParam
|
|
143
|
+
| CitationPageLocationParam
|
|
144
|
+
| CitationContentBlockLocationParam
|
|
145
|
+
| CitationWebSearchResultLocationParam;
|
|
131
146
|
export interface ServerToolUseContent {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
147
|
+
type: "web_search_result";
|
|
148
|
+
title: string;
|
|
149
|
+
url: string;
|
|
150
|
+
page_age: string | null;
|
|
151
|
+
encrypted_content: string;
|
|
137
152
|
}
|
|
138
153
|
export interface ServerToolUseContentError {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
154
|
+
error_code:
|
|
155
|
+
| "invalid_tool_input"
|
|
156
|
+
| "unavailable"
|
|
157
|
+
| "max_uses_exceeded"
|
|
158
|
+
| "too_many_requests"
|
|
159
|
+
| "query_too_long";
|
|
160
|
+
type: "web_search_tool_result_error";
|
|
161
|
+
}
|
|
162
|
+
export type ServerToolUseContentUnion =
|
|
163
|
+
| ServerToolUseContent[]
|
|
164
|
+
| ServerToolUseContentError;
|
|
143
165
|
export interface ContentMessageItemServerToolUse {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
166
|
+
type: "server_tool_use";
|
|
167
|
+
id: string;
|
|
168
|
+
name:
|
|
169
|
+
| "web_search"
|
|
170
|
+
| "code_execution"
|
|
171
|
+
| "web_fetch"
|
|
172
|
+
| "bash_code_execution"
|
|
173
|
+
| "text_editor_code_execution"
|
|
174
|
+
| "tool_search_tool_regex"
|
|
175
|
+
| "tool_search_tool_bm25";
|
|
176
|
+
input: unknown;
|
|
177
|
+
completion?: string;
|
|
178
|
+
content?: any;
|
|
179
|
+
cache?: boolean;
|
|
151
180
|
}
|
|
152
181
|
export interface MCPServerURLDefinition {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
182
|
+
name: string;
|
|
183
|
+
type: "url";
|
|
184
|
+
url: string;
|
|
185
|
+
authorization_token?: string | null;
|
|
186
|
+
tool_configuration?: MCPServerToolConfiguration | null;
|
|
187
|
+
token_expires_at?: number | null;
|
|
188
|
+
create_date?: number | null;
|
|
189
|
+
serverId: string;
|
|
190
|
+
disabled: boolean;
|
|
162
191
|
}
|
|
163
192
|
export interface MCPServerToolConfiguration {
|
|
164
|
-
|
|
165
|
-
|
|
193
|
+
allowed_tools?: Array<string> | null;
|
|
194
|
+
enabled?: boolean | null;
|
|
166
195
|
}
|
|
167
196
|
export interface ContentMessageItemWebSearchToolResult {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
197
|
+
content: ServerToolUseContent[] | ServerToolUseContentError;
|
|
198
|
+
tool_use_id: string;
|
|
199
|
+
type: "web_search_tool_result";
|
|
200
|
+
cache?: boolean;
|
|
172
201
|
}
|
|
173
202
|
export interface ContentMessageItemMCPToolUse {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
203
|
+
type: "mcp_tool_use";
|
|
204
|
+
id: string;
|
|
205
|
+
name: string;
|
|
206
|
+
input: unknown;
|
|
207
|
+
server_name: string;
|
|
208
|
+
cache?: boolean;
|
|
180
209
|
}
|
|
181
210
|
export interface ContentMessageItemContainerUpload {
|
|
182
|
-
|
|
183
|
-
|
|
211
|
+
type: "container_upload";
|
|
212
|
+
file_id: string;
|
|
184
213
|
}
|
|
185
214
|
export interface ContentMessageItemMCPToolResult {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
215
|
+
type: "mcp_tool_result";
|
|
216
|
+
tool_use_id: string;
|
|
217
|
+
content: string | ContentMessageItemText[];
|
|
218
|
+
is_error: boolean;
|
|
219
|
+
cache?: boolean;
|
|
191
220
|
}
|
|
192
221
|
export interface ContentMessageItemCodeExecutionToolResult {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
198
|
-
export type ContentMessageItem =
|
|
222
|
+
type: "code_execution_tool_result";
|
|
223
|
+
tool_use_id: string;
|
|
224
|
+
content: any;
|
|
225
|
+
cache?: boolean;
|
|
226
|
+
}
|
|
227
|
+
export type ContentMessageItem =
|
|
228
|
+
| ContentMessageItemText
|
|
229
|
+
| ContentMessageItemImage
|
|
230
|
+
| ContentMessageItemDocument
|
|
231
|
+
| ContentMessageItemVideo
|
|
232
|
+
| ContentMessageItemThinking
|
|
233
|
+
| ContentMessageItemRedactedThinking
|
|
234
|
+
| ContentMessageItemToolUse
|
|
235
|
+
| ContentMessageItemToolResult
|
|
236
|
+
| ContentMessageItemWebSearchToolResult
|
|
237
|
+
| ContentMessageItemServerToolUse
|
|
238
|
+
| ContentMessageItemMCPToolUse
|
|
239
|
+
| ContentMessageItemMCPToolResult
|
|
240
|
+
| ContentMessageItemContainerUpload
|
|
241
|
+
| ContentMessageItemCodeExecutionToolResult;
|
|
199
242
|
export type ContentMessage = ContentMessageItem[];
|
|
200
243
|
export interface SystemMessageParam {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
244
|
+
/**
|
|
245
|
+
* The contents of the system message.
|
|
246
|
+
*/
|
|
247
|
+
content: string | ContentMessageItemText[];
|
|
248
|
+
responseId?: string;
|
|
249
|
+
/**
|
|
250
|
+
* The role of the messages author, in this case `system`.
|
|
251
|
+
*/
|
|
252
|
+
role: "system";
|
|
253
|
+
id?: string;
|
|
211
254
|
}
|
|
212
255
|
export interface UserMessageParam {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
256
|
+
/**
|
|
257
|
+
* The contents of the user message.
|
|
258
|
+
*/
|
|
259
|
+
content:
|
|
260
|
+
| string
|
|
261
|
+
| (
|
|
262
|
+
| ContentMessageItemText
|
|
263
|
+
| ContentMessageItemImage
|
|
264
|
+
| ContentMessageItemDocument
|
|
265
|
+
| ContentMessageItemVideo
|
|
266
|
+
| ContentMessageItemToolResult
|
|
267
|
+
)[];
|
|
268
|
+
responseId?: string;
|
|
269
|
+
/**
|
|
270
|
+
* The role of the messages author, in this case `user`.
|
|
271
|
+
*/
|
|
272
|
+
role: "user";
|
|
273
|
+
id?: string;
|
|
223
274
|
}
|
|
224
275
|
export type AssistantMessageAction = "new-chat";
|
|
225
276
|
export interface AssistantMessageParam {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
277
|
+
/**
|
|
278
|
+
* The contents of the assistant message.
|
|
279
|
+
*/
|
|
280
|
+
content: string | ContentMessageItem[];
|
|
281
|
+
/**
|
|
282
|
+
* The role of the messages author, in this case `assistant`.
|
|
283
|
+
*/
|
|
284
|
+
role: "assistant";
|
|
285
|
+
responseId?: string;
|
|
286
|
+
id?: string;
|
|
287
|
+
skipDelta?: boolean;
|
|
288
|
+
/**
|
|
289
|
+
* A summary of the patches which the assistant has made.
|
|
290
|
+
* Useful for genai.
|
|
291
|
+
*/
|
|
292
|
+
patches?: ContentUpdatePatch[];
|
|
293
|
+
state?: "error";
|
|
294
|
+
/**
|
|
295
|
+
* Any actions associated with the error such as a "new chat" button.
|
|
296
|
+
* typically used when there is an error.
|
|
297
|
+
*/
|
|
298
|
+
actions?: AssistantMessageAction[];
|
|
248
299
|
}
|
|
249
300
|
export interface SystemMessage extends SystemMessageParam {
|
|
250
|
-
|
|
301
|
+
id: string;
|
|
251
302
|
}
|
|
252
303
|
export interface UserMessage extends UserMessageParam {
|
|
253
|
-
|
|
304
|
+
id: string;
|
|
254
305
|
}
|
|
255
306
|
export interface AssistantMessage extends AssistantMessageParam {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
307
|
+
id: string;
|
|
308
|
+
status?: "accepted" | "rejected" | "aborted";
|
|
309
|
+
summary?: string;
|
|
259
310
|
}
|
|
260
311
|
export interface AssistantActionMessage {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
312
|
+
/**
|
|
313
|
+
* The role of the messages author, in this case `assistant`.
|
|
314
|
+
*/
|
|
315
|
+
role: "assistant";
|
|
316
|
+
id: string;
|
|
266
317
|
}
|
|
267
318
|
/**
|
|
268
319
|
* Message DOES know the id of the message.
|
|
@@ -270,35 +321,53 @@ export interface AssistantActionMessage {
|
|
|
270
321
|
* and is the output message.
|
|
271
322
|
*/
|
|
272
323
|
export type Message = SystemMessage | UserMessage | AssistantMessage;
|
|
273
|
-
export type GeneratingMessage = null | Partial<
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
export
|
|
324
|
+
export type GeneratingMessage = null | Partial<
|
|
325
|
+
AssistantActionMessage | AssistantMessage
|
|
326
|
+
>;
|
|
327
|
+
export declare function getContentText(
|
|
328
|
+
message: string | ContentMessage,
|
|
329
|
+
): string;
|
|
330
|
+
export declare function getContentAttachments(
|
|
331
|
+
message: string | ContentMessage,
|
|
332
|
+
): (ImageBase64Source | ImageUrlSource)[];
|
|
333
|
+
export type Attachment =
|
|
334
|
+
| FileUpload
|
|
335
|
+
| Template
|
|
336
|
+
| URL
|
|
337
|
+
| BuilderContentAttachment
|
|
338
|
+
| FigmaContentAttachment;
|
|
277
339
|
export interface URL {
|
|
278
|
-
|
|
279
|
-
|
|
340
|
+
type: "url";
|
|
341
|
+
value: string;
|
|
280
342
|
}
|
|
281
343
|
export interface FileUpload {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
344
|
+
type: "upload";
|
|
345
|
+
contentType:
|
|
346
|
+
| "image/webp"
|
|
347
|
+
| "image/png"
|
|
348
|
+
| "image/jpeg"
|
|
349
|
+
| "image/gif"
|
|
350
|
+
| "application/pdf"
|
|
351
|
+
| "application/json"
|
|
352
|
+
| "text/plain";
|
|
353
|
+
name: string;
|
|
354
|
+
dataUrl: string;
|
|
355
|
+
text?: string;
|
|
356
|
+
size: number;
|
|
357
|
+
id: string;
|
|
358
|
+
originalUrl?: string;
|
|
359
|
+
ephemeral?: boolean;
|
|
291
360
|
}
|
|
292
361
|
export interface Template {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
362
|
+
type: "template";
|
|
363
|
+
name: string;
|
|
364
|
+
id: number;
|
|
296
365
|
}
|
|
297
366
|
export interface BuilderContentAttachment {
|
|
298
|
-
|
|
299
|
-
|
|
367
|
+
type: "builder";
|
|
368
|
+
html: string;
|
|
300
369
|
}
|
|
301
370
|
export interface FigmaContentAttachment {
|
|
302
|
-
|
|
303
|
-
|
|
371
|
+
type: "figma";
|
|
372
|
+
html: string;
|
|
304
373
|
}
|
package/src/messages.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export function getContentText(message) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
if (typeof message === "string") {
|
|
3
|
+
return message;
|
|
4
|
+
}
|
|
5
|
+
return message
|
|
6
|
+
.map((item) => (item.type === "text" ? item.text : ""))
|
|
7
|
+
.join("");
|
|
8
8
|
}
|
|
9
9
|
export function getContentAttachments(message) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
if (typeof message === "string") {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
return message
|
|
14
|
+
.filter((item) => item.type === "image")
|
|
15
|
+
.map((item) => item.source);
|
|
16
16
|
}
|