MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / config_agent

Function config_agent

codewiki/cli/commands/config.py:737–861  ·  view source on GitHub ↗

Configure default agent instructions for documentation generation. These settings are used as defaults when running 'codewiki generate'. Runtime options (--include, --exclude, etc.) override these defaults. Examples: \b # Set include patterns for C# projects

(
    include: Optional[str],
    exclude: Optional[str],
    focus: Optional[str],
    doc_type: Optional[str],
    instructions: Optional[str],
    clear: bool
)

Source from the content-addressed store, hash-verified

735 "-i",
736 type=str,
737 default=None,
738 help="Comma-separated file patterns to include (e.g., '*.cs,*.py')",
739)
740@click.option(
741 "--exclude",
742 "-e",
743 type=str,
744 default=None,
745 help="Comma-separated patterns to exclude (e.g., '*Tests*,*Specs*')",
746)
747@click.option(
748 "--focus",
749 "-f",
750 type=str,
751 default=None,
752 help="Comma-separated modules/paths to focus on (e.g., 'src/core,src/api')",
753)
754@click.option(
755 "--doc-type",
756 "-t",
757 type=click.Choice(['api', 'architecture', 'user-guide', 'developer'], case_sensitive=False),
758 default=None,
759 help="Default type of documentation to generate",
760)
761@click.option(
762 "--instructions",
763 type=str,
764 default=None,
765 help="Custom instructions for the documentation agent",
766)
767@click.option(
768 "--clear",
769 is_flag=True,
770 help="Clear all agent instructions",
771)
772def config_agent(
773 include: Optional[str],
774 exclude: Optional[str],
775 focus: Optional[str],
776 doc_type: Optional[str],
777 instructions: Optional[str],
778 clear: bool
779):
780 """
781 Configure default agent instructions for documentation generation.
782
783 These settings are used as defaults when running 'codewiki generate'.
784 Runtime options (--include, --exclude, etc.) override these defaults.
785
786 Examples:
787
788 \b
789 # Set include patterns for C# projects
790 $ codewiki config agent --include "*.cs"
791
792 \b
793 # Exclude test projects
794 $ codewiki config agent --exclude "*Tests*,*Specs*,test_*"

Callers

nothing calls this directly

Calls 8

loadMethod · 0.95
get_configMethod · 0.95
saveMethod · 0.95
ConfigManagerClass · 0.90
AgentInstructionsClass · 0.90
handle_errorFunction · 0.90
is_emptyMethod · 0.80
parse_patternsFunction · 0.70

Tested by

no test coverage detected