@@ -41,6 +41,7 @@ waveterm/
4141```
4242
4343** Key Files:**
44+
4445- ** [ ` pkg/wconfig/settingsconfig.go ` ] ( pkg/wconfig/settingsconfig.go ) ** - Defines the ` SettingsType ` struct with all configuration fields
4546- ** [ ` schema/settings.json ` ] ( schema/settings.json ) ** - JSON Schema for validation and type checking
4647- ** [ ` pkg/wconfig/defaultconfig/settings.json ` ] ( pkg/wconfig/defaultconfig/settings.json ) ** - Default values for all settings
@@ -65,10 +66,12 @@ Wave Terminal supports block-level configuration overrides through the metadata
65663 . ** Block Metadata** - Override settings for individual blocks
6667
6768** Key Files for Block Overrides:**
69+
6870- ** [ ` pkg/waveobj/wtypemeta.go ` ] ( pkg/waveobj/wtypemeta.go ) ** - Defines the ` MetaTSType ` struct for block-level metadata
6971- Block metadata fields should match the corresponding settings fields for consistency
7072
7173** Frontend Usage:**
74+
7275``` typescript
7376// Use getOverrideConfigAtom for hierarchical config resolution
7477const settingValue = useAtomValue (getOverrideConfigAtom (blockId , " namespace:setting" ));
@@ -77,6 +80,7 @@ const settingValue = useAtomValue(getOverrideConfigAtom(blockId, "namespace:sett
7780```
7881
7982** Setting Block Metadata:**
83+
8084``` bash
8185# Set for current block
8286wsh setmeta namespace:setting=value
@@ -143,6 +147,7 @@ type MetaTSType struct {
143147```
144148
145149** Block Metadata Guidelines:**
150+
146151- Use pointer types (` *string ` , ` *bool ` , ` *int ` , ` *float64 ` ) for optional overrides
147152- JSON tags should exactly match the corresponding settings field
148153- This enables the hierarchical config system: block metadata → connection config → global settings
@@ -197,7 +202,7 @@ If your setting should have a default value, add it to [`pkg/wconfig/defaultconf
197202``` json
198203{
199204 "ai:preset" : " ai@global" ,
200- "ai:model" : " gpt-4o -mini" ,
205+ "ai:model" : " gpt-5 -mini" ,
201206 // ... existing defaults ...
202207
203208 "mynew:setting" : " default value" ,
@@ -239,6 +244,7 @@ task generate
239244```
240245
241246Or run them individually:
247+
242248``` bash
243249# Regenerate JSON schema
244250task build:schema
0 commit comments