code-puppy 0.0.316__tar.gz → 0.0.317__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.
- {code_puppy-0.0.316 → code_puppy-0.0.317}/PKG-INFO +1 -1
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/base_agent.py +11 -1
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/cli_runner.py +6 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/messaging/__init__.py +9 -0
- code_puppy-0.0.317/code_puppy/messaging/markdown_patches.py +57 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/model_factory.py +6 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/pyproject.toml +2 -1
- {code_puppy-0.0.316 → code_puppy-0.0.317}/.gitignore +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/LICENSE +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/README.md +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/__init__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/__main__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/__init__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_c_reviewer.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_code_puppy.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_code_reviewer.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_cpp_reviewer.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_creator_agent.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_golang_reviewer.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_javascript_reviewer.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_manager.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_planning.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_python_programmer.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_python_reviewer.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_qa_expert.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_qa_kitten.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_security_auditor.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/agent_typescript_reviewer.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/json_agent.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/agents/prompt_reviewer.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/callbacks.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/chatgpt_codex_client.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/claude_cache_client.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/__init__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/add_model_menu.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/attachments.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/autosave_menu.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/colors_menu.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/command_handler.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/command_registry.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/config_commands.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/core_commands.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/diff_menu.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/file_path_completion.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/load_context_completion.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/__init__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/add_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/base.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/catalog_server_installer.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/custom_server_form.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/custom_server_installer.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/edit_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/handler.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/help_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/install_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/install_menu.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/list_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/logs_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/remove_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/restart_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/search_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/start_all_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/start_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/status_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/stop_all_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/stop_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/test_command.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/utils.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/wizard_utils.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp_completion.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/model_picker_completion.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/model_settings_menu.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/motd.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/pin_command_completion.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/prompt_toolkit_completion.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/session_commands.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/utils.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/config.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/error_logging.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/gemini_code_assist.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/http_utils.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/keymap.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/main.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/__init__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/async_lifecycle.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/blocking_startup.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/captured_stdio_server.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/circuit_breaker.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/config_wizard.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/dashboard.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/error_isolation.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/examples/retry_example.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/health_monitor.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/managed_server.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/manager.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/registry.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/retry_manager.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/server_registry_catalog.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/status_tracker.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/mcp_/system_tools.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/messaging/bus.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/messaging/commands.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/messaging/message_queue.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/messaging/messages.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/messaging/queue_console.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/messaging/renderers.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/messaging/rich_renderer.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/messaging/spinner/__init__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/messaging/spinner/console_spinner.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/messaging/spinner/spinner_base.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/model_utils.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/models.json +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/models_dev_api.json +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/models_dev_parser.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/__init__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/chatgpt_oauth/__init__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/chatgpt_oauth/config.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/chatgpt_oauth/oauth_flow.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/chatgpt_oauth/register_callbacks.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/chatgpt_oauth/test_plugin.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/chatgpt_oauth/utils.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/claude_code_oauth/README.md +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/claude_code_oauth/SETUP.md +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/claude_code_oauth/__init__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/claude_code_oauth/config.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/claude_code_oauth/register_callbacks.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/claude_code_oauth/test_plugin.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/claude_code_oauth/utils.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/customizable_commands/__init__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/customizable_commands/register_callbacks.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/example_custom_command/README.md +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/example_custom_command/register_callbacks.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/file_permission_handler/__init__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/file_permission_handler/register_callbacks.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/oauth_puppy_html.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/shell_safety/__init__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/shell_safety/agent_shell_safety.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/shell_safety/command_cache.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/shell_safety/register_callbacks.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/prompts/codex_system_prompt.md +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/pydantic_patches.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/reopenable_async_client.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/round_robin_model.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/session_storage.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/status_display.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/summarization_agent.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/terminal_utils.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/__init__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/agent_tools.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/browser/__init__.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/browser/browser_control.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/browser/browser_interactions.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/browser/browser_locators.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/browser/browser_navigation.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/browser/browser_screenshot.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/browser/browser_scripts.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/browser/browser_workflows.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/browser/camoufox_manager.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/browser/vqa_agent.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/command_runner.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/common.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/file_modifications.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/file_operations.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/tools/tools_content.py +0 -0
- {code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/version_checker.py +0 -0
|
@@ -89,6 +89,9 @@ class BaseAgent(ABC):
|
|
|
89
89
|
# Cache for MCP tool definitions (for token estimation)
|
|
90
90
|
# This is populated after the first successful run when MCP tools are retrieved
|
|
91
91
|
self._mcp_tool_definitions_cache: List[Dict[str, Any]] = []
|
|
92
|
+
# Shared console for streaming output - should be set by cli_runner
|
|
93
|
+
# to avoid conflicts between spinner's Live display and response streaming
|
|
94
|
+
self._console: Optional[Any] = None
|
|
92
95
|
|
|
93
96
|
@property
|
|
94
97
|
@abstractmethod
|
|
@@ -1276,7 +1279,14 @@ class BaseAgent(ABC):
|
|
|
1276
1279
|
|
|
1277
1280
|
from code_puppy.messaging.spinner import pause_all_spinners
|
|
1278
1281
|
|
|
1279
|
-
console
|
|
1282
|
+
# IMPORTANT: Use the shared console (set by cli_runner) to avoid conflicts
|
|
1283
|
+
# with the spinner's Live display. Multiple Console instances with separate
|
|
1284
|
+
# Live displays cause cursor positioning chaos and line duplication.
|
|
1285
|
+
if self._console is not None:
|
|
1286
|
+
console = self._console
|
|
1287
|
+
else:
|
|
1288
|
+
# Fallback if console not set (shouldn't happen in normal use)
|
|
1289
|
+
console = Console()
|
|
1280
1290
|
|
|
1281
1291
|
# Disable Live display in test mode or non-interactive environments
|
|
1282
1292
|
# This fixes issues with pexpect PTY where Live() hangs
|
|
@@ -706,6 +706,12 @@ async def run_prompt_with_attachments(
|
|
|
706
706
|
attachments = [attachment.content for attachment in processed_prompt.attachments]
|
|
707
707
|
link_attachments = [link.url_part for link in processed_prompt.link_attachments]
|
|
708
708
|
|
|
709
|
+
# IMPORTANT: Set the shared console on the agent so that streaming output
|
|
710
|
+
# uses the same console as the spinner. This prevents Live display conflicts
|
|
711
|
+
# that cause line duplication during markdown streaming.
|
|
712
|
+
if spinner_console is not None:
|
|
713
|
+
agent._console = spinner_console
|
|
714
|
+
|
|
709
715
|
# Create the agent task first so we can track and cancel it
|
|
710
716
|
agent_task = asyncio.create_task(
|
|
711
717
|
agent.run_with_mcp(
|
|
@@ -29,6 +29,13 @@ Example (new):
|
|
|
29
29
|
>>> bus.emit(TextMessage(level=MessageLevel.INFO, text="Hello"))
|
|
30
30
|
"""
|
|
31
31
|
|
|
32
|
+
# =============================================================================
|
|
33
|
+
# Apply Rich Markdown patches (left-justified headers)
|
|
34
|
+
# =============================================================================
|
|
35
|
+
from .markdown_patches import patch_markdown_headings
|
|
36
|
+
|
|
37
|
+
patch_markdown_headings()
|
|
38
|
+
|
|
32
39
|
# =============================================================================
|
|
33
40
|
# Legacy API (backward compatible)
|
|
34
41
|
# =============================================================================
|
|
@@ -220,4 +227,6 @@ __all__ = [
|
|
|
220
227
|
"RichConsoleRenderer",
|
|
221
228
|
"DEFAULT_STYLES",
|
|
222
229
|
"DIFF_STYLES",
|
|
230
|
+
# Markdown patches
|
|
231
|
+
"patch_markdown_headings",
|
|
223
232
|
]
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""Patches for Rich's Markdown rendering.
|
|
2
|
+
|
|
3
|
+
This module provides customizations to Rich's default Markdown rendering,
|
|
4
|
+
particularly for header justification which is hardcoded to center in Rich.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from rich import box
|
|
8
|
+
from rich.markdown import Heading, Markdown
|
|
9
|
+
from rich.panel import Panel
|
|
10
|
+
from rich.text import Text
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class LeftJustifiedHeading(Heading):
|
|
14
|
+
"""A heading that left-justifies text instead of centering.
|
|
15
|
+
|
|
16
|
+
Rich's default Heading class hardcodes `text.justify = 'center'`,
|
|
17
|
+
which can look odd in a CLI context. This subclass overrides that
|
|
18
|
+
to use left justification instead.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
def __rich_console__(self, console, options):
|
|
22
|
+
"""Render the heading with left justification."""
|
|
23
|
+
text = self.text
|
|
24
|
+
text.justify = "left" # Override Rich's default 'center'
|
|
25
|
+
|
|
26
|
+
if self.tag == "h1":
|
|
27
|
+
# Draw a border around h1s (same as Rich default)
|
|
28
|
+
yield Panel(
|
|
29
|
+
text,
|
|
30
|
+
box=box.HEAVY,
|
|
31
|
+
style="markdown.h1.border",
|
|
32
|
+
)
|
|
33
|
+
else:
|
|
34
|
+
# Styled text for h2 and beyond (same as Rich default)
|
|
35
|
+
if self.tag == "h2":
|
|
36
|
+
yield Text("")
|
|
37
|
+
yield text
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
_patched = False
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def patch_markdown_headings():
|
|
44
|
+
"""Patch Rich's Markdown to use left-justified headings.
|
|
45
|
+
|
|
46
|
+
This function is idempotent - calling it multiple times has no effect
|
|
47
|
+
after the first call.
|
|
48
|
+
"""
|
|
49
|
+
global _patched
|
|
50
|
+
if _patched:
|
|
51
|
+
return
|
|
52
|
+
|
|
53
|
+
Markdown.elements["heading_open"] = LeftJustifiedHeading
|
|
54
|
+
_patched = True
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
__all__ = ["patch_markdown_headings", "LeftJustifiedHeading"]
|
|
@@ -108,6 +108,12 @@ def make_model_settings(
|
|
|
108
108
|
# Handle Anthropic extended thinking settings
|
|
109
109
|
# Remove top_p as Anthropic doesn't support it with extended thinking
|
|
110
110
|
model_settings_dict.pop("top_p", None)
|
|
111
|
+
|
|
112
|
+
# Claude extended thinking requires temperature=1.0 (API restriction)
|
|
113
|
+
# Default to 1.0 if not explicitly set by user
|
|
114
|
+
if model_settings_dict.get("temperature") is None:
|
|
115
|
+
model_settings_dict["temperature"] = 1.0
|
|
116
|
+
|
|
111
117
|
extended_thinking = effective_settings.get("extended_thinking", True)
|
|
112
118
|
budget_tokens = effective_settings.get("budget_tokens", 10000)
|
|
113
119
|
if extended_thinking and budget_tokens:
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "code-puppy"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.317"
|
|
8
8
|
description = "Code generation agent"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11,<3.14"
|
|
@@ -79,6 +79,7 @@ path = "code_puppy/models_dev_api.json"
|
|
|
79
79
|
[tool.ruff.lint.per-file-ignores]
|
|
80
80
|
"code_puppy/main.py" = ["E402"]
|
|
81
81
|
"code_puppy/cli_runner.py" = ["E402"]
|
|
82
|
+
"code_puppy/messaging/__init__.py" = ["E402"]
|
|
82
83
|
|
|
83
84
|
[tool.pytest.ini_options]
|
|
84
85
|
addopts = "--cov=code_puppy --cov-report=term-missing"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/load_context_completion.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/catalog_server_installer.py
RENAMED
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/mcp/custom_server_installer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/model_picker_completion.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/command_line/prompt_toolkit_completion.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/chatgpt_oauth/register_callbacks.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/claude_code_oauth/register_callbacks.py
RENAMED
|
File without changes
|
{code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/claude_code_oauth/test_plugin.py
RENAMED
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/customizable_commands/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/example_custom_command/README.md
RENAMED
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/file_permission_handler/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/shell_safety/agent_shell_safety.py
RENAMED
|
File without changes
|
|
File without changes
|
{code_puppy-0.0.316 → code_puppy-0.0.317}/code_puppy/plugins/shell_safety/register_callbacks.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|