code-puppy 0.0.96__py3-none-any.whl → 0.0.118__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.
Files changed (81) hide show
  1. code_puppy/__init__.py +2 -5
  2. code_puppy/__main__.py +10 -0
  3. code_puppy/agent.py +125 -40
  4. code_puppy/agent_prompts.py +30 -24
  5. code_puppy/callbacks.py +152 -0
  6. code_puppy/command_line/command_handler.py +359 -0
  7. code_puppy/command_line/load_context_completion.py +59 -0
  8. code_puppy/command_line/model_picker_completion.py +14 -21
  9. code_puppy/command_line/motd.py +44 -28
  10. code_puppy/command_line/prompt_toolkit_completion.py +42 -23
  11. code_puppy/config.py +266 -26
  12. code_puppy/http_utils.py +122 -0
  13. code_puppy/main.py +570 -383
  14. code_puppy/message_history_processor.py +195 -104
  15. code_puppy/messaging/__init__.py +46 -0
  16. code_puppy/messaging/message_queue.py +288 -0
  17. code_puppy/messaging/queue_console.py +293 -0
  18. code_puppy/messaging/renderers.py +305 -0
  19. code_puppy/messaging/spinner/__init__.py +55 -0
  20. code_puppy/messaging/spinner/console_spinner.py +200 -0
  21. code_puppy/messaging/spinner/spinner_base.py +66 -0
  22. code_puppy/messaging/spinner/textual_spinner.py +97 -0
  23. code_puppy/model_factory.py +73 -105
  24. code_puppy/plugins/__init__.py +32 -0
  25. code_puppy/reopenable_async_client.py +225 -0
  26. code_puppy/state_management.py +60 -21
  27. code_puppy/summarization_agent.py +56 -35
  28. code_puppy/token_utils.py +7 -9
  29. code_puppy/tools/__init__.py +1 -4
  30. code_puppy/tools/command_runner.py +187 -32
  31. code_puppy/tools/common.py +44 -35
  32. code_puppy/tools/file_modifications.py +335 -118
  33. code_puppy/tools/file_operations.py +368 -95
  34. code_puppy/tools/token_check.py +27 -11
  35. code_puppy/tools/tools_content.py +53 -0
  36. code_puppy/tui/__init__.py +10 -0
  37. code_puppy/tui/app.py +1050 -0
  38. code_puppy/tui/components/__init__.py +21 -0
  39. code_puppy/tui/components/chat_view.py +512 -0
  40. code_puppy/tui/components/command_history_modal.py +218 -0
  41. code_puppy/tui/components/copy_button.py +139 -0
  42. code_puppy/tui/components/custom_widgets.py +58 -0
  43. code_puppy/tui/components/input_area.py +167 -0
  44. code_puppy/tui/components/sidebar.py +309 -0
  45. code_puppy/tui/components/status_bar.py +182 -0
  46. code_puppy/tui/messages.py +27 -0
  47. code_puppy/tui/models/__init__.py +8 -0
  48. code_puppy/tui/models/chat_message.py +25 -0
  49. code_puppy/tui/models/command_history.py +89 -0
  50. code_puppy/tui/models/enums.py +24 -0
  51. code_puppy/tui/screens/__init__.py +13 -0
  52. code_puppy/tui/screens/help.py +130 -0
  53. code_puppy/tui/screens/settings.py +256 -0
  54. code_puppy/tui/screens/tools.py +74 -0
  55. code_puppy/tui/tests/__init__.py +1 -0
  56. code_puppy/tui/tests/test_chat_message.py +28 -0
  57. code_puppy/tui/tests/test_chat_view.py +88 -0
  58. code_puppy/tui/tests/test_command_history.py +89 -0
  59. code_puppy/tui/tests/test_copy_button.py +191 -0
  60. code_puppy/tui/tests/test_custom_widgets.py +27 -0
  61. code_puppy/tui/tests/test_disclaimer.py +27 -0
  62. code_puppy/tui/tests/test_enums.py +15 -0
  63. code_puppy/tui/tests/test_file_browser.py +60 -0
  64. code_puppy/tui/tests/test_help.py +38 -0
  65. code_puppy/tui/tests/test_history_file_reader.py +107 -0
  66. code_puppy/tui/tests/test_input_area.py +33 -0
  67. code_puppy/tui/tests/test_settings.py +44 -0
  68. code_puppy/tui/tests/test_sidebar.py +33 -0
  69. code_puppy/tui/tests/test_sidebar_history.py +153 -0
  70. code_puppy/tui/tests/test_sidebar_history_navigation.py +132 -0
  71. code_puppy/tui/tests/test_status_bar.py +54 -0
  72. code_puppy/tui/tests/test_timestamped_history.py +52 -0
  73. code_puppy/tui/tests/test_tools.py +82 -0
  74. code_puppy/version_checker.py +26 -3
  75. {code_puppy-0.0.96.dist-info → code_puppy-0.0.118.dist-info}/METADATA +9 -2
  76. code_puppy-0.0.118.dist-info/RECORD +86 -0
  77. code_puppy-0.0.96.dist-info/RECORD +0 -32
  78. {code_puppy-0.0.96.data → code_puppy-0.0.118.data}/data/code_puppy/models.json +0 -0
  79. {code_puppy-0.0.96.dist-info → code_puppy-0.0.118.dist-info}/WHEEL +0 -0
  80. {code_puppy-0.0.96.dist-info → code_puppy-0.0.118.dist-info}/entry_points.txt +0 -0
  81. {code_puppy-0.0.96.dist-info → code_puppy-0.0.118.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,53 @@
1
+ tools_content = """
2
+ Woof! 🐶 Here's my complete toolkit! I'm like a Swiss Army knife but way more fun:
3
+
4
+ # **File Operations**
5
+ - **`list_files(directory, recursive)`** - Browse directories like a good sniffing dog! Shows files, directories, sizes, and depth
6
+ - **`read_file(file_path)`** - Read any file content (with line count info)
7
+ - **`edit_file(path, diff)`** - The ultimate file editor! Can:
8
+ - ✅ Create new files
9
+ - ✅ Overwrite entire files
10
+ - ✅ Make targeted replacements (preferred method!)
11
+ - ✅ Delete specific snippets
12
+ - **`delete_file(file_path)`** - Remove files when needed (use with caution!)
13
+
14
+ # **Search & Analysis**
15
+ - **`grep(search_string, directory)`** - Search for text across files recursively (up to 200 matches)
16
+
17
+ # 💻 **System Operations**
18
+ - **`agent_run_shell_command(command, cwd, timeout)`** - Execute shell commands with full output capture (stdout, stderr, exit codes)
19
+
20
+ # **Network Operations**
21
+ - **`grab_json_from_url(url)`** - Fetch JSON data from URLs (when network allows)
22
+
23
+ # **Agent Communication**
24
+ - **`agent_share_your_reasoning(reasoning, next_steps)`** - Let you peek into my thought process (transparency is key!)
25
+ - **`final_result(output_message, awaiting_user_input)`** - Deliver final responses to you
26
+
27
+ # **Tool Usage Philosophy**
28
+
29
+ I follow these principles religiously:
30
+ - **DRY** - Don't Repeat Yourself
31
+ - **YAGNI** - You Ain't Gonna Need It
32
+ - **SOLID** - Single responsibility, Open/closed, etc.
33
+ - **Files under 600 lines** - Keep things manageable!
34
+
35
+ # **Pro Tips**
36
+
37
+ - For `edit_file`, I prefer **targeted replacements** over full file overwrites (more efficient!)
38
+ - I always use `agent_share_your_reasoning` before major operations to explain my thinking
39
+ - When running tests, I use `--silent` flags for JS/TS to avoid spam
40
+ - I explore with `list_files` before modifying anything
41
+
42
+ # **What I Can Do**
43
+
44
+ With these tools, I can:
45
+ - 📝 Write, modify, and organize code
46
+ - 🔍 Analyze codebases and find patterns
47
+ - ⚡ Run tests and debug issues
48
+ - 📊 Generate documentation and reports
49
+ - 🔄 Automate development workflows
50
+ - 🧹 Refactor code following best practices
51
+
52
+ Ready to fetch some code sticks and build amazing software together? 🔧✨
53
+ """
@@ -0,0 +1,10 @@
1
+ """
2
+ Code Puppy TUI package.
3
+
4
+ This package provides a modern Text User Interface for Code Puppy using the Textual framework.
5
+ It maintains compatibility with existing functionality while providing an enhanced user experience.
6
+ """
7
+
8
+ from .app import CodePuppyTUI, run_textual_ui
9
+
10
+ __all__ = ["CodePuppyTUI", "run_textual_ui"]