code-puppy 0.0.121__py3-none-any.whl → 0.0.122__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
code_puppy/main.py CHANGED
@@ -28,7 +28,7 @@ from code_puppy.message_history_processor import (
28
28
  message_history_accumulator,
29
29
  prune_interrupted_tool_calls,
30
30
  )
31
- from code_puppy.state_management import is_tui_mode, set_tui_mode
31
+ from code_puppy.state_management import is_tui_mode, set_tui_mode, set_message_history
32
32
  from code_puppy.tools.common import console
33
33
  from code_puppy.version_checker import default_version_mismatch_behavior
34
34
 
@@ -320,6 +320,8 @@ async def interactive_mode(message_renderer, initial_command: str = None) -> Non
320
320
  response = await agent.run(
321
321
  initial_command, usage_limits=get_custom_usage_limits()
322
322
  )
323
+ finally:
324
+ set_message_history(prune_interrupted_tool_calls(get_message_history()))
323
325
 
324
326
  agent_response = response.output
325
327
 
@@ -328,7 +330,7 @@ async def interactive_mode(message_renderer, initial_command: str = None) -> Non
328
330
  )
329
331
  new_msgs = response.all_messages()
330
332
  message_history_accumulator(new_msgs)
331
-
333
+ set_message_history(prune_interrupted_tool_calls(get_message_history()))
332
334
  emit_system_message("\n" + "=" * 50)
333
335
  emit_info("[bold green]🐶 Continuing in Interactive Mode[/bold green]")
334
336
  emit_system_message(
@@ -463,6 +465,8 @@ async def interactive_mode(message_renderer, initial_command: str = None) -> Non
463
465
  message_history=get_message_history(),
464
466
  usage_limits=get_custom_usage_limits(),
465
467
  )
468
+ finally:
469
+ set_message_history(prune_interrupted_tool_calls(get_message_history()))
466
470
 
467
471
  # Create the task
468
472
  agent_task = asyncio.create_task(run_agent_task())
code_puppy/tui/app.py CHANGED
@@ -27,7 +27,7 @@ from code_puppy.message_history_processor import (
27
27
 
28
28
  # Import our message queue system
29
29
  from code_puppy.messaging import TUIRenderer, get_global_queue
30
- from code_puppy.state_management import clear_message_history, get_message_history
30
+ from code_puppy.state_management import clear_message_history, get_message_history, set_message_history
31
31
  from code_puppy.tui.components import (
32
32
  ChatView,
33
33
  CustomTextArea,
@@ -498,6 +498,8 @@ class CodePuppyTUI(App):
498
498
  else:
499
499
  # Handle regular exceptions
500
500
  self.add_error_message(f"MCP/Agent error: {str(eg)}")
501
+ finally:
502
+ set_message_history(prune_interrupted_tool_calls(get_message_history()))
501
503
  except Exception as agent_error:
502
504
  # Handle any other errors in agent processing
503
505
  self.add_error_message(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-puppy
3
- Version: 0.0.121
3
+ Version: 0.0.122
4
4
  Summary: Code generation agent
5
5
  Author: Michael Pfaffenberger
6
6
  License: MIT
@@ -5,7 +5,7 @@ code_puppy/agent_prompts.py,sha256=pBDC5zsWozEiFHmoOS6CnxortMvN8VZqnUEHM8sx8Ug,6
5
5
  code_puppy/callbacks.py,sha256=AOm39_w7vvMlPXzALoRIYRlhvjZjIiAAouPbbWDdj78,4420
6
6
  code_puppy/config.py,sha256=FPyhds_nJ_olG7knP5EhHH3qG9qg14WYIOveosCcVEc,13345
7
7
  code_puppy/http_utils.py,sha256=zN0_F8cq4agamL3GRRLLhgEjBgjKtWrgGe8thORC7YE,3434
8
- code_puppy/main.py,sha256=T1nBn7Y2gTFEonPQ6akpA3HtDesgkMcNtIVxnWAxdHc,26809
8
+ code_puppy/main.py,sha256=awLuvGCeX8JuMFJjLOYhl95JXQMZ3TC2HIEk_vpfJIA,27174
9
9
  code_puppy/message_history_processor.py,sha256=wEKZ2AsuMPt2biqTd-bMfG9tIoFoIYzvEt_65qTl3gU,14461
10
10
  code_puppy/model_factory.py,sha256=cqYpDAtUcFU4iB0PFSA_nLbuXv4cWFB59BE5-1nZqXI,10202
11
11
  code_puppy/models.json,sha256=jr0-LW87aJS79GosVwoZdHeeq5eflPzgdPoMbcqpVA8,2728
@@ -41,7 +41,7 @@ code_puppy/tools/file_operations.py,sha256=7nSueKqlJcnlnBg7zXkX7EWiOJX8i3NNWGE7Q
41
41
  code_puppy/tools/token_check.py,sha256=cNrGOOKahXsnWsvh5xnMkL1NS9FjYur9QIRZGQFW-pE,1189
42
42
  code_puppy/tools/tools_content.py,sha256=pi9ig2qahZFkUj7gBBN2TX2QldvwnqmTHrRKP8my_2k,2209
43
43
  code_puppy/tui/__init__.py,sha256=XesAxIn32zLPOmvpR2wIDxDAnnJr81a5pBJB4cZp1Xs,321
44
- code_puppy/tui/app.py,sha256=lBjnNLAcpJwRzYs8w8jqj5y1THyctCLtBHYGRhzKuRM,43057
44
+ code_puppy/tui/app.py,sha256=zKToIrL3SyB9-EeYpijxAPaLsB9GgJisj8DRjT5v1Zo,43204
45
45
  code_puppy/tui/messages.py,sha256=zQoToWI0eWdT36NEsY6RdCFzcDfAmfvoPlHv8jiCbgo,720
46
46
  code_puppy/tui/components/__init__.py,sha256=uj5pnk3s6SEN3SbFI0ZnzaA2KK1NNg8TfUj6U-Z732U,455
47
47
  code_puppy/tui/components/chat_view.py,sha256=u6yFqz7sz5RYxVpobnAHXDfDeIDRwDnXXTBwBl5Wn7M,17995
@@ -78,9 +78,9 @@ code_puppy/tui/tests/test_sidebar_history_navigation.py,sha256=JGiyua8A2B8dLfwiE
78
78
  code_puppy/tui/tests/test_status_bar.py,sha256=nYT_FZGdmqnnbn6o0ZuOkLtNUtJzLSmtX8P72liQ5Vo,1797
79
79
  code_puppy/tui/tests/test_timestamped_history.py,sha256=nVXt9hExZZ_8MFP-AZj4L4bB_1Eo_mc-ZhVICzTuw3I,1799
80
80
  code_puppy/tui/tests/test_tools.py,sha256=kgzzAkK4r0DPzQwHHD4cePpVNgrHor6cFr05Pg6DBWg,2687
81
- code_puppy-0.0.121.data/data/code_puppy/models.json,sha256=jr0-LW87aJS79GosVwoZdHeeq5eflPzgdPoMbcqpVA8,2728
82
- code_puppy-0.0.121.dist-info/METADATA,sha256=nx60hBpbjqQo6faKi_ypVf08JtE2MzaQqMhltoO5kZ0,6537
83
- code_puppy-0.0.121.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
84
- code_puppy-0.0.121.dist-info/entry_points.txt,sha256=d8YkBvIUxF-dHNJAj-x4fPEqizbY5d_TwvYpc01U5kw,58
85
- code_puppy-0.0.121.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
86
- code_puppy-0.0.121.dist-info/RECORD,,
81
+ code_puppy-0.0.122.data/data/code_puppy/models.json,sha256=jr0-LW87aJS79GosVwoZdHeeq5eflPzgdPoMbcqpVA8,2728
82
+ code_puppy-0.0.122.dist-info/METADATA,sha256=lDnpy3zaF0ePq78sE2rD0k7lVo5k2ufFtfCJiC3KqH4,6537
83
+ code_puppy-0.0.122.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
84
+ code_puppy-0.0.122.dist-info/entry_points.txt,sha256=d8YkBvIUxF-dHNJAj-x4fPEqizbY5d_TwvYpc01U5kw,58
85
+ code_puppy-0.0.122.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
86
+ code_puppy-0.0.122.dist-info/RECORD,,