test(think-mode): update tests for variant-only behavior
Update test assertions to verify hook only sets output.message.variant and no longer modifies output.message.model. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -43,7 +43,7 @@ describe("createThinkModeHook", () => {
|
|||||||
clearThinkModeState(sessionID)
|
clearThinkModeState(sessionID)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("sets high variant and switches model when think keyword is present", async () => {
|
it("sets high variant when think keyword is present", async () => {
|
||||||
// given
|
// given
|
||||||
const hook = createThinkModeHook()
|
const hook = createThinkModeHook()
|
||||||
const input = createHookInput({
|
const input = createHookInput({
|
||||||
@@ -58,13 +58,10 @@ describe("createThinkModeHook", () => {
|
|||||||
|
|
||||||
// then
|
// then
|
||||||
expect(output.message.variant).toBe("high")
|
expect(output.message.variant).toBe("high")
|
||||||
expect(output.message.model).toEqual({
|
expect(output.message.model).toBeUndefined()
|
||||||
providerID: "github-copilot",
|
|
||||||
modelID: "claude-opus-4-6-high",
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it("supports dotted model IDs by switching to normalized high variant", async () => {
|
it("sets high variant for dotted model IDs", async () => {
|
||||||
// given
|
// given
|
||||||
const hook = createThinkModeHook()
|
const hook = createThinkModeHook()
|
||||||
const input = createHookInput({
|
const input = createHookInput({
|
||||||
@@ -79,10 +76,7 @@ describe("createThinkModeHook", () => {
|
|||||||
|
|
||||||
// then
|
// then
|
||||||
expect(output.message.variant).toBe("high")
|
expect(output.message.variant).toBe("high")
|
||||||
expect(output.message.model).toEqual({
|
expect(output.message.model).toBeUndefined()
|
||||||
providerID: "github-copilot",
|
|
||||||
modelID: "gpt-5-4-high",
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it("skips when message variant is already set", async () => {
|
it("skips when message variant is already set", async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user