feat(tui): allow theme colors in agent customization (#11444)

This commit is contained in:
Idris Gadi
2026-02-04 02:39:21 +05:30
committed by GitHub
parent 6b5cf936a2
commit 95211a8854
4 changed files with 26 additions and 9 deletions

View File

@@ -15,6 +15,7 @@ test("agent color parsed from project config", async () => {
$schema: "https://opencode.ai/config.json",
agent: {
build: { color: "#FFA500" },
plan: { color: "primary" },
},
}),
)
@@ -25,6 +26,7 @@ test("agent color parsed from project config", async () => {
fn: async () => {
const cfg = await Config.get()
expect(cfg.agent?.["build"]?.color).toBe("#FFA500")
expect(cfg.agent?.["plan"]?.color).toBe("primary")
},
})
})
@@ -38,6 +40,7 @@ test("Agent.get includes color from config", async () => {
$schema: "https://opencode.ai/config.json",
agent: {
plan: { color: "#A855F7" },
build: { color: "accent" },
},
}),
)
@@ -48,6 +51,8 @@ test("Agent.get includes color from config", async () => {
fn: async () => {
const plan = await AgentSvc.get("plan")
expect(plan?.color).toBe("#A855F7")
const build = await AgentSvc.get("build")
expect(build?.color).toBe("accent")
},
})
})