code-puppy 0.0.97__py3-none-any.whl → 0.0.119__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/__init__.py +2 -5
- code_puppy/__main__.py +10 -0
- code_puppy/agent.py +125 -40
- code_puppy/agent_prompts.py +30 -24
- code_puppy/callbacks.py +152 -0
- code_puppy/command_line/command_handler.py +359 -0
- code_puppy/command_line/load_context_completion.py +59 -0
- code_puppy/command_line/model_picker_completion.py +14 -21
- code_puppy/command_line/motd.py +44 -28
- code_puppy/command_line/prompt_toolkit_completion.py +42 -23
- code_puppy/config.py +266 -26
- code_puppy/http_utils.py +122 -0
- code_puppy/main.py +570 -383
- code_puppy/message_history_processor.py +195 -104
- code_puppy/messaging/__init__.py +46 -0
- code_puppy/messaging/message_queue.py +288 -0
- code_puppy/messaging/queue_console.py +293 -0
- code_puppy/messaging/renderers.py +305 -0
- code_puppy/messaging/spinner/__init__.py +55 -0
- code_puppy/messaging/spinner/console_spinner.py +200 -0
- code_puppy/messaging/spinner/spinner_base.py +66 -0
- code_puppy/messaging/spinner/textual_spinner.py +97 -0
- code_puppy/model_factory.py +73 -105
- code_puppy/plugins/__init__.py +32 -0
- code_puppy/reopenable_async_client.py +225 -0
- code_puppy/state_management.py +60 -21
- code_puppy/summarization_agent.py +56 -35
- code_puppy/token_utils.py +7 -9
- code_puppy/tools/__init__.py +1 -4
- code_puppy/tools/command_runner.py +187 -32
- code_puppy/tools/common.py +44 -35
- code_puppy/tools/file_modifications.py +335 -118
- code_puppy/tools/file_operations.py +368 -95
- code_puppy/tools/token_check.py +27 -11
- code_puppy/tools/tools_content.py +53 -0
- code_puppy/tui/__init__.py +10 -0
- code_puppy/tui/app.py +1050 -0
- code_puppy/tui/components/__init__.py +21 -0
- code_puppy/tui/components/chat_view.py +512 -0
- code_puppy/tui/components/command_history_modal.py +218 -0
- code_puppy/tui/components/copy_button.py +139 -0
- code_puppy/tui/components/custom_widgets.py +58 -0
- code_puppy/tui/components/input_area.py +167 -0
- code_puppy/tui/components/sidebar.py +309 -0
- code_puppy/tui/components/status_bar.py +182 -0
- code_puppy/tui/messages.py +27 -0
- code_puppy/tui/models/__init__.py +8 -0
- code_puppy/tui/models/chat_message.py +25 -0
- code_puppy/tui/models/command_history.py +89 -0
- code_puppy/tui/models/enums.py +24 -0
- code_puppy/tui/screens/__init__.py +13 -0
- code_puppy/tui/screens/help.py +130 -0
- code_puppy/tui/screens/settings.py +255 -0
- code_puppy/tui/screens/tools.py +74 -0
- code_puppy/tui/tests/__init__.py +1 -0
- code_puppy/tui/tests/test_chat_message.py +28 -0
- code_puppy/tui/tests/test_chat_view.py +88 -0
- code_puppy/tui/tests/test_command_history.py +89 -0
- code_puppy/tui/tests/test_copy_button.py +191 -0
- code_puppy/tui/tests/test_custom_widgets.py +27 -0
- code_puppy/tui/tests/test_disclaimer.py +27 -0
- code_puppy/tui/tests/test_enums.py +15 -0
- code_puppy/tui/tests/test_file_browser.py +60 -0
- code_puppy/tui/tests/test_help.py +38 -0
- code_puppy/tui/tests/test_history_file_reader.py +107 -0
- code_puppy/tui/tests/test_input_area.py +33 -0
- code_puppy/tui/tests/test_settings.py +44 -0
- code_puppy/tui/tests/test_sidebar.py +33 -0
- code_puppy/tui/tests/test_sidebar_history.py +153 -0
- code_puppy/tui/tests/test_sidebar_history_navigation.py +132 -0
- code_puppy/tui/tests/test_status_bar.py +54 -0
- code_puppy/tui/tests/test_timestamped_history.py +52 -0
- code_puppy/tui/tests/test_tools.py +82 -0
- code_puppy/version_checker.py +26 -3
- {code_puppy-0.0.97.dist-info → code_puppy-0.0.119.dist-info}/METADATA +9 -2
- code_puppy-0.0.119.dist-info/RECORD +86 -0
- code_puppy-0.0.97.dist-info/RECORD +0 -32
- {code_puppy-0.0.97.data → code_puppy-0.0.119.data}/data/code_puppy/models.json +0 -0
- {code_puppy-0.0.97.dist-info → code_puppy-0.0.119.dist-info}/WHEEL +0 -0
- {code_puppy-0.0.97.dist-info → code_puppy-0.0.119.dist-info}/entry_points.txt +0 -0
- {code_puppy-0.0.97.dist-info → code_puppy-0.0.119.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"]
|