Auto format toml (#1745)

Add recommended extension and configure it to auto format prompt.
This commit is contained in:
pakrym-oai
2025-07-30 18:37:00 -07:00
committed by GitHub
parent 35010812c7
commit 51b6bdefbe
17 changed files with 43 additions and 33 deletions

5
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"recommendations": [
"tamasfe.even-better-toml",
]
}

View File

@@ -6,5 +6,11 @@
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true,
}
},
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml",
"editor.formatOnSave": true,
},
"evenBetterToml.formatter.reorderArrays": true,
"evenBetterToml.formatter.reorderKeys": true,
}

View File

@@ -1,5 +1,4 @@
[workspace]
resolver = "2"
members = [
"ansi-escape",
"apply-patch",
@@ -17,6 +16,7 @@ members = [
"mcp-types",
"tui",
]
resolver = "2"
[workspace.package]
version = "0.0.0"
@@ -45,4 +45,3 @@ codegen-units = 1
[patch.crates-io]
# ratatui = { path = "../../ratatui" }
ratatui = { git = "https://github.com/nornagon/ratatui", branch = "nornagon-v0.29.0-patch" }

View File

@@ -1,7 +1,7 @@
[package]
edition = "2024"
name = "codex-ansi-escape"
version = { workspace = true }
edition = "2024"
[lib]
name = "codex_ansi_escape"
@@ -10,7 +10,7 @@ path = "src/lib.rs"
[dependencies]
ansi-to-tui = "7.0.0"
ratatui = { version = "0.29.0", features = [
"unstable-widget-ref",
"unstable-rendered-line-info",
"unstable-widget-ref",
] }
tracing = { version = "0.1.41", features = ["log"] }

View File

@@ -1,7 +1,7 @@
[package]
edition = "2024"
name = "codex-apply-patch"
version = { workspace = true }
edition = "2024"
[lib]
name = "codex_apply_patch"

View File

@@ -1,7 +1,7 @@
[package]
edition = "2024"
name = "codex-arg0"
version = { workspace = true }
edition = "2024"
[lib]
name = "codex_arg0"

View File

@@ -1,7 +1,7 @@
[package]
edition = "2024"
name = "codex-chatgpt"
version = { workspace = true }
edition = "2024"
[lints]
workspace = true
@@ -9,12 +9,12 @@ workspace = true
[dependencies]
anyhow = "1"
clap = { version = "4", features = ["derive"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
codex-common = { path = "../common", features = ["cli"] }
codex-core = { path = "../core" }
codex-login = { path = "../login" }
reqwest = { version = "0.12", features = ["json", "stream"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["full"] }
[dev-dependencies]

View File

@@ -1,7 +1,7 @@
[package]
edition = "2024"
name = "codex-cli"
version = { workspace = true }
edition = "2024"
[[bin]]
name = "codex"
@@ -20,8 +20,8 @@ clap = { version = "4", features = ["derive"] }
clap_complete = "4"
codex-arg0 = { path = "../arg0" }
codex-chatgpt = { path = "../chatgpt" }
codex-core = { path = "../core" }
codex-common = { path = "../common", features = ["cli"] }
codex-core = { path = "../core" }
codex-exec = { path = "../exec" }
codex-login = { path = "../login" }
codex-mcp-server = { path = "../mcp-server" }

View File

@@ -1,7 +1,7 @@
[package]
edition = "2024"
name = "codex-common"
version = { workspace = true }
edition = "2024"
[lints]
workspace = true
@@ -9,11 +9,11 @@ workspace = true
[dependencies]
clap = { version = "4", features = ["derive", "wrap_help"], optional = true }
codex-core = { path = "../core" }
toml = { version = "0.9", optional = true }
serde = { version = "1", optional = true }
toml = { version = "0.9", optional = true }
[features]
# Separate feature so that `clap` is not a mandatory dependency.
cli = ["clap", "toml", "serde"]
cli = ["clap", "serde", "toml"]
elapsed = []
sandbox_summary = []

View File

@@ -1,7 +1,7 @@
[package]
edition = "2024"
name = "codex-core"
version = { workspace = true }
edition = "2024"
[lib]
name = "codex_core"
@@ -15,10 +15,10 @@ anyhow = "1"
async-channel = "2.3.1"
base64 = "0.22"
bytes = "1.10.1"
codex-apply-patch = { path = "../apply-patch" }
codex-mcp-client = { path = "../mcp-client" }
chrono = { version = "0.4", features = ["serde"] }
codex-apply-patch = { path = "../apply-patch" }
codex-login = { path = "../login" }
codex-mcp-client = { path = "../mcp-client" }
dirs = "6"
env-flags = "0.1.1"
eventsource-stream = "0.2.3"
@@ -49,8 +49,8 @@ tracing = { version = "0.1.41", features = ["log"] }
tree-sitter = "0.25.8"
tree-sitter-bash = "0.25.0"
uuid = { version = "1", features = ["serde", "v4"] }
wildmatch = "2.4.0"
whoami = "1.6.0"
wildmatch = "2.4.0"
[target.'cfg(target_os = "linux")'.dependencies]

View File

@@ -1,7 +1,7 @@
[package]
edition = "2024"
name = "codex-exec"
version = { workspace = true }
edition = "2024"
[[bin]]
name = "codex-exec"
@@ -19,12 +19,12 @@ anyhow = "1"
chrono = "0.4.40"
clap = { version = "4", features = ["derive"] }
codex-arg0 = { path = "../arg0" }
codex-core = { path = "../core" }
codex-common = { path = "../common", features = [
"cli",
"elapsed",
"sandbox_summary",
] }
codex-core = { path = "../core" }
owo-colors = "4.2.0"
serde_json = "1"
shlex = "1.3.0"

View File

@@ -1,7 +1,7 @@
[package]
edition = "2024"
name = "codex-file-search"
version = { workspace = true }
edition = "2024"
[[bin]]
name = "codex-file-search"

View File

@@ -1,7 +1,7 @@
[package]
edition = "2024"
name = "codex-linux-sandbox"
version = { workspace = true }
edition = "2024"
[[bin]]
name = "codex-linux-sandbox"
@@ -19,8 +19,8 @@ anyhow = "1"
clap = { version = "4", features = ["derive"] }
codex-common = { path = "../common", features = ["cli"] }
codex-core = { path = "../core" }
libc = "0.2.172"
landlock = "0.4.1"
libc = "0.2.172"
seccompiler = "0.5.0"
[target.'cfg(target_os = "linux")'.dev-dependencies]

View File

@@ -1,7 +1,7 @@
[package]
edition = "2024"
name = "codex-login"
version = { workspace = true }
edition = "2024"
[lints]
workspace = true

View File

@@ -1,7 +1,7 @@
[package]
edition = "2024"
name = "codex-mcp-server"
version = { workspace = true }
edition = "2024"
[[bin]]
name = "codex-mcp-server"
@@ -23,9 +23,7 @@ schemars = "0.8.22"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
shlex = "1.3.0"
toml = "0.9"
tracing = { version = "0.1.41", features = ["log"] }
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
strum_macros = "0.27.2"
tokio = { version = "1", features = [
"io-std",
"macros",
@@ -33,8 +31,10 @@ tokio = { version = "1", features = [
"rt-multi-thread",
"signal",
] }
toml = "0.9"
tracing = { version = "0.1.41", features = ["log"] }
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
uuid = { version = "1", features = ["serde", "v4"] }
strum_macros = "0.27.2"
[dev-dependencies]
assert_cmd = "2"

View File

@@ -1,7 +1,7 @@
[package]
edition = "2024"
name = "mcp-types"
version = { workspace = true }
edition = "2024"
[lints]
workspace = true

View File

@@ -1,7 +1,7 @@
[package]
edition = "2024"
name = "codex-tui"
version = { workspace = true }
edition = "2024"
[[bin]]
name = "codex-tui"
@@ -20,12 +20,12 @@ base64 = "0.22.1"
clap = { version = "4", features = ["derive"] }
codex-ansi-escape = { path = "../ansi-escape" }
codex-arg0 = { path = "../arg0" }
codex-core = { path = "../core" }
codex-common = { path = "../common", features = [
"cli",
"elapsed",
"sandbox_summary",
] }
codex-core = { path = "../core" }
codex-file-search = { path = "../file-search" }
codex-login = { path = "../login" }
color-eyre = "0.6.3"