(messages: Message[])
| 209 | * don't exist on external builds). |
| 210 | */ |
| 211 | export function stripReinjectedAttachments(messages: Message[]): Message[] { |
| 212 | if (feature('EXPERIMENTAL_SKILL_SEARCH')) { |
| 213 | return messages.filter( |
| 214 | m => |
| 215 | !( |
| 216 | m.type === 'attachment' && |
| 217 | (m.attachment.type === 'skill_discovery' || |
| 218 | m.attachment.type === 'skill_listing') |
| 219 | ), |
| 220 | ) |
| 221 | } |
| 222 | return messages |
| 223 | } |
| 224 | |
| 225 | export const ERROR_MESSAGE_NOT_ENOUGH_MESSAGES = |
| 226 | 'Not enough messages to compact.' |
no test coverage detected