mirror of
https://github.com/openai/codex.git
synced 2026-10-20 17:38:45 +00:00
Normalize formatting in docs, web assets, and sample scripts (#52256)
## What changed - Reformat Markdown tables and lists, login pages, inline visualization HTML, and sample JavaScript scripts. - Escape union-type pipes in Python SDK API tables so they render within their cells. - Keep the formatting-recipe test focused on the working directory and formatter commands by removing assertions on comment text. GitOrigin-RevId: ae46d5b40fd013553de8b5ccf2c41d76be65aba8
This commit is contained in:
committed by
copyberry
parent
75e0b4088e
commit
3b6ab3471a
@@ -221,12 +221,12 @@ Use `turn(...)` when you need low-level turn control (`stream()`, `steer()`,
|
||||
|
||||
These options have the same behavior on sync and async `run(...)` and `turn(...)`:
|
||||
|
||||
| Option | Behavior |
|
||||
| --- | --- |
|
||||
| `personality: Personality \| None = None` | `Personality.friendly` and `Personality.pragmatic` are deprecated and no longer select a style. See [deprecated personality selection](#deprecated-personality-selection). |
|
||||
| `service_tier: str | None = None` | Sets the thread's service tier for this and subsequent turns. |
|
||||
| `turn_service_tier: str | None = None` | Overrides the tier for a newly started turn only. `None` inherits the thread setting; `"default"` selects standard speed. Does not change the thread default and is ignored when input joins an active turn. |
|
||||
| `source: str | None = None` | Labels the caller that initiated a new turn, such as `"review_ui"`. This is metadata; it does not schedule work or grant authority. Ignored when input joins an active turn. |
|
||||
| Option | Behavior |
|
||||
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `personality: Personality \| None = None` | `Personality.friendly` and `Personality.pragmatic` are deprecated and no longer select a style. See [deprecated personality selection](#deprecated-personality-selection). |
|
||||
| `service_tier: str \| None = None` | Sets the thread's service tier for this and subsequent turns. |
|
||||
| `turn_service_tier: str \| None = None` | Overrides the tier for a newly started turn only. `None` inherits the thread setting; `"default"` selects standard speed. Does not change the thread default and is ignored when input joins an active turn. |
|
||||
| `source: str \| None = None` | Labels the caller that initiated a new turn, such as `"review_ui"`. This is metadata; it does not schedule work or grant authority. Ignored when input joins an active turn. |
|
||||
|
||||
`ExternalMessage`, `turn_service_tier`, `source`, and explicit `include_turns`
|
||||
on resume/fork require Codex CLI 0.151.0 or newer. The SDK raises `CodexError`
|
||||
@@ -325,11 +325,11 @@ message = ExternalMessage(
|
||||
result = thread.run(message)
|
||||
```
|
||||
|
||||
| Field | Meaning |
|
||||
| --- | --- |
|
||||
| `tool_name: str` | Required, nonempty name of the tool or application delivering the message. |
|
||||
| `content` | Required text, or a sequence of structured content dictionaries or generated `FunctionCallOutputContentItem` models. Structured image content requires inline data URLs. |
|
||||
| `namespace: str | None = None` | Optional namespace for the tool name. |
|
||||
| Field | Meaning |
|
||||
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `tool_name: str` | Required, nonempty name of the tool or application delivering the message. |
|
||||
| `content` | Required text, or a sequence of structured content dictionaries or generated `FunctionCallOutputContentItem` models. Structured image content requires inline data URLs. |
|
||||
| `namespace: str \| None = None` | Optional namespace for the tool name. |
|
||||
|
||||
Pass one `ExternalMessage` as the complete input to `run(...)` or `turn(...)`.
|
||||
It starts a turn when the thread is idle or joins an active regular turn. It
|
||||
|
||||
@@ -115,26 +115,18 @@ def test_root_fmt_recipes_use_shared_formatter_driver() -> None:
|
||||
)
|
||||
actual = {
|
||||
"working_directory": lines[0],
|
||||
"fmt_comment": next(line for line in reversed(lines[:fmt_index]) if line.startswith("#")),
|
||||
"fmt_commands": [
|
||||
line.strip()
|
||||
for line in lines[fmt_index + 1 : fmt_check_index]
|
||||
if line.strip() and not line.startswith("#")
|
||||
],
|
||||
"fmt_check_comment": next(
|
||||
line for line in reversed(lines[:fmt_check_index]) if line.startswith("#")
|
||||
),
|
||||
"fmt_check_commands": [
|
||||
line.strip() for line in lines[fmt_check_index + 1 : next_recipe_index] if line.strip()
|
||||
],
|
||||
}
|
||||
expected = {
|
||||
"working_directory": 'set working-directory := "codex-rs"',
|
||||
"fmt_comment": (
|
||||
"# Format the justfile, Rust, Bazel/Starlark, Python SDK code, and Python scripts."
|
||||
),
|
||||
"fmt_commands": ["@{{ python }} ../scripts/format.py"],
|
||||
"fmt_check_comment": "# Check formatting without modifying files.",
|
||||
"fmt_check_commands": ["@{{ python }} ../scripts/format.py --check"],
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user