diff options
| author | Aiden Cline <[email protected]> | 2025-08-18 18:15:20 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-18 18:15:20 -0500 |
| commit | e08ec077b0ce73108f313eb7ca0a88163ee075e0 (patch) | |
| tree | 225c403d78548a4565a013f5da61927586f79de8 | |
| parent | 796245d146be682eca1875d7c0761c77bb1d66a1 (diff) | |
| download | opencode-e08ec077b0ce73108f313eb7ca0a88163ee075e0.tar.gz opencode-e08ec077b0ce73108f313eb7ca0a88163ee075e0.zip | |
fix: ensure name isn't added as field in options: {...} (#2053)
| -rw-r--r-- | packages/opencode/src/agent/agent.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.ts index fbfff7de2..5b7f74345 100644 --- a/packages/opencode/src/agent/agent.ts +++ b/packages/opencode/src/agent/agent.ts @@ -100,7 +100,7 @@ export namespace Agent { tools: {}, builtIn: false, } - const { model, prompt, tools, description, temperature, top_p, mode, permission, ...extra } = value + const { name, model, prompt, tools, description, temperature, top_p, mode, permission, ...extra } = value item.options = { ...item.options, ...extra, @@ -120,6 +120,8 @@ export namespace Agent { if (temperature != undefined) item.temperature = temperature if (top_p != undefined) item.topP = top_p if (mode) item.mode = mode + // just here for consistency & to prevent it from being added as an option + if (name) item.name = name if (permission ?? cfg.permission) { item.permission = mergeAgentPermissions(cfg.permission ?? {}, permission ?? {}) |
