code-puppy 0.0.120__tar.gz → 0.0.122__tar.gz

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.
Files changed (85) hide show
  1. {code_puppy-0.0.120 → code_puppy-0.0.122}/PKG-INFO +1 -1
  2. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/main.py +6 -2
  3. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/app.py +3 -1
  4. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/components/chat_view.py +12 -12
  5. {code_puppy-0.0.120 → code_puppy-0.0.122}/pyproject.toml +1 -1
  6. {code_puppy-0.0.120 → code_puppy-0.0.122}/.gitignore +0 -0
  7. {code_puppy-0.0.120 → code_puppy-0.0.122}/LICENSE +0 -0
  8. {code_puppy-0.0.120 → code_puppy-0.0.122}/README.md +0 -0
  9. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/__init__.py +0 -0
  10. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/__main__.py +0 -0
  11. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/agent.py +0 -0
  12. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/agent_prompts.py +0 -0
  13. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/callbacks.py +0 -0
  14. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/command_line/__init__.py +0 -0
  15. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/command_line/command_handler.py +0 -0
  16. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/command_line/file_path_completion.py +0 -0
  17. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/command_line/load_context_completion.py +0 -0
  18. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/command_line/meta_command_handler.py +0 -0
  19. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/command_line/model_picker_completion.py +0 -0
  20. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/command_line/motd.py +0 -0
  21. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/command_line/prompt_toolkit_completion.py +0 -0
  22. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/command_line/utils.py +0 -0
  23. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/config.py +0 -0
  24. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/http_utils.py +0 -0
  25. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/message_history_processor.py +0 -0
  26. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/messaging/__init__.py +0 -0
  27. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/messaging/message_queue.py +0 -0
  28. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/messaging/queue_console.py +0 -0
  29. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/messaging/renderers.py +0 -0
  30. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/messaging/spinner/__init__.py +0 -0
  31. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/messaging/spinner/console_spinner.py +0 -0
  32. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/messaging/spinner/spinner_base.py +0 -0
  33. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/messaging/spinner/textual_spinner.py +0 -0
  34. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/model_factory.py +0 -0
  35. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/models.json +0 -0
  36. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/plugins/__init__.py +0 -0
  37. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/reopenable_async_client.py +0 -0
  38. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/state_management.py +0 -0
  39. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/status_display.py +0 -0
  40. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/summarization_agent.py +0 -0
  41. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/token_utils.py +0 -0
  42. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tools/__init__.py +0 -0
  43. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tools/command_runner.py +0 -0
  44. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tools/common.py +0 -0
  45. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tools/file_modifications.py +0 -0
  46. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tools/file_operations.py +0 -0
  47. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tools/token_check.py +0 -0
  48. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tools/tools_content.py +0 -0
  49. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/__init__.py +0 -0
  50. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/components/__init__.py +0 -0
  51. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/components/command_history_modal.py +0 -0
  52. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/components/copy_button.py +0 -0
  53. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/components/custom_widgets.py +0 -0
  54. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/components/input_area.py +0 -0
  55. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/components/sidebar.py +0 -0
  56. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/components/status_bar.py +0 -0
  57. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/messages.py +0 -0
  58. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/models/__init__.py +0 -0
  59. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/models/chat_message.py +0 -0
  60. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/models/command_history.py +0 -0
  61. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/models/enums.py +0 -0
  62. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/screens/__init__.py +0 -0
  63. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/screens/help.py +0 -0
  64. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/screens/settings.py +0 -0
  65. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/screens/tools.py +0 -0
  66. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/__init__.py +0 -0
  67. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_chat_message.py +0 -0
  68. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_chat_view.py +0 -0
  69. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_command_history.py +0 -0
  70. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_copy_button.py +0 -0
  71. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_custom_widgets.py +0 -0
  72. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_disclaimer.py +0 -0
  73. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_enums.py +0 -0
  74. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_file_browser.py +0 -0
  75. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_help.py +0 -0
  76. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_history_file_reader.py +0 -0
  77. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_input_area.py +0 -0
  78. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_settings.py +0 -0
  79. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_sidebar.py +0 -0
  80. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_sidebar_history.py +0 -0
  81. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_sidebar_history_navigation.py +0 -0
  82. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_status_bar.py +0 -0
  83. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_timestamped_history.py +0 -0
  84. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/tui/tests/test_tools.py +0 -0
  85. {code_puppy-0.0.120 → code_puppy-0.0.122}/code_puppy/version_checker.py +0 -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
@@ -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())
@@ -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;
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "code-puppy"
7
- version = "0.0.120"
7
+ version = "0.0.122"
8
8
  description = "Code generation agent"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes
File without changes