/**
* Tool Call Filter Extension
*
* Filters out invalid tool calls before they're sent back to the provider.
* This addresses issues where some models construct malformed tool call blocks.
*
* Install: Place in ~/.pi/extensions/tool-call-filter.ts or project .pi/extensions/
*/This pattern bypasses the VS Code webview’s default drag handling by:
- Capturing drag events at the window level
- Calling
preventDefault()(and oftenstopImmediatePropagation()) - Showing a container-specific overlay
- Reading files from
dataTransfer.items/dataTransfer.files
This workflow provides comprehensive performance analysis for code changes with the rigor expected in game engines, graphics engines, and critical systems where speed, space efficiency, reliability, and robustness are paramount. The approach systematically evaluates algorithmic complexity, data structures, memory patterns, and system-level optimizations through specialized sub-agents with deep performance expertise.
I need to perform critical performance analysis for [CODE CHANGE DESCRIPTION] in [REPOSITORY/BRANCH]. This analysis must meet the standards of game engines, graphics engines, and critical systems where performance is paramount. Follow this comprehensive performance analysis workflow with nested sub-agent delegation:
This workflow provides comprehensive code review coverage by deploying specialized sub-agents across multiple review domains. The approach ensures systematic evaluation of security, performance, architecture, testing, and functionality through parallel domain analysis and structured integration.
I need to perform a thorough code review for [CODE CHANGE DESCRIPTION] in [REPOSITORY/BRANCH]. Follow this comprehensive code review workflow with specialized sub-agent delegation:
This adaptive workflow systematically diagnoses and fixes bugs in unknown codebases by using strategic sub-agent delegation and evidence-based investigation strategies.
I need to fix [BUG DESCRIPTION] in this unfamiliar codebase. Follow this adaptive bug fixing workflow with strategic sub-agent delegation:
This workflow maximizes efficiency and reliability when implementing new features in unknown codebases by using strategic sub-agent delegation and systematic discovery phases.
I need to implement [FEATURE DESCRIPTION] in this unfamiliar codebase. Follow this optimized workflow with strategic sub-agent delegation:
| import http.server | |
| import socketserver | |
| import logging | |
| import requests | |
| import json | |
| from urllib.parse import urlparse | |
| PORT = 8000 | |
| class ProxyHandler(http.server.SimpleHTTPRequestHandler): |
You have over 20 years of experience in various programming languages and architectures, helping to solve various software development lifecycle processes in different fields and domains. You are embedded in Visual Studio Code and are able to chat, provide and execute CLI commands and assist me in designing and implementing various tasks.
When implementing code, ensure the following requirements.
General Requirements:
- Workflow-Based Structure: Each user- or system-centric workflow and process should be encapsulated in its own folder.
- Vertical Sliced Architecture: The code should be structured to promote modularity and maintainability.
- Data-Oriented Programming: Separate data from functions and methods to improve code organization.
- As few abstractions as possible to keep a clean execution path
The Visual Workflow Builder is embedded in the Cody AI VS Code extension that lets you create automated workflows combining Cody AI capabilities with command-line operations. Using an intuitive drag-and-drop interface, you can chain together different actions to automate repetitive tasks.
- CLI Actions
- Execute shell commands
| """ | |
| Processes a JSON file containing chat history and converts each session to a Markdown file. | |
| Args: | |
| input_json (str): Path to the input JSON file containing chat history. | |
| output_dir (str): Directory where the generated Markdown files will be saved. | |
| Raises: | |
| FileNotFoundError: If the input JSON file does not exist. | |
| json.JSONDecodeError: If the JSON file is improperly formatted. |