fix: reduced token usage, removed parameters from schema that CLIs never seem to use
This commit is contained in:
@@ -76,7 +76,7 @@ class WorkflowTool(BaseTool, BaseWorkflowMixin):
|
||||
Workflow tools automatically get all standard workflow fields:
|
||||
- step, step_number, total_steps, next_step_required
|
||||
- findings, files_checked, relevant_files, relevant_context
|
||||
- issues_found, confidence, hypothesis, backtrack_from_step
|
||||
- issues_found, confidence, hypothesis
|
||||
- plus common fields (model, temperature, etc.)
|
||||
|
||||
Override this method to add additional tool-specific fields.
|
||||
|
||||
@@ -72,11 +72,6 @@ class WorkflowSchemaBuilder:
|
||||
"type": "string",
|
||||
"description": WORKFLOW_FIELD_DESCRIPTIONS["hypothesis"],
|
||||
},
|
||||
"backtrack_from_step": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"description": WORKFLOW_FIELD_DESCRIPTIONS["backtrack_from_step"],
|
||||
},
|
||||
"use_assistant_model": {
|
||||
"type": "boolean",
|
||||
"default": True,
|
||||
|
||||
@@ -701,11 +701,6 @@ class BaseWorkflowMixin(ABC):
|
||||
# Allow tools to store initial description for expert analysis
|
||||
self.store_initial_issue(request.step)
|
||||
|
||||
# Handle backtracking if requested
|
||||
backtrack_step = self.get_backtrack_step(request)
|
||||
if backtrack_step:
|
||||
self._handle_backtracking(backtrack_step)
|
||||
|
||||
# Process work step - allow tools to customize field mapping
|
||||
step_data = self.prepare_step_data(request)
|
||||
|
||||
@@ -992,13 +987,6 @@ class BaseWorkflowMixin(ABC):
|
||||
except AttributeError:
|
||||
return {}
|
||||
|
||||
def get_backtrack_step(self, request) -> Optional[int]:
|
||||
"""Get backtrack step from request. Override for custom backtrack handling."""
|
||||
try:
|
||||
return request.backtrack_from_step
|
||||
except AttributeError:
|
||||
return None
|
||||
|
||||
def store_initial_issue(self, step_description: str):
|
||||
"""Store initial issue description. Override for custom storage."""
|
||||
# Default implementation - tools can override to store differently
|
||||
@@ -1378,13 +1366,6 @@ class BaseWorkflowMixin(ABC):
|
||||
|
||||
return response_data
|
||||
|
||||
def _handle_backtracking(self, backtrack_step: int):
|
||||
"""Handle backtracking to a previous step"""
|
||||
# Remove findings after the backtrack point
|
||||
self.work_history = [s for s in self.work_history if s["step_number"] < backtrack_step]
|
||||
# Reprocess consolidated findings
|
||||
self._reprocess_consolidated_findings()
|
||||
|
||||
def _update_consolidated_findings(self, step_data: dict):
|
||||
"""Update consolidated findings with new step data"""
|
||||
self.consolidated_findings.files_checked.update(step_data.get("files_checked", []))
|
||||
|
||||
Reference in New Issue
Block a user