MCPcopy Index your code
hub / github.com/github/copilot-sdk / from_dict

Method from_dict

python/copilot/generated/rpc.py:2061–2069  ·  view source on GitHub ↗
(obj: Any)

Source from the content-addressed store, hash-verified

2059
2060 @staticmethod
2061 def from_dict(obj: Any) -> 'HistoryCompactContextWindow':
2062 assert isinstance(obj, dict)
2063 current_tokens = from_int(obj.get("currentTokens"))
2064 messages_length = from_int(obj.get("messagesLength"))
2065 token_limit = from_int(obj.get("tokenLimit"))
2066 conversation_tokens = from_union([from_int, from_none], obj.get("conversationTokens"))
2067 system_tokens = from_union([from_int, from_none], obj.get("systemTokens"))
2068 tool_definitions_tokens = from_union([from_int, from_none], obj.get("toolDefinitionsTokens"))
2069 return HistoryCompactContextWindow(current_tokens, messages_length, token_limit, conversation_tokens, system_tokens, tool_definitions_tokens)
2070
2071 def to_dict(self) -> dict:
2072 result: dict = {}

Callers

nothing calls this directly

Calls 4

from_intFunction · 0.70
from_unionFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected