
    
!i=	                        S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSKJ
r
  SS	KJr  SS
KJr   " S S\R                  5      rg)zThe compile command.    )annotations)Sequence)command)command_utils)ipython_env)model_registry)parsed_args_lib)post_process_utils)py_utilsc                  h   ^  \ rS rSrSr S   SU 4S jjjr        S	S jr    S
S jrSrU =r	$ )CompileCommand   z(Implementation of the "compile" command.c                :   > [         TU ]  5         Xl        X l        g)zYConstructor.

Args:
  models: ModelRegistry instance.
  env: The IPythonEnv environment.
N)super__init___models_ipython_env)selfmodelsenv	__class__s      b/home/james-whalen/.local/lib/python3.13/site-packages/google/generativeai/notebook/compile_cmd.pyr   CompileCommand.__init__   s     	    c                    [         R                  " U R                  U R                  UUUS9n[        R
                  " UR                  U5        SR                  UR                  5      $ )N)r   r   parsed_argscell_contentpost_processing_fnsz%Saved function to Python variable: {})r   create_llm_functionr   r   r   
set_py_varcompile_save_nameformat)r   r   r   r   llm_fns        r   executeCompileCommand.execute.   s\     22<<!!#% 3
 	K996B6==k>[>[\\r   c                .    [         R                  " U5      $ N)r
   resolve_post_processing_tokens)r   tokenss     r   parse_post_processing_tokens+CompileCommand.parse_post_processing_tokens?   s     "@@HHr   )r   r   r'   )r   zmodel_registry.ModelRegistryr   zipython_env.IPythonEnv | None)r   zparsed_args_lib.ParsedArgsr   strr   2Sequence[post_process_utils.ParsedPostProcessExpr]returnr,   )r)   zSequence[Sequence[str]]r.   r-   )
__name__
__module____qualname____firstlineno____doc__r   r$   r*   __static_attributes____classcell__)r   s   @r   r   r      sv    2
 .2 ,  +   ]/] ] P	]
 
]"I-I	;I Ir   r   N)r3   
__future__r   typingr   google.generativeai.notebookr   r   r   r   r	   r
   r   Commandr    r   r   <module>r;      s7     "  0 6 4 7 8 ; 1&IW__ &Ir   