mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-31 05:15:32 +00:00
fix(TUI): fix agent types agents modal (#1942)
This commit is contained in:
parent
bcd1dddcbe
commit
156cc6cffe
3 changed files with 24 additions and 26 deletions
|
|
@ -13,6 +13,7 @@ export namespace Agent {
|
|||
name: z.string(),
|
||||
description: z.string().optional(),
|
||||
mode: z.union([z.literal("subagent"), z.literal("primary"), z.literal("all")]),
|
||||
builtIn: z.boolean(),
|
||||
topP: z.number().optional(),
|
||||
temperature: z.number().optional(),
|
||||
permission: z.object({
|
||||
|
|
@ -58,6 +59,7 @@ export namespace Agent {
|
|||
options: {},
|
||||
permission: agentPermission,
|
||||
mode: "subagent",
|
||||
builtIn: true,
|
||||
},
|
||||
build: {
|
||||
name: "build",
|
||||
|
|
@ -65,6 +67,7 @@ export namespace Agent {
|
|||
options: {},
|
||||
permission: agentPermission,
|
||||
mode: "primary",
|
||||
builtIn: true,
|
||||
},
|
||||
plan: {
|
||||
name: "plan",
|
||||
|
|
@ -76,6 +79,7 @@ export namespace Agent {
|
|||
patch: false,
|
||||
},
|
||||
mode: "primary",
|
||||
builtIn: true,
|
||||
},
|
||||
}
|
||||
for (const [key, value] of Object.entries(cfg.agent ?? {})) {
|
||||
|
|
@ -91,6 +95,7 @@ export namespace Agent {
|
|||
permission: agentPermission,
|
||||
options: {},
|
||||
tools: {},
|
||||
builtIn: false,
|
||||
}
|
||||
const { model, prompt, tools, description, temperature, top_p, mode, permission, ...extra } = value
|
||||
item.options = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue