MCPcopy Index your code
hub / github.com/CopilotKit/CopilotKit / generate_info_html

Function generate_info_html

sdk-python/copilotkit/html.py:148–178  ·  view source on GitHub ↗

Generate HTML for the info endpoint

(info: InfoDict)

Source from the content-addressed store, hash-verified

146
147
148def generate_info_html(info: InfoDict) -> str:
149 """
150 Generate HTML for the info endpoint
151 """
152 print(info, flush=True)
153 action_html = ""
154 for action in info["actions"]:
155 action_html += ACTION_TEMPLATE.format(
156 name=action["name"],
157 description=action["description"],
158 arguments=json.dumps(action.get("parameters", []), indent=2),
159 )
160 agent_html = ""
161 for agent in info["agents"]:
162 agent_type = agent.get("type", "Unknown")
163 if agent_type == "langgraph":
164 agent_type = "LangGraph"
165 elif agent_type == "crewai":
166 agent_type = "CrewAI"
167
168 agent_html += AGENT_TEMPLATE.format(
169 name=agent["name"],
170 type=agent_type,
171 description=agent["description"],
172 )
173 return INFO_TEMPLATE.format(
174 head_html=HEAD_HTML,
175 version=info["sdkVersion"],
176 action_html=action_html or NO_ACTIONS_FOUND_HTML,
177 agent_html=agent_html or NO_AGENTS_FOUND_HTML,
178 )

Callers 1

handle_infoFunction · 0.85

Calls 2

formatMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…