MCPcopy Index your code
hub / github.com/FSoft-AI4Code/CodeWiki / to_dict

Method to_dict

codewiki/cli/models/config.py:44–57  ·  view source on GitHub ↗

Convert to dictionary, excluding None values.

(self)

Source from the content-addressed store, hash-verified

42 custom_instructions: Optional[str] = None # Free-form instructions
43
44 def to_dict(self) -> dict:
45 """Convert to dictionary, excluding None values."""
46 result = {}
47 if self.include_patterns:
48 result['include_patterns'] = self.include_patterns
49 if self.exclude_patterns:
50 result['exclude_patterns'] = self.exclude_patterns
51 if self.focus_modules:
52 result['focus_modules'] = self.focus_modules
53 if self.doc_type:
54 result['doc_type'] = self.doc_type
55 if self.custom_instructions:
56 result['custom_instructions'] = self.custom_instructions
57 return result
58
59 @classmethod
60 def from_dict(cls, data: dict) -> 'AgentInstructions':

Callers 2

generate_commandFunction · 0.95
to_backend_configMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected