Skip to main content
Glama
component.rs904 B
use async_trait::async_trait; use si_id::{ AttributeValueId, ComponentId, }; use crate::{ WorkspaceSnapshot, component::ComponentResult, workspace_snapshot::graph::traits::component::ComponentExt as _, }; #[async_trait] pub trait ComponentExt { async fn root_attribute_value( &self, component_id: ComponentId, ) -> ComponentResult<AttributeValueId>; async fn external_source_count(&self, id: ComponentId) -> ComponentResult<usize>; } #[async_trait] impl ComponentExt for WorkspaceSnapshot { async fn root_attribute_value( &self, component_id: ComponentId, ) -> ComponentResult<AttributeValueId> { self.working_copy().await.root_attribute_value(component_id) } async fn external_source_count(&self, id: ComponentId) -> ComponentResult<usize> { self.working_copy().await.external_source_count(id) } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server