
    ^h`                        S SK r S SKrS SKrS SKrS SKrS SKrS SKrS SKrS SKrS SK	r	S SK
Jr  S SKJr  S SKrS SKrS SKJr  S SKJrJrJr  S SKJrJr  S SKJrJr  S SKJr  S S	KJrJ r   S S
K!J"q"  S SK#J$r$  S SK%J&r&  S SK'J(r(J)r)  S r*/ r+ \RX                  " 5       r-\-S:w  a,  S SK.J/r/  \0" \-\/5      (       a	  S SK1J2r2  \2r3OS SK4J5r5  \5r3\+S/-  r+O	S SK1J2r2  \2r3  " S S\35      r:g! \6 a"  r7\8" S\7 S35        \Rr                  r3 Sr7C7N/Sr7C7ff = f)    N)StringIO)Path)sandbox_eval)build_followup_promptbuild_initial_promptinitial_instructions)	AssistantAssistantError)CaptureInputCaptureOutput)print_locals)
strip_ansitruncate_proportionally)chatdbg_config)
ChatDBGLog)CommandHistory)chatdbg_was_calledprint_exit_messagec                 v    SSK Jn  SSKJnJq  XR
                  l        U" U R                  S9q[        S5        g )Nr   )ChatDBG)ChatDBGConfigr   )configz*** Loaded ChatDBG ***)	chatdbg.chatdbg_pdbr   chatdbg.util.configr   r   InteractiveTBdebugger_clsr   print)ipythonr   r   s      M/home/james-whalen/.local/lib/python3.13/site-packages/chatdbg/chatdbg_pdb.pyload_ipython_extensionr    #   s+    +A)0&"'..9N	
"#    )TerminalInteractiveShell)TerminalPdb)InterruptiblePdbz--format=jupyterzError z.: IPython not found. Defaulting to pdb plugin.c                   n  ^  \ rS rSrU 4S jrS rS rS rS rS.S jr	U 4S jr
S	 rU 4S
 jrS\S\4U 4S jjrS/U 4S jjrS/U 4S jjrU 4S jrU 4S jrU 4S jrU 4S jrS.S jrS rS rS rS rS rS rS0S jrS rS rS r S r!S  r"S! r#S" r$S# r%S$ r&S% r'S& r(S' r)S( r*S) r+S* r,S+ r-S, r.S-r/U =r0$ )1r   H   c                   >^  [         TT ]  " U0 UD6  [        R                  " [        5        ST l        ST l        ST l        S T l        [        R                  " [        5        [        R                  " U 4S j5        [        T R
                  5      T l        ST l        ST l        [!        ["        R$                  5      ["        l        T R'                  5       T l        T R+                  [        R,                  5        T =R.                  [0        R2                  " [        R4                  5      -  sl        ST l        [8        R:                  R=                  [8        R>                  5      /["        R:                   Vs/ s H  nSU;   d  SU;   d  M  UPM     sn-   T l         [C        [        RD                  [        RF                  " 5       S	S
9T l$        g s  snf )Nz
(ChatDBG) z   x   c                  $   > T R                  5       $ N)_close_assistantselfs   r   <lambda>"ChatDBG.__init__.<locals>.<lambda>S   s     5 5 7r!    Fzsite-packageszdist-packagesT)log_filenamer   capture_streams)%super__init__r   parse_only_user_flags_special_configprompt_chat_prefix_text_width
_assistantatexitregisterr   r   _history_error_message_error_detailsr   sysstdincan_support_flow_supports_flow
do_contextcontextrcLinesastliteral_evalrc_lines_show_localsospathdirname__file___library_pathsr   logto_json_log)r-   argskwargsrL   	__class__s   `   r   r4   ChatDBG.__init__I   sT   $)&),,_="!*+78&t{{3   +	"335../(()@)@AA "!wwr{{;<@
 $&/T*A  @
 
 '++!))+ 
	@
s   8GGc                 Z    U R                   S :w  a  U R                   R                  5         g g r*   )r:   closer,   s    r   r+   ChatDBG._close_assistanto   s#    ??d"OO!!# #r!   c                 v   [         R                  (       a  [        [        R                  R
                  R                  Lax  [        R                   Hd  nUR                  S5      (       d  UR                  S5      (       a  M1  UR                  S5      (       a  MI  [        U5      R                  S;   d  Md    g   gg)Nr   ipython3-)z.pyz.ipyFT)r   show_slicesChatDBGSuperIPythoncoredebuggerr$   r@   argvendswith
startswithr   suffixr-   args     r   rB   ChatDBG.can_support_flows   s     %%7<<#8#8#I#II88C||I..#,,z2J2J ~~c** Cy''?:$ $ r!   c                     U R                  UR                  R                  5      (       d  gUR                  R                  nUR	                  S5      (       + =(       d    US:H  $ )NF<z<module>)_is_user_filef_codeco_filenameco_namerd   )r-   framenames      r   _is_user_frameChatDBG._is_user_frame   sK    !!%,,":":;;||##??3''=4:+==r!   c                    UR                  S5      (       a  gUS:X  d  UR                  S5      (       a  gUR                  S5      (       a  gU R                   H)  n[        R                  R                  X/5      U:X  d  M)    g   g)Nz.pyxF<string>z<frozenz<ipythonT)rc   rd   rO   rK   rL   
commonpath)r-   	file_namerL   s      r   rk   ChatDBG._is_user_file   sw    f%%*$	(<(<Y(G(G!!*--''Dww!!9"34< ( r!   c                     U R                   n[        5       nX0l          U R                  U5        X l         [        UR	                  5       5      $ ! X l         f = fr*   )stdoutr   print_stack_tracer   getvalue)r-   rE   
old_stdoutbufs       r   enriched_stack_traceChatDBG.enriched_stack_trace   sI    [[
j	%""7+$K#,,.)) %Ks   A Ac                 T  > [        U[        5      (       a  UnO7[        R                  " 5       S   S :w  a  [        R                  " 5       S   nOS nUS :w  aC  SR	                  [
        R                  " [        U5      U5      5      R                  5       nX@l	        [        TU ]-  X5        g )N   r0   )
isinstanceBaseExceptionr@   exc_infojoin	tracebackformat_exception_onlytyperstripr>   r3   interaction)r-   ro   	tb_or_exc	exceptiondetailsrU   s        r   r   ChatDBG.interaction   s    i//!I\\^A$&q)IIgg//YKfh  #*E-r!   c                    U R                    H,  nU R                  US   5      (       + US   R                  S'   M.     U R                   SS  H  nSUS   R                  S'   M     U R                  S:  a  U R                  R                  SS5      (       a  U =R                  S-  sl        U R                   U R                     u  U l        U l        U R                  R                  U l        U R                  S:  a#  U R                  R                  SS5      (       a  M  U R                  R                  S :w  a  [        R                  " U R                  R                  R                  U R                  R                  5      nUR                  5       R                  S5      (       a  SUR                  5        S	3U l        g g g )
Nr   __tracebackhide__iTFr   assertz
The code `z3` is correct and MUST remain unchanged in your fix.)stackrq   f_localscurindexcurframe_localsgetcurframelinenof_lineno	linecachegetlinerl   rm   striprd   r?   )r-   sro   current_lines       r   _hide_lib_framesChatDBG._hide_lib_frames   sy   A595H5H15N1NAaDMM-.  ZZ#&E59E!H12 ' mmaD$8$8$<$<%
 %
 MMQM)-DMM)B&DM4;#'==#9#9D  mmaD$8$8$<$<%
 %
 ==!!T)$,,$$00$--2H2HL !!#..x88(2<3E3E3G2HH{&|# 9	 *r!   c                    > [         R                  (       d  U R                  5         [         R                  =(       a    [         R                  (       + U l        [
        TU ]  5       $ r*   )r   	show_libsr   show_localsrJ   r3   execRcLines)r-   rU   s    r   r   ChatDBG.execRcLines   sD    ''!!# +66W~?W?W;Ww"$$r!   linereturnc                   > U(       d  [         TU ]  U5      $ [        U R                  5      nX l         SU l        [         TU ]  U5      UR                  5       U l        [        UR                  5       5      nU R                  (       dO  U R                  R                  X5        UR                  5       S   S;  a  U R                  R                  X5        $ $ $ ! UR                  5       U l        [        UR                  5       5      nU R                  (       dO  U R                  R                  X5        UR                  5       S   S;  a  U R                  R                  X5        f f f = f)z/
Override to stash the results in our history.
Fr   )histtest_promptccontcontinuer   )r3   onecmdr   ry   was_chat_or_renewgetfiler   r{   rR   on_function_callsplitr=   append)r-   r   	hist_fileoutputrU   s       r   r   ChatDBG.onecmd   s-    7>$''%dkk2I#K;).&w~d+'//1#I$6$6$89--II..t<zz|A /  ,,T: . (//1#I$6$6$89--II..t<zz|A /  ,,T: .s   C BE(c                 P   > [         TU ]  [        U5      R                  5       5      $ z=
Override to remove tabs for messages so we can indent them.
)r3   messagestr
expandtabsr-   msgrU   s     r   r   ChatDBG.message   s!     ws3x22455r!   c                 P   > [         TU ]  [        U5      R                  5       5      $ r   )r3   errorr   r   r   s     r   r   ChatDBG.error   s!     w}SX00233r!   c                   > U R                   nU R                  n [        5       U l         [        TU ]  U5        U R                   R                  5       R                  5       n[        U5      nUX l         X0l        $ ! X l         X0l        f = f)z5
Run one Pdb command, but capture and return stdout.
)ry   lastcmdr   r3   r   r{   r   r   )r-   r   ry   r   resultrU   s        r   _capture_onecmdChatDBG._capture_onecmd   sq     ,,	#"*DKGN4 [[))+224F'F K"L !K"Ls   AA: :Bc                    > US S S:X  a  [         TU ]  U5        g US S S:X  a  USS  R                  5       nU R                  U5        g )Nr   !:)r3   defaultr   do_chatr-   r   rU   s     r   r   ChatDBG.default  sG    8s?GOD!BQx3ABx~~'LLr!   c                    > [         [        R                  :w  a1  [        [        R
                  R                  R                  U ]  U5      nU$ r*   )r^   pdbPdbr3   r_   r`   ra   precmdr   s     r   r   ChatDBG.precmd  s5    377"..22D@FDr!   c                 D  >  [         R                  (       a  [        TU ]  U5      $ [	        XR
                  R                  U R                  5      $ ! [         a  nU R                  SU 35         SnAgSnAf[         a  nU R                  SU 35         SnAgSnAff = f)z2
Sandbox for evaluating expressions from the LLM.
zNameError: NzImportError: )r   unsafer3   _getvalr   r   	f_globalsr   	NameErrorr   ImportError)r-   rg   erU   s      r   r   ChatDBG._getval  s    
	$$ws++#C)@)@$BVBVWW 	JJQC() 	JJqc*+	s(   #A )A 
BA44BBBc                 .    Uc*  [        XR                  R                  U R                  5      $ [        XR                  UR                  5      $ !   [
        R                  " 5       SS n[        R                  " U6 S   R                  5       nSU-  s $ = f)zB
Sandbox in case an LLM ever tries to use the display features...
N   z** raised %s **)
r   r   r   r   r   r@   r   r   r   r   )r-   rg   ro   r   errs        r   _getval_exceptChatDBG._getval_except-  s    	+}#C)@)@$BVBVWW#C%..II	+||~bq)H118<R@FFHC$s**s   ,A A ABc                 :    U R                  U R                  5        g)zDhist
Print the history of user-issued commands since the last chat.
N)r   r=   rf   s     r   do_histChatDBG.do_hist;  s     	T]]#r!   c                      U R                  U5      nUR                  S:w  a  [        R                  " X R                  S9  gU R                  S5        g! [         a     gf = f)z.pydoc name
Print the pydoc string for a name.
N)r   zNo documentation is available.)r   __doc__pydocdocry   r   r   )r-   rg   objs      r   do_pydocChatDBG.do_pydocA  sP    	,,s#C{{d"		#kk2=? 		s   ?A A 
A! A!c                 r    XR                  S5      S   /nSnU H.  n [        X@R                  R                  U R                  5      n  O   US:X  a  [
        R                  " U5      nUS:X  a  U R                  SU S35        g[        U[        R                  5      (       d  [        U[        R                  5      (       a  U R                  SU S35        gU R                  [        R                  " U5      5      (       a;  U R                  S[        R                  " U5       S	35        U R                  W5        gU R!                  W5        U R                  S
U S35        g!    GMP  = f! ["         a    e [$         a     g[&         a)    U R!                  W5        U R                  S
U S35         gf = f)zMinfo name
Print the pydoc string (and source code, if available) for a name.
.r   Nz	No name `z"` is visible in the current frame.`z` is a built-in.zSource from file r   zYou MUST assume that `z)` is specified and implemented correctly.)r   evalr   r   r   r   locater   r   typesBuiltinFunctionTypeBuiltinMethodTyperk   inspectr   	do_sourcer   OSErrorr   	Exception)r-   rg   args_to_tryr   xs        r   do_infoChatDBG.do_infoO  s   
(			#r 23KC q--"9"94;O;OPC ! d{ll3' d{y-OPQC!:!:;;zU,,@ @ q%567##GOOC$89901E0FaHIq!a ,QC/XY)*  	 	 	MM!LL(+TU	sB   E. *E%	;E. AE. A$E. >&E. %E+'E. .F6/F65F6c                   ^ U R                   (       d  U R                  S5        g SSKJnJn  SSKJn  U R                  nSnSnUS:  a  UR                  5       R                  U R                  U   S   5      u  pUS:  a6  U" 5       R                  U5      n[        U4S jUR                   5       S5      nUS:w  a  OUS-  nUS:  a  M  US:w  a`  UR                  SS	9n
U
 Vs/ s H  oR                  S:  d  M  UPM     n
n[!        U" 5       R#                  U
S
SS95      R%                  5       nOpUS:X  a
  ['        5       O.['        UR                   Vs/ s H  n[!        U5      PM     sn5      n[)        U5      S:  a  SSR+                  U5       3OSnST U ST S3n U R                  U5        gs  snf s  snf ! [,         a    e [.         a&  nS[1        U5      R2                   SU S3n SnANQSnAff = f)z
slice
Print the backwards slice for a variable used in the current cell but
defined in an earlier cell.  [interactive IPython / Jupyter only]
z2*** `slice` is only supported in Jupyter notebooksNr   )cells
singletons)
statementsc              3   J   >#    U  H  oR                   T:X  d  M  Uv   M     g 7fr*   )rp   ).0r   rg   s     r   	<genexpr>#ChatDBG.do_slice.<locals>.<genexpr>  s     M*;Qvv}qq*;s   #	#r   r   )versionT)blackenformat_typez, only for these symbols: z, r0   z *** No information avaiable for z.  Run the command `p z` to see its value.z!*** Bad frame for call to slice (z: ))rC   r   ipyflowr   r   ipyflow.modelsr   r   flowget_positionr   
at_counternextused_symbols_get_timestamps_for_versioncell_numr   format_multi_slicer   setlenr   r   r   r   __name__)r-   rg   r   r   r   index_xcellpos_time_stampstsr   r   r  definedr   s    `               r   do_sliceChatDBG.do_slice~  s    ""LLMN(	R11MMEBD!)#*77

58I!8LM!8 7--c2DM$*;*;MtTB:
 !) Tz <<R<H,7LKb;;;KrKLL33#Tt 4  &(	  "T\CEsDDUDU3VDUqCFDU3V/W 
 <(1, 1<1H0IJ  <C5	I_`c_ddwx 	V/ M 4W  	 	R8a9I9I8J"QCqQF	RsH   B#F= F= $F3;F3/F= 1#F= F8)7F= 3
F= =G7G22G7c                     U R                  S5        U R                  U R                  5       5        U R                  S5        U R                  S5        U R                  U R                  US5      5        g)zLtest_prompt
[For debugging] Prints the prompts to be sent to the assistant.
zInstructions:zP--------------------------------------------------------------------------------zPrompt:FN)r   _initial_prompt_instructions_build_promptrf   s     r   do_test_promptChatDBG.do_test_prompt  sV     	_%T6689XYT''U34r!   c                    U R                   S   (       ae  UR                  R                  n[        R                  R                  U5      (       a+  [        R                  " U[        R                  5      (       d  gU R                   S   (       aW  XR                  [        U SS5      4;   a  gUR                  R                  nUS:X  a  gU R                  U5      nSU;  a  gUS   $ g)	zH
Given a frame return whether it it should be hidden or not by IPython.
readonlyTtbhideinitial_frameNFrt   r   )_predicatesrl   rm   rK   rL   isfileaccessW_OKr   getattr_get_frame_locals)r-   ro   fnameframe_localss       r   _hidden_predicateChatDBG._hidden_predicate  s    
 J'LL,,E ww~~e$$RYYubgg-F-FH%ot(LMMLL,,E
 
"11%8L",6 344r!   c           	         U R                   R                  nUR                  nUc  U R                  n [	        U5      nUS::  a  [        S5      e Uc  U R                  nOU=(       a    U R                  n Sn[        U R                  U R                  5      U R                  5       H  u  pgU(       a  U R                  (       a  US-  nM$  U(       a)  [        UR                   SU SU S3U R                  S9  SnU R                  XqS9  U(       d  Ml  [!        U R                  US   5        M     U(       a(  [        UR                   SU SU S3U R                  S9  g g ! [        [
        4 a    [        S5      ef = f! ["         a     g f = f)	Nr   z"Context must be a positive integerr   z    [... skipping z hidden frame(s)]
)file)rE   )color_scheme_tableactive_colorsNormalrE   int
ValueError	TypeErrorrJ   ziphidden_framesr   skip_hiddenr   excNamery   print_stack_entryr   KeyboardInterrupt)r-   rE   localsColorsColorsNormalskippedhiddenframe_linenos           r   rz   ChatDBG.print_stack_trace  s   ((66}}?llG	C'lG!| !EFF 
 >&&F1 1 1F	G(+D,>,>tzz,JDJJ(W$d..qLG!>>**<WIEVWcVddfg![[  G&&|&E6 l1o> )X ~~&&8	ARS_R``bc / :& 	CABB	C8 ! 		s%   E  6BE? AE?  E<?
FFc                 (   U R                   n[        5       nX l          U R                  SSS9  UR                  5       nSR	                  S UR                  5        5       5      n[        R                  " S5      SU S3-   nUXl         $ ! Xl         f = f)Nr   F)rE   r@  r2  c              3   R   #    U  H  oR                  5       (       d  M  Uv   M     g 7fr*   )r   )r   r   s     r   r  (ChatDBG._prompt_stack.<locals>.<genexpr>  s      %!:jjl!:s   '	'z                This is the current stack.  The current frame is indicated by 
                an arrow '>' at the start of the line.
                ```z
```)ry   r   rz   r{   r   
splitlinestextwrapdedent)r-   ry   bufferstack_framesr   s        r   _prompt_stackChatDBG._prompt_stack  s    	!""1U";!??,L99 %!-!8!8!:% L  |nE*+   K&Ks   A$B	 	Bc                 8    U R                  5       n[        U5      $ r*   )_supported_functionsr   r-   	functionss     r   r  $ChatDBG._initial_prompt_instructions  s    --/	#I..r!   c                 "    U R                  5       $ r*   )r~   r,   s    r   &_initial_prompt_enchriched_stack_trace.ChatDBG._initial_prompt_enchriched_stack_trace  s    ((**r!   c                     U R                   $ r*   )r>   r,   s    r   _initial_prompt_error_message%ChatDBG._initial_prompt_error_message"      """r!   c                     U R                   $ r*   )r?   r,   s    r   _initial_prompt_error_details%ChatDBG._initial_prompt_error_details%  r\  r!   c                 @    SR                  [        R                  5      $ )N )r   r@   rb   r,   s    r   _initial_prompt_command_line$ChatDBG._initial_prompt_command_line(  s    xx!!r!   c                 >    [         R                  R                  5       $ r*   )r@   rA   get_captured_inputr,   s    r   _initial_prompt_inputChatDBG._initial_prompt_input+  s    yy++--r!   c                 ,    [        U R                  5      $ r*   )r   r=   r,   s    r   _prompt_historyChatDBG._prompt_history.  s    4==!!r!   c           
      (   U(       dc  [        U R                  5       U R                  5       U R                  5       U R	                  5       U R                  5       U R                  5       US9$ [        U R                  5       U R                  5       U5      $ )N	user_text)	r   rW  rZ  r^  rb  rf  ri  r   rO  )r-   rg   
conversings      r   r   ChatDBG._build_prompt1  s    ';;=224224113**,$$&  )$$&(:(:(<c r!   c                    [        5         SU l        U R                  XR                  S:g  5      n[	        U5      n[        U5      nU R                  R                  5          U R                  S:X  a  U R                  5         U R                  R                  X!S9nU R                  US   5        g! [         a<  n[        U5      R                  S5       H  nU R                  U5        M      SnAgSnAff = f)zchat
Send a chat message.
TNrl  r   r2  )r   r   r   r:   r   r   r=   clear_make_assistantqueryr   r
   r   r   r   )r-   rg   full_promptstatsr   r   s         r   r   ChatDBG.do_chatA  s     	!%((oo.EF --k:	!$&$$&OO))+)EELLy)* 	!AT*

4  +	!s   !AB/ /
C592C00C5c                     U R                   S:w  a!  U R                   R                  5         SU l         SU l        U R                  S5        g)zBrenew
End the current chat dialog and prepare to start a new one.
NTzReady to start a new dialog.)r:   rX   r   r   rf   s     r   do_renewChatDBG.do_renewX  s<     ??d"OO!!#"DO!%35r!   c                 r    UR                  5       n[        R                  " U5      nU R                  U5        g)z.
config
Print out the ChatDBG config options.
N)r   r   r5   r   )r-   rg   rS   r   s       r   	do_configChatDBG.do_configb  s+    
 yy{ 66t<Wr!   c                     [         R                  (       a:  U R                  U R                  /nU R                  (       a  XR
                  /-  nU$ / nU$ r*   )r   take_the_wheeldebuginforC   slicerS  s     r   rR  ChatDBG._supported_functionsk  sI    ((TYY/I""jj\)	  Ir!   c                 `   U R                  5       nU R                  5       n[        U[        R                  [        R
                  U[        R                  (       + S[        R                  " U R                  U R                  U R                  U R                  5      U R                  /S9U l        g )Ni    )modelr  rT  streammax_call_response_tokens	listeners)r  rR  r	   r   r  r  	no_streammake_printerry   r7   r8   r9   rR   r:   )r-   instruction_promptrT  s      r   rr  ChatDBG._make_assistantu  s    !>>@--/	# && &&%///%)++KKd.?.?AQAQ 			
r!   c                 F    SU 3nU R                  U5      nU[        USS94$ )a  
{
    "name": "info",
    "description": "Call the `info` function to get the documentation and source code for any variable, function, package, class, method reference, field reference, or dotted reference visible in the current frame.  Examples include: n, e.n where e is an expression, and t.n where t is a type. Unless it is from a common, widely-used library, you MUST call `info` exactly once on any symbol that is referenced in code leading up to the error.",
    "parameters": {
        "type": "object",
        "properties": {
            "value": {
                "type": "string",
                "description": "The reference to get the information for."
            }
        },
        "required": [ "value"  ]
    }
}
zinfo r   top_proportionr   r   )r-   valuecommandr   s       r   r  ChatDBG.info  s2    " %/%%g./qIIIr!   c                 R    US:w  a  UOSnU R                  U5      nU[        USSS94$ )aK  
{
    "name": "debug",
    "description": "Call the `debug` function to run Pdb debugger commands on the stopped program. You may call the `pdb` function to run the following commands: `bt`, `up`, `down`, `p expression`, `list`.  Call `debug` to print any variable value or expression that you believe may contribute to the error.",
    "parameters": {
        "type": "object",
        "properties": {
            "command": {
                "type": "string",
                "description": "The pdb command to run."
            }
        },
        "required": [ "command" ]
    }
}
listlli@  g?)maxlenr  r  )r-   r  cmdr   s       r   r  ChatDBG.debug  s:    " !F*g%%c* /tTWXXXr!   c                 F    SU 3nU R                  U5      nU[        USS94$ )a  
{
    "name": "slice",
    "description": "Call the `slice` function to get the code used to produce the value currently stored a variable.  You MUST call `slice` exactly once on any variable used but not defined in the current frame's code.",
    "parameters": {
        "type": "object",
        "properties": {
            "name": {
                "type": "string",
                "description": "The variable to look at."
            }
        },
        "required": [ "name"  ]
    }
}
zslice g      ?r  r  )r-   rp   r  r   s       r   r  ChatDBG.slice  s2    " 4&/%%g./sKKKr!   )r:   r8   r?   r>   r=   rO   rR   rJ   rC   r9   r   r   r   r   r7   ry   r   r*   )r   N)NN)1r  
__module____qualname____firstlineno__r4   r+   rB   rq   rk   r~   r   r   r   r   boolr   r   r   r   r   r   r   r   r   r   r   r  r!  r/  rz   rO  r  rW  rZ  r^  rb  rf  ri  r   r   rx  r{  rR  rr  r  r  r  __static_attributes____classcell__)rU   s   @r   r   r   H   s    $
L$"> *. }2%;3 ;4 ;864#  +$-^4l5:'R!./+##"." !.6
*J*Y6L Lr!   r   );r   rG   r;   r   r   rK   r   r@   rK  r   ior   pathlibr   r_   r   chatdbg.pdb_util.sandboxr   chatdbg.util.promptsr   r   r   chatdbg.assistant.assistantr	   r
   chatdbg.pdb_util.capturer   r   chatdbg.pdb_util.localsr   chatdbg.util.textr   r   r   r   chatdbg.util.logr   chatdbg.util.historyr   chatdbg.util.exit_messager   r   r    r6   get_ipythonr   !IPython.terminal.interactiveshellr"   r   IPython.terminal.debuggerr#   r^   IPython.core.debuggerr$   r   r   r   r   r    r!   r   <module>r     s     
    	  
      
 1  B @ 0 A . ' / L$ !!#G$Ng788=&L ?+L 233O 	:"E
Ll E
L  	F1#C
DE77Ls$   3C# ?C# C# #D)DD