code-puppy 0.0.41__py3-none-any.whl → 0.0.43__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/agent.py +2 -2
- code_puppy/command_line/prompt_toolkit_completion.py +10 -1
- {code_puppy-0.0.41.dist-info → code_puppy-0.0.43.dist-info}/METADATA +1 -1
- {code_puppy-0.0.41.dist-info → code_puppy-0.0.43.dist-info}/RECORD +8 -8
- {code_puppy-0.0.41.data → code_puppy-0.0.43.data}/data/code_puppy/models.json +0 -0
- {code_puppy-0.0.41.dist-info → code_puppy-0.0.43.dist-info}/WHEEL +0 -0
- {code_puppy-0.0.41.dist-info → code_puppy-0.0.43.dist-info}/entry_points.txt +0 -0
- {code_puppy-0.0.41.dist-info → code_puppy-0.0.43.dist-info}/licenses/LICENSE +0 -0
    
        code_puppy/agent.py
    CHANGED
    
    | @@ -50,7 +50,7 @@ def session_memory(): | |
| 50 50 | 
             
            def reload_code_generation_agent():
         | 
| 51 51 | 
             
                """Force-reload the agent, usually after a model change."""
         | 
| 52 52 | 
             
                global _code_generation_agent, _LAST_MODEL_NAME
         | 
| 53 | 
            -
                model_name = os.environ.get("MODEL_NAME", "gpt- | 
| 53 | 
            +
                model_name = os.environ.get("MODEL_NAME", "gpt-4.1")
         | 
| 54 54 | 
             
                console.print(f'[bold cyan]Loading Model: {model_name}[/bold cyan]')
         | 
| 55 55 | 
             
                models_path = Path(MODELS_JSON_PATH) if MODELS_JSON_PATH else Path(__file__).parent / "models.json"
         | 
| 56 56 | 
             
                model = ModelFactory.get_model(model_name, ModelFactory.load_config(models_path))
         | 
| @@ -79,7 +79,7 @@ def get_code_generation_agent(force_reload=False): | |
| 79 79 | 
             
                Forces a reload if the model has changed, or if force_reload is passed.
         | 
| 80 80 | 
             
                """
         | 
| 81 81 | 
             
                global _code_generation_agent, _LAST_MODEL_NAME
         | 
| 82 | 
            -
                model_name = os.environ.get("MODEL_NAME", "gpt- | 
| 82 | 
            +
                model_name = os.environ.get("MODEL_NAME", "gpt-4.1")
         | 
| 83 83 | 
             
                if _code_generation_agent is None or _LAST_MODEL_NAME != model_name or force_reload:
         | 
| 84 84 | 
             
                    return reload_code_generation_agent()
         | 
| 85 85 | 
             
                return _code_generation_agent
         | 
| @@ -15,6 +15,8 @@ from prompt_toolkit import PromptSession | |
| 15 15 | 
             
            from prompt_toolkit.completion import merge_completers
         | 
| 16 16 | 
             
            from prompt_toolkit.history import FileHistory
         | 
| 17 17 | 
             
            from prompt_toolkit.styles import Style
         | 
| 18 | 
            +
            from prompt_toolkit.key_binding import KeyBindings
         | 
| 19 | 
            +
            from prompt_toolkit.keys import Keys
         | 
| 18 20 |  | 
| 19 21 | 
             
            from code_puppy.command_line.model_picker_completion import (
         | 
| 20 22 | 
             
                ModelNameCompleter,
         | 
| @@ -83,10 +85,17 @@ async def get_input_with_combined_completion(prompt_str = '>>> ', history_file: | |
| 83 85 | 
             
                    ModelNameCompleter(trigger='~m'),
         | 
| 84 86 | 
             
                    CDCompleter(trigger='~cd'),
         | 
| 85 87 | 
             
                ])
         | 
| 88 | 
            +
                # Add custom key bindings for Alt+M to insert a new line without submitting
         | 
| 89 | 
            +
                bindings = KeyBindings()
         | 
| 90 | 
            +
                @bindings.add(Keys.Escape, 'm')  # Alt+M
         | 
| 91 | 
            +
                def _(event):
         | 
| 92 | 
            +
                    event.app.current_buffer.insert_text('\n')
         | 
| 93 | 
            +
             | 
| 86 94 | 
             
                session = PromptSession(
         | 
| 87 95 | 
             
                    completer=completer,
         | 
| 88 96 | 
             
                    history=history,
         | 
| 89 | 
            -
                    complete_while_typing=True
         | 
| 97 | 
            +
                    complete_while_typing=True,
         | 
| 98 | 
            +
                    key_bindings=bindings
         | 
| 90 99 | 
             
                )
         | 
| 91 100 | 
             
                # If they pass a string, backward-compat: convert it to formatted_text
         | 
| 92 101 | 
             
                if isinstance(prompt_str, str):
         | 
| @@ -1,5 +1,5 @@ | |
| 1 1 | 
             
            code_puppy/__init__.py,sha256=orgffM-uGp8g1XCqXGKWaFB4tCCz8TVgsLMPKCOGNx0,81
         | 
| 2 | 
            -
            code_puppy/agent.py,sha256= | 
| 2 | 
            +
            code_puppy/agent.py,sha256=OtDhM9j5IrxuLStxM2X0h8tWXcaDAMS4mMZlbmAH7UU,3146
         | 
| 3 3 | 
             
            code_puppy/agent_prompts.py,sha256=O8vzlEPct6qRNhKSRctJRwq3aDOhT_-vyVozS5DtmVA,6554
         | 
| 4 4 | 
             
            code_puppy/config.py,sha256=DvmctmrHsOmjiXaiwT-4vAUiTZ4Cib-imyjKewI70eU,1661
         | 
| 5 5 | 
             
            code_puppy/main.py,sha256=bc27bk6rFge95H2BumTTzRLtOx43z5FnsmjIjQx_RpU,10052
         | 
| @@ -11,7 +11,7 @@ code_puppy/command_line/__init__.py,sha256=y7WeRemfYppk8KVbCGeAIiTuiOszIURCDjOMZ | |
| 11 11 | 
             
            code_puppy/command_line/file_path_completion.py,sha256=HAlOu9XVYgJ7FbjdrhKBL0rFmCVFxSGGewdcfKTUsPw,2865
         | 
| 12 12 | 
             
            code_puppy/command_line/meta_command_handler.py,sha256=Q-aDOZfefF0m2Bo-N6_DNVvT0gLrg8nBalrK1uJwEUA,3321
         | 
| 13 13 | 
             
            code_puppy/command_line/model_picker_completion.py,sha256=5D2HkrMCtee7Eo6augls4KU6bh7tu7xR2zH5triRuZg,3658
         | 
| 14 | 
            -
            code_puppy/command_line/prompt_toolkit_completion.py,sha256= | 
| 14 | 
            +
            code_puppy/command_line/prompt_toolkit_completion.py,sha256=pOX3gd2-nn42ReM3_pp3g-NxvslZ9tBSd0S_IeyNelk,5156
         | 
| 15 15 | 
             
            code_puppy/command_line/utils.py,sha256=L1PnV9tNupEW1zeziyb5aGAq8DYP8sMiuQbFYLO5Nus,1236
         | 
| 16 16 | 
             
            code_puppy/tools/__init__.py,sha256=48BVpMt0HAMtz8G_z9SQhX6LnRqR83_AVfMQMf7bY0g,557
         | 
| 17 17 | 
             
            code_puppy/tools/code_map.py,sha256=BghDHaebhGDfDGvA34gwO_5r92Py4O0Q3J4RV-WtnWs,3155
         | 
| @@ -20,9 +20,9 @@ code_puppy/tools/common.py,sha256=dbmyZTrTBQh_0WWpaYN6jEync62W2mMrzNS8UFK0co4,14 | |
| 20 20 | 
             
            code_puppy/tools/file_modifications.py,sha256=V8as4Pp_qBJSUFuFl5Y-jpiJKH0tUEQ8dNdkGHzpQM0,11645
         | 
| 21 21 | 
             
            code_puppy/tools/file_operations.py,sha256=9M-JntSSTElsLZ1EMLo9Xu2ifje-N0hjXbwARoBm2Tw,9722
         | 
| 22 22 | 
             
            code_puppy/tools/web_search.py,sha256=HhcwX0MMvMDPFO8gr8gzgesD5wPXOypjkxyLZeNwL5g,589
         | 
| 23 | 
            -
            code_puppy-0.0. | 
| 24 | 
            -
            code_puppy-0.0. | 
| 25 | 
            -
            code_puppy-0.0. | 
| 26 | 
            -
            code_puppy-0.0. | 
| 27 | 
            -
            code_puppy-0.0. | 
| 28 | 
            -
            code_puppy-0.0. | 
| 23 | 
            +
            code_puppy-0.0.43.data/data/code_puppy/models.json,sha256=7H-y97YK9BXhag5wJU19rtg24JtZWYx60RsBLBW3WiI,2162
         | 
| 24 | 
            +
            code_puppy-0.0.43.dist-info/METADATA,sha256=AiR6F_KVYn0DmXNjwkSKL3KEl-dPHZCmYt2QJVs57D8,4716
         | 
| 25 | 
            +
            code_puppy-0.0.43.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
         | 
| 26 | 
            +
            code_puppy-0.0.43.dist-info/entry_points.txt,sha256=d8YkBvIUxF-dHNJAj-x4fPEqizbY5d_TwvYpc01U5kw,58
         | 
| 27 | 
            +
            code_puppy-0.0.43.dist-info/licenses/LICENSE,sha256=31u8x0SPgdOq3izJX41kgFazWsM43zPEF9eskzqbJMY,1075
         | 
| 28 | 
            +
            code_puppy-0.0.43.dist-info/RECORD,,
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         |