fix: configure codex with a longer timeout
refactor: param names
This commit is contained in:
@@ -667,7 +667,7 @@ class BaseTool(ABC):
|
||||
"""
|
||||
# Only validate files/paths if they exist in the request
|
||||
file_fields = [
|
||||
"files",
|
||||
"absolute_file_paths",
|
||||
"file",
|
||||
"path",
|
||||
"directory",
|
||||
@@ -885,7 +885,7 @@ class BaseTool(ABC):
|
||||
|
||||
def handle_prompt_file(self, files: Optional[list[str]]) -> tuple[Optional[str], Optional[list[str]]]:
|
||||
"""
|
||||
Check for and handle prompt.txt in the files list.
|
||||
Check for and handle prompt.txt in the absolute file paths list.
|
||||
|
||||
If prompt.txt is found, reads its content and removes it from the files list.
|
||||
This file is treated specially as the main prompt, not as an embedded file.
|
||||
@@ -895,7 +895,7 @@ class BaseTool(ABC):
|
||||
mechanism to bypass token constraints while preserving response capacity.
|
||||
|
||||
Args:
|
||||
files: List of file paths (will be translated for current environment)
|
||||
files: List of absolute file paths (will be translated for current environment)
|
||||
|
||||
Returns:
|
||||
tuple: (prompt_content, updated_files_list)
|
||||
@@ -983,7 +983,7 @@ class BaseTool(ABC):
|
||||
f"MANDATORY ACTION REQUIRED: The prompt is too large for MCP's token limits (>{MCP_PROMPT_SIZE_LIMIT:,} characters). "
|
||||
"YOU MUST IMMEDIATELY save the prompt text to a temporary file named 'prompt.txt' in the working directory. "
|
||||
"DO NOT attempt to shorten or modify the prompt. SAVE IT AS-IS to 'prompt.txt'. "
|
||||
"Then resend the request with the absolute file path to 'prompt.txt' in the files parameter (must be FULL absolute path - DO NOT SHORTEN), "
|
||||
"Then resend the request, passing the absolute file path to 'prompt.txt' as part of the tool call, "
|
||||
"along with any other files you wish to share as context. Leave the prompt text itself empty or very brief in the new request. "
|
||||
"This is the ONLY way to handle large prompts - you MUST follow these exact steps."
|
||||
),
|
||||
@@ -991,7 +991,7 @@ class BaseTool(ABC):
|
||||
"metadata": {
|
||||
"prompt_size": len(text),
|
||||
"limit": MCP_PROMPT_SIZE_LIMIT,
|
||||
"instructions": "MANDATORY: Save prompt to 'prompt.txt' in current folder and include absolute path in files parameter. DO NOT modify or shorten the prompt.",
|
||||
"instructions": "MANDATORY: Save prompt to 'prompt.txt' in current folder and provide full path when recalling this tool.",
|
||||
},
|
||||
}
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user