MCPcopy Index your code
hub / github.com/simstudioai/sim / resolveFileResource

Function resolveFileResource

apps/sim/lib/copilot/chat/process-contents.ts:767–779  ·  view source on GitHub ↗
(
  fileId: string,
  workspaceId: string
)

Source from the content-addressed store, hash-verified

765}
766
767async function resolveFileResource(
768 fileId: string,
769 workspaceId: string
770): Promise<AgentContext | null> {
771 const record = await getWorkspaceFile(workspaceId, fileId)
772 if (!record) return null
773 return {
774 type: 'active_resource',
775 tag: '@active_resource',
776 content: '',
777 path: canonicalWorkspaceFilePath({ folderPath: record.folderPath, name: record.name }),
778 }
779}
780
781async function resolveFileFolderResource(
782 folderId: string,

Callers 3

processContextsServerFunction · 0.85

Calls 2

getWorkspaceFileFunction · 0.90

Tested by

no test coverage detected