MCPcopy Index your code
hub / github.com/OpenBMB/ChatDev / _build_timeout_message

Function _build_timeout_message

functions/function_calling/uv_related.py:25–35  ·  view source on GitHub ↗

Create a descriptive timeout error message with optional output preview.

(step: str | None, timeout_value: float, stdout: str, stderr: str)

Source from the content-addressed store, hash-verified

23
24
25def _build_timeout_message(step: str | None, timeout_value: float, stdout: str, stderr: str) -> str:
26 """Create a descriptive timeout error message with optional output preview."""
27
28 label = "uv command"
29 if step:
30 label = f"{label} ({step})"
31 message = f"{label} timed out after {timeout_value} seconds"
32 preview = _trim_output_preview(stdout, stderr)
33 if preview:
34 return f"{message}. Last output: {preview}"
35 return message
36
37
38class WorkspaceCommandContext:

Callers 1

_run_uv_commandFunction · 0.85

Calls 1

_trim_output_previewFunction · 0.85

Tested by

no test coverage detected