Repository navigation
Commit 4789bfd
committed
fix(config): preserve description field from markdown agent frontmatter
When loading agents from markdown files (.opencode/agents/*.md), the
description field from YAML frontmatter could be lost during the schema
decode process. The normalize() function relied on spreading all decoded
properties via ...agent, but when the Schema.decodeTo wrapper interferes
with the decode, description may not be included.
Two changes:
1. normalize() now explicitly carries description through the return value
2. load() now falls back to the raw frontmatter description if the schema
decoded result lacks it
Fixes anomalyco#278311 parent c0a8b50 commit 4789bfd
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
134 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
135 | 140 | | |
136 | 141 | | |
137 | 142 | | |
| |||
0 commit comments