code-puppy 0.0.181__py3-none-any.whl → 0.0.183__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.
@@ -33,7 +33,7 @@ from code_puppy.config import (
33
33
  get_global_model_name,
34
34
  get_protected_token_count,
35
35
  get_value,
36
- load_mcp_server_configs,
36
+ load_mcp_server_configs, get_message_limit,
37
37
  )
38
38
  from code_puppy.mcp_ import ServerConfig, get_mcp_manager
39
39
  from code_puppy.messaging import (
@@ -806,7 +806,7 @@ class BaseAgent(ABC):
806
806
  self.message_history_processor(ctx, _message_history)
807
807
  return self.get_message_history()
808
808
 
809
- async def run_with_mcp(self, prompt: str, usage_limits=None, **kwargs) -> Any:
809
+ async def run_with_mcp(self, prompt: str, **kwargs) -> Any:
810
810
  """
811
811
  Run the agent with MCP servers and full cancellation support.
812
812
 
@@ -832,6 +832,7 @@ class BaseAgent(ABC):
832
832
  self.set_message_history(
833
833
  self.prune_interrupted_tool_calls(self.get_message_history())
834
834
  )
835
+ usage_limits = pydantic_ai.agent._usage.UsageLimits(request_limit=get_message_limit())
835
836
  result_ = await pydantic_agent.run(
836
837
  prompt,
837
838
  message_history=self.get_message_history(),
code_puppy/tui/app.py CHANGED
@@ -623,8 +623,13 @@ class CodePuppyTUI(App):
623
623
  if result.get("model_changed"):
624
624
  new_model = get_global_model_name()
625
625
  self.current_model = new_model
626
- # Reinitialize agent with new model
627
- self.agent_manager.reload_agent()
626
+ try:
627
+ current_agent = get_current_agent()
628
+ current_agent.reload_code_generation_agent()
629
+ except Exception as reload_error:
630
+ self.add_error_message(
631
+ f"Failed to reload agent after model change: {reload_error}"
632
+ )
628
633
 
629
634
  # Update status bar
630
635
  status_bar = self.query_one(StatusBar)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: code-puppy
3
- Version: 0.0.181
3
+ Version: 0.0.183
4
4
  Summary: Code generation agent
5
5
  Project-URL: repository, https://github.com/mpfaffenberger/code_puppy
6
6
  Project-URL: HomePage, https://github.com/mpfaffenberger/code_puppy
@@ -26,7 +26,7 @@ code_puppy/agents/agent_qa_expert.py,sha256=wCGXzuAVElT5c-QigQVb8JX9Gw0JmViCUQQn
26
26
  code_puppy/agents/agent_qa_kitten.py,sha256=5PeFFSwCFlTUvP6h5bGntx0xv5NmRwBiw0HnMqY8nLI,9107
27
27
  code_puppy/agents/agent_security_auditor.py,sha256=ADafi2x4gqXw6m-Nch5vjiKjO0Urcbj0x4zxHti3gDw,3712
28
28
  code_puppy/agents/agent_typescript_reviewer.py,sha256=EDY1mFkVpuJ1BPXsJFu2wQ2pfAV-90ipc_8w9ymrKPg,4054
29
- code_puppy/agents/base_agent.py,sha256=MFyC4YSxlQ1xzQRBnSXgtyO7XPpHZuSJVzRATU8j7J0,36992
29
+ code_puppy/agents/base_agent.py,sha256=nliq_Ma4dtP3-IgCkBYMFI8IPY8AnFJLiygzTSs8gU8,37095
30
30
  code_puppy/agents/json_agent.py,sha256=KPS1q-Rr3b5ekem4i3wtu8eLJRDd5nSPiZ8duJ_tn0U,4630
31
31
  code_puppy/command_line/__init__.py,sha256=y7WeRemfYppk8KVbCGeAIiTuiOszIURCDjOMZv_YRmU,45
32
32
  code_puppy/command_line/command_handler.py,sha256=JeJo6kc9-4B7S0_pbMp1LO7jtAT6XMXtSSnOShfoG-Y,27237
@@ -99,7 +99,7 @@ code_puppy/tools/browser/browser_workflows.py,sha256=jplJ1T60W3G4-dhVJX-CXkm9ssk
99
99
  code_puppy/tools/browser/camoufox_manager.py,sha256=RYvLcs0iAoVNtpLjrrA1uu6a5k9tAdBbmhWFGSWjX_A,6106
100
100
  code_puppy/tools/browser/vqa_agent.py,sha256=0GMDgJAK728rIuSQxAVytFSNagjo0LCjCUxBTm3w9Po,1952
101
101
  code_puppy/tui/__init__.py,sha256=XesAxIn32zLPOmvpR2wIDxDAnnJr81a5pBJB4cZp1Xs,321
102
- code_puppy/tui/app.py,sha256=fiOKrhtYBpruUPM-aqnsDmEiOM_dCbD5DnBRKO219NI,37985
102
+ code_puppy/tui/app.py,sha256=t9HAmf58_0Qo-MMosvMWBfRurbhJIcEpgMBsUc52v38,38246
103
103
  code_puppy/tui/messages.py,sha256=zQoToWI0eWdT36NEsY6RdCFzcDfAmfvoPlHv8jiCbgo,720
104
104
  code_puppy/tui/components/__init__.py,sha256=uj5pnk3s6SEN3SbFI0ZnzaA2KK1NNg8TfUj6U-Z732U,455
105
105
  code_puppy/tui/components/chat_view.py,sha256=Ff6uM6J0yENISNAOYroX7F-JL73_ajUUcP5IZSf2mng,19914
@@ -119,9 +119,9 @@ code_puppy/tui/screens/help.py,sha256=eJuPaOOCp7ZSUlecearqsuX6caxWv7NQszUh0tZJjB
119
119
  code_puppy/tui/screens/mcp_install_wizard.py,sha256=vObpQwLbXjQsxmSg-WCasoev1usEi0pollKnL0SHu9U,27693
120
120
  code_puppy/tui/screens/settings.py,sha256=-WLldnKyWVKUYVPJcfOn1UU6eP9t8lLPUAVI317SOOM,10685
121
121
  code_puppy/tui/screens/tools.py,sha256=3pr2Xkpa9Js6Yhf1A3_wQVRzFOui-KDB82LwrsdBtyk,1715
122
- code_puppy-0.0.181.data/data/code_puppy/models.json,sha256=iXmLZGflnQcu2DRh4WUlgAhoXdvoxUc7KBhB8YxawXM,3088
123
- code_puppy-0.0.181.dist-info/METADATA,sha256=jkFxxImM8ni27Bx1McNuJx_0GzxHBfypSepujFjbWro,20079
124
- code_puppy-0.0.181.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
125
- code_puppy-0.0.181.dist-info/entry_points.txt,sha256=Tp4eQC99WY3HOKd3sdvb22vZODRq0XkZVNpXOag_KdI,91
126
- code_puppy-0.0.181.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
127
- code_puppy-0.0.181.dist-info/RECORD,,
122
+ code_puppy-0.0.183.data/data/code_puppy/models.json,sha256=iXmLZGflnQcu2DRh4WUlgAhoXdvoxUc7KBhB8YxawXM,3088
123
+ code_puppy-0.0.183.dist-info/METADATA,sha256=wKV7DzzS4llIHiCTzL0P6cTEK_KH-HBnoaxwMbc5sqY,20079
124
+ code_puppy-0.0.183.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
125
+ code_puppy-0.0.183.dist-info/entry_points.txt,sha256=Tp4eQC99WY3HOKd3sdvb22vZODRq0XkZVNpXOag_KdI,91
126
+ code_puppy-0.0.183.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
127
+ code_puppy-0.0.183.dist-info/RECORD,,