* Converts memory files to attachments, filtering out already-loaded files. * * @param memoryFiles The memory files to convert * @param toolUseContext The tool use context (for tracking loaded files) * @returns Array of nested memory attachments
( type: MemoryFileInfo['type'], )
| 1696 | * @returns Array of nested memory attachments |
| 1697 | */ |
| 1698 | function isInstructionsMemoryType( |
| 1699 | type: MemoryFileInfo['type'], |
| 1700 | ): type is InstructionsMemoryType { |
| 1701 | return ( |
| 1702 | type === 'User' || |
| 1703 | type === 'Project' || |
| 1704 | type === 'Local' || |
| 1705 | type === 'Managed' |
| 1706 | ) |
| 1707 | } |
| 1708 | |
| 1709 | /** Exported for testing — regression guard for LRU-eviction re-injection. */ |
| 1710 | export function memoryFilesToAttachments( |
no outgoing calls
no test coverage detected