fix(core): respect v2 default agents (#30969)
This commit is contained in:
parent
fff36b70bc
commit
02a5ae6585
11 changed files with 155 additions and 18 deletions
|
|
@ -244,6 +244,7 @@ describe("Config", () => {
|
|||
JSON.stringify({
|
||||
shell: "/bin/bash",
|
||||
model: "anthropic/claude",
|
||||
default_agent: "reviewer",
|
||||
autoupdate: "notify",
|
||||
share: "disabled",
|
||||
enterprise: { url: "https://share.example.com" },
|
||||
|
|
@ -328,6 +329,7 @@ describe("Config", () => {
|
|||
expect(documents).toHaveLength(1)
|
||||
expect(documents[0]?.info.shell).toBe("/bin/bash")
|
||||
expect(documents[0]?.info.model).toBe("anthropic/claude")
|
||||
expect(documents[0]?.info.default_agent).toBe("reviewer")
|
||||
expect(documents[0]?.info.autoupdate).toBe("notify")
|
||||
expect(documents[0]?.info.share).toBe("disabled")
|
||||
expect(documents[0]?.info.enterprise).toEqual({ url: "https://share.example.com" })
|
||||
|
|
@ -427,6 +429,7 @@ describe("Config", () => {
|
|||
path.join(tmp.path, "opencode.json"),
|
||||
JSON.stringify({
|
||||
shell: "/bin/zsh",
|
||||
default_agent: "reviewer",
|
||||
snapshot: false,
|
||||
autoshare: true,
|
||||
permission: {
|
||||
|
|
@ -487,6 +490,7 @@ describe("Config", () => {
|
|||
expect(documents).toHaveLength(1)
|
||||
expect(documents[0]?.info).toBeInstanceOf(Config.Info)
|
||||
expect(documents[0]?.info.shell).toBe("/bin/zsh")
|
||||
expect(documents[0]?.info.default_agent).toBe("reviewer")
|
||||
expect(documents[0]?.info.snapshots).toBe(false)
|
||||
expect(documents[0]?.info.share).toBe("auto")
|
||||
expect(documents[0]?.info.permissions).toEqual([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue