fix(variant): respect TUI variant and enforce max in ultrawork mode
- keyword-detector: always set variant to 'max' when ultrawork/ulw keyword detected
- chat-message: remove variant resolution logic to passthrough TUI variant unchanged
- Tests updated to reflect new behavior
🤖 Generated with OhMyOpenCode assistance
This commit is contained in:
@@ -219,8 +219,8 @@ describe("keyword-detector session filtering", () => {
|
||||
expect(toastCalls).toContain("Ultrawork Mode Activated")
|
||||
})
|
||||
|
||||
test("should not override existing variant", async () => {
|
||||
// given - main session set with pre-existing variant
|
||||
test("should override existing variant when ultrawork keyword is used", async () => {
|
||||
// given - main session set with pre-existing variant from TUI
|
||||
setMainSession("main-123")
|
||||
|
||||
const toastCalls: string[] = []
|
||||
@@ -236,8 +236,8 @@ describe("keyword-detector session filtering", () => {
|
||||
output
|
||||
)
|
||||
|
||||
// then - existing variant should remain
|
||||
expect(output.message.variant).toBe("low")
|
||||
// then - ultrawork should override TUI variant to max
|
||||
expect(output.message.variant).toBe("max")
|
||||
expect(toastCalls).toContain("Ultrawork Mode Activated")
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user