code-puppy 0.0.120__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(
@@ -30,7 +30,7 @@ class ChatView(VerticalScroll):
30
30
  }
31
31
 
32
32
  .user-message {
33
- background: #1e3a8a;
33
+ background: transparent;
34
34
  color: #ffffff;
35
35
  margin: 0 0 1 0;
36
36
  margin-top: 0;
@@ -41,7 +41,7 @@ class ChatView(VerticalScroll):
41
41
  }
42
42
 
43
43
  .agent-message {
44
- background: #374151;
44
+ background: transparent;
45
45
  color: #f3f4f6;
46
46
  margin: 0 0 1 0;
47
47
  margin-top: 0;
@@ -52,7 +52,7 @@ class ChatView(VerticalScroll):
52
52
  }
53
53
 
54
54
  .system-message {
55
- background: #1f2937;
55
+ background: transparent;
56
56
  color: #d1d5db;
57
57
  margin: 0 0 1 0;
58
58
  margin-top: 0;
@@ -64,7 +64,7 @@ class ChatView(VerticalScroll):
64
64
  }
65
65
 
66
66
  .error-message {
67
- background: #7f1d1d;
67
+ background: transparent;
68
68
  color: #fef2f2;
69
69
  margin: 0 0 1 0;
70
70
  margin-top: 0;
@@ -75,7 +75,7 @@ class ChatView(VerticalScroll):
75
75
  }
76
76
 
77
77
  .agent_reasoning-message {
78
- background: #1f2937;
78
+ background: transparent;
79
79
  color: #f3e8ff;
80
80
  margin: 0 0 1 0;
81
81
  margin-top: 0;
@@ -87,7 +87,7 @@ class ChatView(VerticalScroll):
87
87
  }
88
88
 
89
89
  .planned_next_steps-message {
90
- background: #1f2937;
90
+ background: transparent;
91
91
  color: #f3e8ff;
92
92
  margin: 0 0 1 0;
93
93
  margin-top: 0;
@@ -99,7 +99,7 @@ class ChatView(VerticalScroll):
99
99
  }
100
100
 
101
101
  .agent_response-message {
102
- background: #1f2937;
102
+ background: transparent;
103
103
  color: #f3e8ff;
104
104
  margin: 0 0 1 0;
105
105
  margin-top: 0;
@@ -110,7 +110,7 @@ class ChatView(VerticalScroll):
110
110
  }
111
111
 
112
112
  .info-message {
113
- background: #065f46;
113
+ background: transparent;
114
114
  color: #d1fae5;
115
115
  margin: 0 0 1 0;
116
116
  margin-top: 0;
@@ -121,7 +121,7 @@ class ChatView(VerticalScroll):
121
121
  }
122
122
 
123
123
  .success-message {
124
- background: #064e3b;
124
+ background: #0d9488;
125
125
  color: #d1fae5;
126
126
  margin: 0 0 1 0;
127
127
  margin-top: 0;
@@ -132,7 +132,7 @@ class ChatView(VerticalScroll):
132
132
  }
133
133
 
134
134
  .warning-message {
135
- background: #92400e;
135
+ background: #d97706;
136
136
  color: #fef3c7;
137
137
  margin: 0 0 1 0;
138
138
  margin-top: 0;
@@ -143,7 +143,7 @@ class ChatView(VerticalScroll):
143
143
  }
144
144
 
145
145
  .tool_output-message {
146
- background: #1e40af;
146
+ background: #5b21b6;
147
147
  color: #dbeafe;
148
148
  margin: 0 0 1 0;
149
149
  margin-top: 0;
@@ -154,7 +154,7 @@ class ChatView(VerticalScroll):
154
154
  }
155
155
 
156
156
  .command_output-message {
157
- background: #7c2d12;
157
+ background: #9a3412;
158
158
  color: #fed7aa;
159
159
  margin: 0 0 1 0;
160
160
  margin-top: 0;
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-puppy
3
- Version: 0.0.120
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,10 +41,10 @@ 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
- code_puppy/tui/components/chat_view.py,sha256=L79D_N90UH-SITFxaySnlRK7ciXQ7w1LOBLMVUDQbNA,17963
47
+ code_puppy/tui/components/chat_view.py,sha256=u6yFqz7sz5RYxVpobnAHXDfDeIDRwDnXXTBwBl5Wn7M,17995
48
48
  code_puppy/tui/components/command_history_modal.py,sha256=pUPEQvoCWa2iUnuMgNwO22y8eUbyw0HpcPH3wAosHvU,7097
49
49
  code_puppy/tui/components/copy_button.py,sha256=E4-OJYk5YNzDf-E81NyiVGKsTRPrUX-RnQ8qFuVnabw,4375
50
50
  code_puppy/tui/components/custom_widgets.py,sha256=pnjkB3ZNa5lwSrAXUFlhN9AHNh4uMTpSap8AdbpecKw,1986
@@ -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.120.data/data/code_puppy/models.json,sha256=jr0-LW87aJS79GosVwoZdHeeq5eflPzgdPoMbcqpVA8,2728
82
- code_puppy-0.0.120.dist-info/METADATA,sha256=g1_tvSCvW26oEstJC0p_fc9dGjlHy6QA4MFCWIn3B-g,6537
83
- code_puppy-0.0.120.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
84
- code_puppy-0.0.120.dist-info/entry_points.txt,sha256=d8YkBvIUxF-dHNJAj-x4fPEqizbY5d_TwvYpc01U5kw,58
85
- code_puppy-0.0.120.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
86
- code_puppy-0.0.120.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,,