@@ -41,10 +41,17 @@ def set_audit_logger(audit_logger: AuditLogger | None) -> None:
4141class LazyModuleGroup (click .Group ):
4242 """Custom Click Group that lazily loads apcore modules as subcommands."""
4343
44- def __init__ (self , registry : Registry , executor : Executor , ** kwargs : Any ) -> None :
44+ def __init__ (
45+ self ,
46+ registry : Registry ,
47+ executor : Executor ,
48+ help_text_max_length : int = 1000 ,
49+ ** kwargs : Any ,
50+ ) -> None :
4551 super ().__init__ (** kwargs )
4652 self ._registry = registry
4753 self ._executor = executor
54+ self ._help_text_max_length = help_text_max_length
4855 self ._module_cache : dict [str , click .Command ] = {}
4956
5057 def list_commands (self , ctx : click .Context ) -> list [str ]:
@@ -70,7 +77,7 @@ def get_command(self, ctx: click.Context, cmd_name: str) -> click.Command | None
7077 if module_def is None :
7178 return None
7279
73- cmd = build_module_command (module_def , self ._executor )
80+ cmd = build_module_command (module_def , self ._executor , help_text_max_length = self . _help_text_max_length )
7481 self ._module_cache [cmd_name ] = cmd
7582 return cmd
7683
@@ -101,7 +108,11 @@ def _get_module_id(module_def: ModuleDescriptor) -> str:
101108 return module_def .module_id
102109
103110
104- def build_module_command (module_def : ModuleDescriptor , executor : Executor ) -> click .Command :
111+ def build_module_command (
112+ module_def : ModuleDescriptor ,
113+ executor : Executor ,
114+ help_text_max_length : int = 1000 ,
115+ ) -> click .Command :
105116 """Build a Click command from an apcore module definition.
106117
107118 Generates Click options from the module's input_schema, wires up
@@ -137,7 +148,7 @@ def build_module_command(module_def: ModuleDescriptor, executor: Executor) -> cl
137148 else :
138149 resolved_schema = input_schema
139150
140- schema_options = schema_to_click_options (resolved_schema )
151+ schema_options = schema_to_click_options (resolved_schema , max_help_length = help_text_max_length )
141152
142153 def callback (** kwargs : Any ) -> None :
143154 # Separate built-in options from schema-generated kwargs
0 commit comments