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

Method to_dict

python/copilot/generated/rpc.py:10679–10688  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10677 return HistoryCompactResult(messages_removed, success, tokens_removed, context_window, summary_content)
10678
10679 def to_dict(self) -> dict:
10680 result: dict = {}
10681 result["messagesRemoved"] = from_int(self.messages_removed)
10682 result["success"] = from_bool(self.success)
10683 result["tokensRemoved"] = from_int(self.tokens_removed)
10684 if self.context_window is not None:
10685 result["contextWindow"] = from_union([lambda x: to_class(HistoryCompactContextWindow, x), from_none], self.context_window)
10686 if self.summary_content is not None:
10687 result["summaryContent"] = from_union([from_str, from_none], self.summary_content)
10688 return result
10689
10690# Experimental: this type is part of an experimental API and may change or be removed.
10691@dataclass

Callers

nothing calls this directly

Calls 4

from_intFunction · 0.70
from_boolFunction · 0.70
from_unionFunction · 0.70
to_classFunction · 0.70

Tested by

no test coverage detected