code-puppy 0.0.191__py3-none-any.whl → 0.0.193__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/agents/base_agent.py +2 -2
- code_puppy/command_line/prompt_toolkit_completion.py +3 -5
- code_puppy/model_factory.py +6 -6
- {code_puppy-0.0.191.dist-info → code_puppy-0.0.193.dist-info}/METADATA +2 -2
- {code_puppy-0.0.191.dist-info → code_puppy-0.0.193.dist-info}/RECORD +9 -9
- {code_puppy-0.0.191.data → code_puppy-0.0.193.data}/data/code_puppy/models.json +0 -0
- {code_puppy-0.0.191.dist-info → code_puppy-0.0.193.dist-info}/WHEEL +0 -0
- {code_puppy-0.0.191.dist-info → code_puppy-0.0.193.dist-info}/entry_points.txt +0 -0
- {code_puppy-0.0.191.dist-info → code_puppy-0.0.193.dist-info}/licenses/LICENSE +0 -0
code_puppy/agents/base_agent.py
CHANGED
@@ -22,7 +22,7 @@ from pydantic_ai.messages import (
|
|
22
22
|
ToolReturn,
|
23
23
|
ToolReturnPart,
|
24
24
|
)
|
25
|
-
from pydantic_ai.models.openai import
|
25
|
+
from pydantic_ai.models.openai import OpenAIChatModelSettings
|
26
26
|
from pydantic_ai.settings import ModelSettings
|
27
27
|
|
28
28
|
# Consolidated relative imports
|
@@ -835,7 +835,7 @@ class BaseAgent(ABC):
|
|
835
835
|
get_openai_reasoning_effort()
|
836
836
|
)
|
837
837
|
model_settings_dict["extra_body"] = {"verbosity": "low"}
|
838
|
-
model_settings =
|
838
|
+
model_settings = OpenAIChatModelSettings(**model_settings_dict)
|
839
839
|
|
840
840
|
self.cur_model = model
|
841
841
|
p_agent = PydanticAgent(
|
@@ -14,6 +14,7 @@ from prompt_toolkit import PromptSession
|
|
14
14
|
from prompt_toolkit.completion import Completer, Completion, merge_completers
|
15
15
|
from prompt_toolkit.formatted_text import FormattedText
|
16
16
|
from prompt_toolkit.history import FileHistory
|
17
|
+
from prompt_toolkit.filters import is_searching
|
17
18
|
from prompt_toolkit.key_binding import KeyBindings
|
18
19
|
from prompt_toolkit.keys import Keys
|
19
20
|
from prompt_toolkit.styles import Style
|
@@ -207,12 +208,9 @@ async def get_input_with_combined_completion(
|
|
207
208
|
event.app.current_buffer.insert_text("\n")
|
208
209
|
|
209
210
|
# Override the default enter behavior to check for shift
|
210
|
-
@bindings.add("enter")
|
211
|
+
@bindings.add("enter", filter=~is_searching)
|
211
212
|
def _(event):
|
212
|
-
"""Accept input
|
213
|
-
# Check if shift is pressed - this comes from key press event data
|
214
|
-
# Using a key sequence like Alt+Enter is more reliable than detecting shift
|
215
|
-
# So we'll use the default behavior for Enter
|
213
|
+
"""Accept input only when we're not in an interactive search buffer."""
|
216
214
|
event.current_buffer.validate_and_handle()
|
217
215
|
|
218
216
|
@bindings.add(Keys.Escape)
|
code_puppy/model_factory.py
CHANGED
@@ -8,11 +8,11 @@ import httpx
|
|
8
8
|
from anthropic import AsyncAnthropic
|
9
9
|
from openai import AsyncAzureOpenAI
|
10
10
|
from pydantic_ai.models.anthropic import AnthropicModel
|
11
|
-
from pydantic_ai.models.
|
11
|
+
from pydantic_ai.models.google import GoogleModel
|
12
12
|
from pydantic_ai.models.openai import OpenAIChatModel
|
13
13
|
from pydantic_ai.providers.anthropic import AnthropicProvider
|
14
14
|
from pydantic_ai.providers.cerebras import CerebrasProvider
|
15
|
-
from pydantic_ai.providers.
|
15
|
+
from pydantic_ai.providers.google import GoogleProvider
|
16
16
|
from pydantic_ai.providers.openai import OpenAIProvider
|
17
17
|
from pydantic_ai.providers.openrouter import OpenRouterProvider
|
18
18
|
|
@@ -142,9 +142,9 @@ class ModelFactory:
|
|
142
142
|
model_type = model_config.get("type")
|
143
143
|
|
144
144
|
if model_type == "gemini":
|
145
|
-
provider =
|
145
|
+
provider = GoogleProvider(api_key=os.environ.get("GEMINI_API_KEY", ""))
|
146
146
|
|
147
|
-
model =
|
147
|
+
model = GoogleModel(model_name=model_config["name"], provider=provider)
|
148
148
|
setattr(model, "provider", provider)
|
149
149
|
return model
|
150
150
|
|
@@ -266,7 +266,7 @@ class ModelFactory:
|
|
266
266
|
url, headers, verify, api_key = get_custom_config(model_config)
|
267
267
|
os.environ["GEMINI_API_KEY"] = api_key
|
268
268
|
|
269
|
-
class CustomGoogleGLAProvider(
|
269
|
+
class CustomGoogleGLAProvider(GoogleProvider):
|
270
270
|
def __init__(self, *args, **kwargs):
|
271
271
|
super().__init__(*args, **kwargs)
|
272
272
|
|
@@ -281,7 +281,7 @@ class ModelFactory:
|
|
281
281
|
return _client
|
282
282
|
|
283
283
|
google_gla = CustomGoogleGLAProvider(api_key=api_key)
|
284
|
-
model =
|
284
|
+
model = GoogleModel(model_name=model_config["name"], provider=google_gla)
|
285
285
|
return model
|
286
286
|
elif model_type == "cerebras":
|
287
287
|
url, headers, verify, api_key = get_custom_config(model_config)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: code-puppy
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.193
|
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 @@ Requires-Dist: openai>=1.99.1
|
|
26
26
|
Requires-Dist: pathspec>=0.11.0
|
27
27
|
Requires-Dist: playwright>=1.40.0
|
28
28
|
Requires-Dist: prompt-toolkit>=3.0.38
|
29
|
-
Requires-Dist: pydantic-ai
|
29
|
+
Requires-Dist: pydantic-ai==1.0.6
|
30
30
|
Requires-Dist: pydantic>=2.4.0
|
31
31
|
Requires-Dist: pyjwt>=2.8.0
|
32
32
|
Requires-Dist: pytest-cov>=6.1.1
|
@@ -4,7 +4,7 @@ code_puppy/callbacks.py,sha256=ukSgVFaEO68o6J09qFwDrnmNanrVv3toTLQhS504Meo,6162
|
|
4
4
|
code_puppy/config.py,sha256=xAFt2_8z_YrDrq8j-hATgj0ZCEZ9QPu206uJ5-F8FP0,21522
|
5
5
|
code_puppy/http_utils.py,sha256=YLd8Y16idbI32JGeBXG8n5rT4o4X_zxk9FgUvK9XFo8,8248
|
6
6
|
code_puppy/main.py,sha256=PATGAZLxigQ1kp6UIsWgzPTmYHO6EbgaJa6f7OXgWrk,21667
|
7
|
-
code_puppy/model_factory.py,sha256=
|
7
|
+
code_puppy/model_factory.py,sha256=ZbIAJWMNKNdTCEMQK8Ig6TDDZlVNyGO9hOLHoLLPMYw,15397
|
8
8
|
code_puppy/models.json,sha256=dClUciCo2RlVDs0ZAQCIur8MOavZUEAXHEecn0uPa-4,1629
|
9
9
|
code_puppy/reopenable_async_client.py,sha256=4UJRaMp5np8cbef9F0zKQ7TPKOfyf5U-Kv-0zYUWDho,8274
|
10
10
|
code_puppy/round_robin_model.py,sha256=UEfw-Ix7GpNRWSxxuJtA-EE4_A46KXjMgFRciprfLmg,5634
|
@@ -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=
|
29
|
+
code_puppy/agents/base_agent.py,sha256=rJm0xA9kLT_NU9MSZIrN-Z_T5O4Q-QuUmQM8paGZKHQ,39066
|
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=i5VR_d8OErBLV8IFvkFkS0m34Xy2Pe0BH5G1wBrkOSQ,31016
|
@@ -34,7 +34,7 @@ code_puppy/command_line/file_path_completion.py,sha256=gw8NpIxa6GOpczUJRyh7VNZwo
|
|
34
34
|
code_puppy/command_line/load_context_completion.py,sha256=6eZxV6Bs-EFwZjN93V8ZDZUC-6RaWxvtZk-04Wtikyw,2240
|
35
35
|
code_puppy/command_line/model_picker_completion.py,sha256=vYNCZS1QWu6fxF__hTwpc7jwH7h_48wUxrnITawc83E,4140
|
36
36
|
code_puppy/command_line/motd.py,sha256=PEdkp3ZnydVfvd7mNJylm8YyFNUKg9jmY6uwkA1em8c,2152
|
37
|
-
code_puppy/command_line/prompt_toolkit_completion.py,sha256=
|
37
|
+
code_puppy/command_line/prompt_toolkit_completion.py,sha256=NbagxHj950ADRncqXuVM8gAwqdrfKeGfC0x6-IhrsXM,9860
|
38
38
|
code_puppy/command_line/utils.py,sha256=7eyxDHjPjPB9wGDJQQcXV_zOsGdYsFgI0SGCetVmTqE,1251
|
39
39
|
code_puppy/command_line/mcp/__init__.py,sha256=0-OQuwjq_pLiTVJ1_NrirVwdRerghyKs_MTZkwPC7YY,315
|
40
40
|
code_puppy/command_line/mcp/add_command.py,sha256=lZ09RpFDIeghX1zhc2YIAqBASs5Ra52x5YAasUKvqJg,6409
|
@@ -120,9 +120,9 @@ code_puppy/tui/screens/help.py,sha256=eJuPaOOCp7ZSUlecearqsuX6caxWv7NQszUh0tZJjB
|
|
120
120
|
code_puppy/tui/screens/mcp_install_wizard.py,sha256=vObpQwLbXjQsxmSg-WCasoev1usEi0pollKnL0SHu9U,27693
|
121
121
|
code_puppy/tui/screens/settings.py,sha256=-WLldnKyWVKUYVPJcfOn1UU6eP9t8lLPUAVI317SOOM,10685
|
122
122
|
code_puppy/tui/screens/tools.py,sha256=3pr2Xkpa9Js6Yhf1A3_wQVRzFOui-KDB82LwrsdBtyk,1715
|
123
|
-
code_puppy-0.0.
|
124
|
-
code_puppy-0.0.
|
125
|
-
code_puppy-0.0.
|
126
|
-
code_puppy-0.0.
|
127
|
-
code_puppy-0.0.
|
128
|
-
code_puppy-0.0.
|
123
|
+
code_puppy-0.0.193.data/data/code_puppy/models.json,sha256=dClUciCo2RlVDs0ZAQCIur8MOavZUEAXHEecn0uPa-4,1629
|
124
|
+
code_puppy-0.0.193.dist-info/METADATA,sha256=uKQ_g5EjsbSu7vZ9B9haZPieh9t7IDN0-ESzvE_cNaM,19987
|
125
|
+
code_puppy-0.0.193.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
126
|
+
code_puppy-0.0.193.dist-info/entry_points.txt,sha256=Tp4eQC99WY3HOKd3sdvb22vZODRq0XkZVNpXOag_KdI,91
|
127
|
+
code_puppy-0.0.193.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
|
128
|
+
code_puppy-0.0.193.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|