( folderId: string, workspaceId: string )
| 779 | } |
| 780 | |
| 781 | async function resolveFileFolderResource( |
| 782 | folderId: string, |
| 783 | workspaceId: string |
| 784 | ): Promise<AgentContext | null> { |
| 785 | try { |
| 786 | const rawPath = await getWorkspaceFileFolderPath(workspaceId, folderId) |
| 787 | if (!rawPath) return null |
| 788 | const encoded = encodeVfsPathSegments(rawPath.split('/').filter(Boolean)) |
| 789 | return { |
| 790 | type: 'active_resource', |
| 791 | tag: '@active_resource', |
| 792 | content: '', |
| 793 | path: `files/${encoded}`, |
| 794 | } |
| 795 | } catch (error) { |
| 796 | logger.error('Failed to resolve file folder resource', { folderId, error }) |
| 797 | return null |
| 798 | } |
| 799 | } |
| 800 | |
| 801 | async function resolveFolderResource( |
| 802 | folderId: string, |
no test coverage detected