Vision support via images / pdfs etc that can be passed on to other models as part of analysis, additional context etc.
Image processing pipeline added OpenAI GPT-4.1 support Chat tool prompt enhancement Lint and code quality improvements
This commit is contained in:
@@ -22,11 +22,29 @@ class TracerRequest(ToolRequest):
|
||||
|
||||
prompt: str = Field(
|
||||
...,
|
||||
description="Detailed description of what to trace and WHY you need this analysis. Include context about what you're trying to understand, debug, or analyze. For precision mode: describe the specific method/function and what aspect of its execution flow you need to understand. For dependencies mode: describe the class/module and what relationships you need to map. Example: 'I need to understand how BookingManager.finalizeInvoice method is called throughout the system and what side effects it has, as I'm debugging payment processing issues' rather than just 'BookingManager finalizeInvoice method'",
|
||||
description=(
|
||||
"Detailed description of what to trace and WHY you need this analysis. Include context about what "
|
||||
"you're trying to understand, debug, or analyze. For precision mode: describe the specific "
|
||||
"method/function and what aspect of its execution flow you need to understand. For dependencies "
|
||||
"mode: describe the class/module and what relationships you need to map. Example: 'I need to "
|
||||
"understand how BookingManager.finalizeInvoice method is called throughout the system and what "
|
||||
"side effects it has, as I'm debugging payment processing issues' rather than just "
|
||||
"'BookingManager finalizeInvoice method'"
|
||||
),
|
||||
)
|
||||
trace_mode: Literal["precision", "dependencies"] = Field(
|
||||
...,
|
||||
description="Trace mode: 'precision' (for methods/functions - shows execution flow and usage patterns) or 'dependencies' (for classes/modules/protocols - shows structural relationships)",
|
||||
description=(
|
||||
"Trace mode: 'precision' (for methods/functions - shows execution flow and usage patterns) or "
|
||||
"'dependencies' (for classes/modules/protocols - shows structural relationships)"
|
||||
),
|
||||
)
|
||||
images: list[str] = Field(
|
||||
default_factory=list,
|
||||
description=(
|
||||
"Optional images of system architecture diagrams, flow charts, or visual references to help "
|
||||
"understand the tracing context"
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -44,11 +62,15 @@ class TracerTool(BaseTool):
|
||||
def get_description(self) -> str:
|
||||
return (
|
||||
"ANALYSIS PROMPT GENERATOR - Creates structured prompts for static code analysis. "
|
||||
"Helps generate detailed analysis requests with specific method/function names, file paths, and component context. "
|
||||
"Type 'precision': For methods/functions - traces execution flow, call chains, call stacks, and shows when/how they are used. "
|
||||
"Type 'dependencies': For classes/modules/protocols - maps structural relationships and bidirectional dependencies. "
|
||||
"Helps generate detailed analysis requests with specific method/function names, file paths, and "
|
||||
"component context. "
|
||||
"Type 'precision': For methods/functions - traces execution flow, call chains, call stacks, and "
|
||||
"shows when/how they are used. "
|
||||
"Type 'dependencies': For classes/modules/protocols - maps structural relationships and "
|
||||
"bidirectional dependencies. "
|
||||
"Returns detailed instructions on how to perform the analysis and format the results. "
|
||||
"Use this to create focused analysis requests that can be fed back to Claude with the appropriate code files. "
|
||||
"Use this to create focused analysis requests that can be fed back to Claude with the appropriate "
|
||||
"code files. "
|
||||
)
|
||||
|
||||
def get_input_schema(self) -> dict[str, Any]:
|
||||
@@ -57,13 +79,26 @@ class TracerTool(BaseTool):
|
||||
"properties": {
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"description": "Detailed description of what to trace and WHY you need this analysis. Include context about what you're trying to understand, debug, or analyze. For precision mode: describe the specific method/function and what aspect of its execution flow you need to understand. For dependencies mode: describe the class/module and what relationships you need to map. Example: 'I need to understand how BookingManager.finalizeInvoice method is called throughout the system and what side effects it has, as I'm debugging payment processing issues' rather than just 'BookingManager finalizeInvoice method'",
|
||||
"description": (
|
||||
"Detailed description of what to trace and WHY you need this analysis. Include context "
|
||||
"about what you're trying to understand, debug, or analyze. For precision mode: describe "
|
||||
"the specific method/function and what aspect of its execution flow you need to understand. "
|
||||
"For dependencies mode: describe the class/module and what relationships you need to map. "
|
||||
"Example: 'I need to understand how BookingManager.finalizeInvoice method is called "
|
||||
"throughout the system and what side effects it has, as I'm debugging payment processing "
|
||||
"issues' rather than just 'BookingManager finalizeInvoice method'"
|
||||
),
|
||||
},
|
||||
"trace_mode": {
|
||||
"type": "string",
|
||||
"enum": ["precision", "dependencies"],
|
||||
"description": "Trace mode: 'precision' (for methods/functions - shows execution flow and usage patterns) or 'dependencies' (for classes/modules/protocols - shows structural relationships)",
|
||||
},
|
||||
"images": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"description": "Optional images of system architecture diagrams, flow charts, or visual references to help understand the tracing context",
|
||||
},
|
||||
},
|
||||
"required": ["prompt", "trace_mode"],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user