code-puppy 0.0.68__tar.gz → 0.0.70__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 (28) hide show
  1. {code_puppy-0.0.68 → code_puppy-0.0.70}/PKG-INFO +1 -1
  2. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/command_line/meta_command_handler.py +2 -2
  3. code_puppy-0.0.70/code_puppy/command_line/motd.py +45 -0
  4. {code_puppy-0.0.68 → code_puppy-0.0.70}/pyproject.toml +1 -1
  5. {code_puppy-0.0.68 → code_puppy-0.0.70}/.gitignore +0 -0
  6. {code_puppy-0.0.68 → code_puppy-0.0.70}/LICENSE +0 -0
  7. {code_puppy-0.0.68 → code_puppy-0.0.70}/README.md +0 -0
  8. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/__init__.py +0 -0
  9. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/agent.py +0 -0
  10. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/agent_prompts.py +0 -0
  11. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/command_line/__init__.py +0 -0
  12. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/command_line/file_path_completion.py +0 -0
  13. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/command_line/model_picker_completion.py +0 -0
  14. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/command_line/prompt_toolkit_completion.py +0 -0
  15. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/command_line/utils.py +0 -0
  16. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/config.py +0 -0
  17. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/main.py +0 -0
  18. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/model_factory.py +0 -0
  19. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/models.json +0 -0
  20. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/session_memory.py +0 -0
  21. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/tools/__init__.py +0 -0
  22. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/tools/command_runner.py +0 -0
  23. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/tools/common.py +0 -0
  24. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/tools/file_modifications.py +0 -0
  25. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/tools/file_operations.py +0 -0
  26. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/tools/ts_code_map.py +0 -0
  27. {code_puppy-0.0.68 → code_puppy-0.0.70}/code_puppy/tools/web_search.py +0 -0
  28. {code_puppy-0.0.68 → code_puppy-0.0.70}/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.68
3
+ Version: 0.0.70
4
4
  Summary: Code generation agent
5
5
  Author: Michael Pfaffenberger
6
6
  License: MIT
@@ -12,8 +12,8 @@ from code_puppy.command_line.utils import make_directory_table
12
12
  META_COMMANDS_HELP = """
13
13
  [bold magenta]Meta Commands Help[/bold magenta]
14
14
  ~help, ~h Show this help message
15
- ~cd [dir] Change directory or show directories
16
- ~codemap [dir] Show code structure for [dir]
15
+ ~cd <dir> Change directory or show directories
16
+ ~codemap <dir> Show code structure for <dir>
17
17
  ~m <model> Set active model
18
18
  ~motd Show the latest message of the day (MOTD)
19
19
  ~show Show puppy config key-values
@@ -0,0 +1,45 @@
1
+ """
2
+ MOTD (Message of the Day) feature for code-puppy.
3
+ Stores seen versions in ~/.puppy_cfg/motd.txt.
4
+ """
5
+ import os
6
+ from typing import Optional
7
+
8
+ MOTD_VERSION = "20240601"
9
+ MOTD_MESSAGE = """
10
+ June 14th, 2025 - Wow... code_puppy has been downloaded 10s of thousands of times.
11
+
12
+ This new update has a bug fix where message truncation would sometimes cause tool-calls and tool-replies
13
+ to become isolated, and an exception would be raied creating a situation only recoverable by restarting
14
+ code-puppy or using the `clear` command to get rid of all message history.
15
+
16
+ Thankfully that is fixed. Message truncation max-length is configurable with the following command:
17
+ `~set message_history_length 25` if you want to truncate to 25 messages. The default is 40.
18
+
19
+ This message-of-the-day will not appear again unless you run ~motd.
20
+
21
+ Please open issues on GitHub if you find any bugs! Cheers!
22
+ """
23
+ MOTD_TRACK_FILE = os.path.expanduser("~/.puppy_cfg/motd.txt")
24
+
25
+
26
+ def has_seen_motd(version: str) -> bool:
27
+ if not os.path.exists(MOTD_TRACK_FILE):
28
+ return False
29
+ with open(MOTD_TRACK_FILE, "r") as f:
30
+ seen_versions = {line.strip() for line in f if line.strip()}
31
+ return version in seen_versions
32
+
33
+
34
+ def mark_motd_seen(version: str):
35
+ os.makedirs(os.path.dirname(MOTD_TRACK_FILE), exist_ok=True)
36
+ with open(MOTD_TRACK_FILE, "a") as f:
37
+ f.write(f"{version}\n")
38
+
39
+
40
+ def print_motd(console, force: bool = False) -> bool:
41
+ if force or not has_seen_motd(MOTD_VERSION):
42
+ console.print(MOTD_MESSAGE)
43
+ mark_motd_seen(MOTD_VERSION)
44
+ return True
45
+ return False
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "code-puppy"
7
- version = "0.0.68"
7
+ version = "0.0.70"
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