MCPcopy Index your code
hub / github.com/Codeplain-ai/codeplain / print_resources

Method print_resources

plain2code_console.py:123–136  ·  view source on GitHub ↗
(self, resources_list, linked_resources)

Source from the content-addressed store, hash-verified

121 return len(text) // CHARACTERS_TO_TOKENS_RULE_OF_THUMB_RATIO
122
123 def print_resources(self, resources_list, linked_resources):
124 if len(resources_list) == 0:
125 self.debug("Linked resources: None")
126 return
127
128 self.debug("Linked resources:")
129 for resource_name in resources_list:
130 if resource_name["target"] in linked_resources:
131 file_tokens = self._count_tokens(linked_resources[resource_name["target"]])
132 self.debug(
133 f"- {resource_name['text']} [#4169E1]({resource_name['target']}, {file_tokens} tokens)[/#4169E1]"
134 )
135
136 self.input()
137
138
139console = Plain2CodeConsole()

Callers 3

print_inputsFunction · 0.80
executeMethod · 0.80

Calls 3

debugMethod · 0.95
_count_tokensMethod · 0.95
inputMethod · 0.95

Tested by 2

executeMethod · 0.64