You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aiprompts/config-system.md
+21-75Lines changed: 21 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,50 +152,7 @@ type MetaTSType struct {
152
152
- JSON tags should exactly match the corresponding settings field
153
153
- This enables the hierarchical config system: block metadata → connection config → global settings
154
154
155
-
### Step 2: Add to JSON Schema
156
-
157
-
Edit [`schema/settings.json`](schema/settings.json) and add your field to the `properties` section:
158
-
159
-
```json
160
-
{
161
-
"$defs": {
162
-
"SettingsType": {
163
-
"properties": {
164
-
// ... existing properties ...
165
-
166
-
"mynew:setting": {
167
-
"type": "string"
168
-
},
169
-
"mynew:boolsetting": {
170
-
"type": "boolean"
171
-
},
172
-
"mynew:numbersetting": {
173
-
"type": "number"
174
-
},
175
-
"mynew:intsetting": {
176
-
"type": "integer"
177
-
},
178
-
"mynew:arraysetting": {
179
-
"items": {
180
-
"type": "string"
181
-
},
182
-
"type": "array"
183
-
}
184
-
}
185
-
}
186
-
}
187
-
}
188
-
```
189
-
190
-
**Schema Type Mapping:**
191
-
192
-
- Go `string` → JSON Schema `"string"`
193
-
- Go `bool` → JSON Schema `"boolean"`
194
-
- Go `float64` → JSON Schema `"number"`
195
-
- Go `int64` → JSON Schema `"integer"`
196
-
- Go `[]string` → JSON Schema `"array"` with `"items": {"type": "string"}`
197
-
198
-
### Step 3: Set Default Value (Optional)
155
+
### Step 2: Set Default Value (Optional)
199
156
200
157
If your setting should have a default value, add it to [`pkg/wconfig/defaultconfig/settings.json`](pkg/wconfig/defaultconfig/settings.json):
201
158
@@ -218,7 +175,7 @@ If your setting should have a default value, add it to [`pkg/wconfig/defaultconf
218
175
- Ensure defaults make sense for the typical user experience
219
176
- Keep defaults conservative and safe
220
177
221
-
### Step 4: Update Documentation
178
+
### Step 3: Update Documentation
222
179
223
180
Add your new setting to the configuration table in [`docs/docs/config.mdx`](docs/docs/config.mdx):
224
181
@@ -234,28 +191,23 @@ Add your new setting to the configuration table in [`docs/docs/config.mdx`](docs
234
191
235
192
Also update the default configuration example in the same file if you added defaults.
236
193
237
-
### Step 5: Regenerate Schema and TypeScript Types
194
+
### Step 4: Regenerate Schema and TypeScript Types
238
195
239
-
Run the build tasks to regenerate schema and TypeScript types:
196
+
Run the generate task to automatically regenerate the JSON schema and TypeScript types:
240
197
241
198
```bash
242
-
task build:schema
243
199
task generate
244
200
```
245
201
246
-
Or run them individually:
247
-
248
-
```bash
249
-
# Regenerate JSON schema
250
-
task build:schema
251
-
252
-
# Regenerate TypeScript types
253
-
go run cmd/generatets/main-generatets.go
254
-
```
202
+
**What this does:**
203
+
- Runs `task build:schema` (automatically generates JSON schema from Go structs)
204
+
- Generates TypeScript type definitions in [`frontend/types/gotypes.d.ts`](frontend/types/gotypes.d.ts)
205
+
- Generates RPC client APIs
206
+
- Generates metadata constants
255
207
256
-
This will update the schema files and [`frontend/types/gotypes.d.ts`](frontend/types/gotypes.d.ts) with your new settings.
208
+
**Note:** The JSON schema in [`schema/settings.json`](schema/settings.json) is **automatically generated** from the Go struct definitions - you don't need to edit it manually.
| term:shiftenternewline | bool | when enabled, Shift+Enter sends escape sequence + newline (\u001b\n) instead of carriage return, useful for claude code and similar AI coding tools (default false) |
63
+
| term:macoptionismeta | bool | on macOS, treat the Option key as Meta key for terminal keybindings (default false) |
63
64
| editor:minimapenabled | bool | set to false to disable editor minimap |
64
65
| editor:stickyscrollenabled | bool | enables monaco editor's stickyScroll feature (pinning headers of current context, e.g. class names, method names, etc.), defaults to false |
65
66
| editor:wordwrap | bool | set to true to enable word wrapping in the editor (defaults to false) |
0 commit comments