refactor(tui): finish V2 theme migration (#38383)
This commit is contained in:
parent
36979c9641
commit
b6e14b5a74
15 changed files with 46 additions and 119 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { describe, expect } from "bun:test"
|
||||
import { describe, expect, test } from "bun:test"
|
||||
import fs from "fs/promises"
|
||||
import path from "path"
|
||||
import { Effect, Schema } from "effect"
|
||||
|
|
@ -23,6 +23,10 @@ const defaultPermissions = [
|
|||
{ action: "external_directory", resource: "*", effect: "ask" },
|
||||
] satisfies PermissionV2.Ruleset
|
||||
|
||||
test("rejects named agent color tokens", () => {
|
||||
expect(() => decode({ agents: { reviewer: { color: "warning" } } })).toThrow()
|
||||
})
|
||||
|
||||
describe("ConfigAgentPlugin.Plugin", () => {
|
||||
it.effect("matches POSIX paths against home-relative permissions", () =>
|
||||
Effect.gen(function* () {
|
||||
|
|
@ -160,7 +164,7 @@ describe("ConfigAgentPlugin.Plugin", () => {
|
|||
description: "Reviews changes",
|
||||
mode: "subagent",
|
||||
hidden: true,
|
||||
color: "warning",
|
||||
color: "#ff6b6b",
|
||||
steps: 12,
|
||||
request: {
|
||||
headers: { first: "one", shared: "first" },
|
||||
|
|
@ -197,7 +201,7 @@ describe("ConfigAgentPlugin.Plugin", () => {
|
|||
description: "Reviews changes",
|
||||
mode: "subagent",
|
||||
hidden: true,
|
||||
color: "warning",
|
||||
color: "#ff6b6b",
|
||||
steps: 12,
|
||||
model: { providerID: "anthropic", id: "claude-sonnet" },
|
||||
})
|
||||
|
|
|
|||
|
|
@ -738,7 +738,7 @@ describe("Config", () => {
|
|||
system: "Find regressions.",
|
||||
mode: "subagent",
|
||||
hidden: false,
|
||||
color: "warning",
|
||||
color: "#ff6b6b",
|
||||
steps: 12,
|
||||
disabled: false,
|
||||
permissions: [{ action: "edit", resource: "*", effect: "deny" }],
|
||||
|
|
@ -824,7 +824,7 @@ describe("Config", () => {
|
|||
expect(reviewer?.system).toBe("Find regressions.")
|
||||
expect(reviewer?.mode).toBe("subagent")
|
||||
expect(reviewer?.hidden).toBe(false)
|
||||
expect(reviewer?.color).toBe("warning")
|
||||
expect(reviewer?.color).toBe("#ff6b6b")
|
||||
expect(reviewer?.steps).toBe(12)
|
||||
expect(reviewer?.disabled).toBe(false)
|
||||
expect(reviewer?.permissions).toEqual([{ action: "edit", resource: "*", effect: "deny" }])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue