mirror of
https://github.com/sst/opencode.git
synced 2025-08-04 13:30:52 +00:00
docs: config schema
This commit is contained in:
parent
ef74d97491
commit
9c6aa82ac1
5 changed files with 25 additions and 8 deletions
|
@ -51,7 +51,7 @@ Project configuration is optional. You can place an `opencode.json` file in the
|
|||
|
||||
```json title="opencode.json"
|
||||
{
|
||||
"$schema": "https://opencode.ai/schemas/opencode.json"
|
||||
"$schema": "http://opencode.ai/config.json"
|
||||
}
|
||||
```
|
||||
|
||||
|
|
3
opencode.json
Normal file
3
opencode.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"$schema": "http://opencode.ai/config.json"
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"provider": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
|
@ -69,7 +72,10 @@
|
|||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": ["context", "output"],
|
||||
"required": [
|
||||
"context",
|
||||
"output"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"id": {
|
||||
|
@ -84,7 +90,9 @@
|
|||
"additionalProperties": {}
|
||||
}
|
||||
},
|
||||
"required": ["models"],
|
||||
"required": [
|
||||
"models"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
|
@ -112,7 +120,10 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"required": ["type", "command"],
|
||||
"required": [
|
||||
"type",
|
||||
"command"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
{
|
||||
|
@ -126,7 +137,10 @@
|
|||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["type", "url"],
|
||||
"required": [
|
||||
"type",
|
||||
"url"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
]
|
||||
|
@ -135,5 +149,4 @@
|
|||
},
|
||||
"additionalProperties": false,
|
||||
"$schema": "http://json-schema.org/draft-07/schema#"
|
||||
}
|
||||
|
||||
}
|
|
@ -111,7 +111,7 @@ if (!snapshot) {
|
|||
!lower.includes("chore:") &&
|
||||
!lower.includes("ci:") &&
|
||||
!lower.includes("docs:") &&
|
||||
!lower.includes("doc:") &&
|
||||
!lower.includes("doc:")
|
||||
)
|
||||
})
|
||||
.join("\n")
|
||||
|
|
|
@ -50,6 +50,7 @@ export namespace Config {
|
|||
|
||||
export const Info = z
|
||||
.object({
|
||||
$schema: z.string().optional(),
|
||||
provider: z
|
||||
.record(
|
||||
ModelsDev.Provider.partial().extend({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue