MCPcopy
hub / github.com/openai/plugins / optional_text

Function optional_text

plugins/codex-security/scripts/workbench_validation.py:38–44  ·  view source on GitHub ↗
(value: str | None, *, maximum: int | None = None)

Source from the content-addressed store, hash-verified

36
37
38def optional_text(value: str | None, *, maximum: int | None = None) -> str | None:
39 if value is None:
40 return None
41 normalized = value.strip()
42 if maximum is not None and len(normalized) > maximum:
43 raise SystemExit(f"Text value must be no longer than {maximum} characters.")
44 return normalized or None
45
46
47def main() -> None:

Callers 15

resolve_git_commitFunction · 0.90
require_occurrenceFunction · 0.90
create_workspaceFunction · 0.90
latest_workspaceFunction · 0.90
save_workspaceFunction · 0.90
begin_diff_resolutionFunction · 0.90
set_diff_targetFunction · 0.90
fail_scanFunction · 0.90
cancel_scanFunction · 0.90
mark_handoff_deliveredFunction · 0.90
set_finding_triageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected