Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a05830c
feat(experiments): add dynamic thinking effort experimental setting
easonliang28 Aug 21, 2026
1cf4f0d
test(experiments): cover explicit false and omitted dynamic thinking …
easonliang28 Aug 21, 2026
6ea45b3
feat(task): task-local thinking effort state, per-request override, a…
easonliang28 Aug 21, 2026
5db5cf4
Merge remote-tracking branch 'upstream/main' into feat/dte-1-experiment
easonliang28 Aug 21, 2026
9275aa1
Merge remote-tracking branch 'upstream/main' into feat/dte-2-task-state
easonliang28 Aug 22, 2026
14d1f35
fix(task): keep override restore value current across profile switches
easonliang28 Aug 22, 2026
90b47b0
docs(task): JSDoc for diff-touched functions flagged by CodeRabbit
easonliang28 Aug 22, 2026
d64a473
Merge remote-tracking branch 'upstream/main' into feat/dte-3-native-tool
easonliang28 Aug 22, 2026
2d53e91
Merge remote-tracking branch 'origin/feat/dte-1-experiment' into feat…
easonliang28 Aug 22, 2026
fcc3cf4
feat(task): set_thinking_effort native tool
easonliang28 Aug 23, 2026
0ab4a60
Merge remote-tracking branch 'upstream/main' into feat/dte-3-native-tool
easonliang28 Aug 23, 2026
c3df095
feat(webview): thinking effort surfaces — header chip, composer toggl…
easonliang28 Aug 23, 2026
7dde456
fix(webview): add accessible name to the icon-only thinking effort to…
easonliang28 Aug 23, 2026
ada7c56
test(webview): cover the task-local thinking effort state push branch
easonliang28 Aug 23, 2026
96cf256
test(webview): assert the localized accessible name on the thinking e…
easonliang28 Aug 24, 2026
ac84f5e
test(webview): model the no-override thinking effort shape after the …
easonliang28 Aug 24, 2026
784ee90
feat(webview): show thinking-effort toggle + chip without the experim…
easonliang28 Aug 24, 2026
e298f26
fix(i18n): drop emoji prefix and add missing space in thinking-effort…
easonliang28 Aug 24, 2026
03037d5
feat(webview): show current effort value + hover border on composer t…
easonliang28 Aug 24, 2026
e0b2112
test(webview): regenerate thinking-effort toggle baselines (value + h…
easonliang28 Aug 24, 2026
90916a1
Apply the composer thinking effort to the next task when none is open
easonliang28 Aug 24, 2026
3eca87c
Compact the thinking-effort toggle menu padding
easonliang28 Aug 24, 2026
7c48c6b
Capture the toggle menu element in the visual baseline
easonliang28 Aug 24, 2026
72402a1
Regenerate thinking-effort toggle menu baselines (menu capture + comp…
easonliang28 Aug 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions packages/types/src/__tests__/experiment.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { experimentIds, experimentIdsSchema, experimentsSchema } from "../experiment.js"

describe("dynamicThinkingEffort experiment", () => {
it("is part of the experiment id enum", () => {
expect(experimentIds).toContain("dynamicThinkingEffort")
expect(experimentIdsSchema.safeParse("dynamicThinkingEffort").success).toBe(true)
})

it("parses enabled and disabled states", () => {
expect(experimentsSchema.parse({ dynamicThinkingEffort: true })).toEqual({ dynamicThinkingEffort: true })
expect(experimentsSchema.parse({ dynamicThinkingEffort: false })).toEqual({ dynamicThinkingEffort: false })
expect(experimentsSchema.parse({})).toEqual({})
})

it("rejects non-boolean values", () => {
expect(experimentsSchema.safeParse({ dynamicThinkingEffort: "yes" }).success).toBe(false)
expect(experimentIdsSchema.safeParse("dynamic-thinking-effort").success).toBe(false)
})
})
2 changes: 2 additions & 0 deletions packages/types/src/experiment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const experimentIds = [
"runSlashCommand",
"customTools",
"parallelToolExecution",
"dynamicThinkingEffort",
] as const

export const experimentIdsSchema = z.enum(experimentIds)
Expand All @@ -28,6 +29,7 @@ export const experimentsSchema = z.object({
runSlashCommand: z.boolean().optional(),
customTools: z.boolean().optional(),
parallelToolExecution: z.boolean().optional(),
dynamicThinkingEffort: z.boolean().optional(),
})

export type Experiments = z.infer<typeof experimentsSchema>
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const toolNames = [
"run_slash_command",
"skill",
"generate_image",
"set_thinking_effort",
"custom_tool",
"invalid_tool_call",
] as const
Expand Down
16 changes: 16 additions & 0 deletions packages/types/src/vscode-extension-host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,12 @@ export type ExtensionState = Pick<
clineMessages: ClineMessage[]
currentTaskId?: string
currentTaskItem?: HistoryItem
// DTE series 4/5: task-local thinking effort override for the current task.
// Present only while a task-local override is active (set by the composer
// toggle, the set_thinking_effort tool, or a parent orchestrator); undefined
// otherwise, in which case the webview derives the display from settings ->
// model default. Authoritative state stays extension-side.
taskThinkingEffort?: { effort: string; source: string }
currentTaskTodos?: TodoItem[] // Initial todos for the current task
apiConfiguration: ProviderSettings
uriScheme?: string
Expand Down Expand Up @@ -501,6 +507,7 @@ export interface WebviewMessage {
| "openMention"
| "cancelTask"
| "cancelAutoApproval"
| "setTaskThinkingEffort"
| "updateVSCodeSetting"
| "getVSCodeSetting"
| "vsCodeSetting"
Expand Down Expand Up @@ -648,6 +655,11 @@ export interface WebviewMessage {
| "themeFixtureProbeResponse"
text?: string
taskId?: string
// DTE series 4/5: task-local thinking effort set from the composer toggle
// (message type "setTaskThinkingEffort"). Task-local only; persisted settings
// are never touched.
effort?: string
reason?: string
editedMessageContent?: string
tab?: "settings" | "history" | "mcp" | "modes" | "chat" | "marketplace" | "cloud"
disabled?: boolean
Expand Down Expand Up @@ -847,6 +859,7 @@ export interface ClineSayTool {
| "runSlashCommand"
| "updateTodoList"
| "skill"
| "thinkingEffort"
path?: string
// For readCommandOutput
readStart?: number
Expand Down Expand Up @@ -904,6 +917,9 @@ export interface ClineSayTool {
description?: string
// Properties for skill tool
skill?: string
// Properties for thinkingEffort (DTE series 3/5)
effort?: string
refusal?: string
}

export interface ClineAskUseMcpServer {
Expand Down
9 changes: 9 additions & 0 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
retiredProviderIdentifiers,
type ProviderSettings,
type ModelInfo,
type ReasoningEffortExtended,
} from "@roo-code/types"

import { getRouterRemovalMessage } from "../core/config/routerRemoval"
Expand Down Expand Up @@ -115,6 +116,14 @@ export interface ApiHandlerCreateMessageMetadata {
* when the user clicks stop, preventing wasted API tokens/compute on the provider side.
*/
abortSignal?: AbortSignal
/**
* Per-request thinking effort override (DTE series 2/5).
* When defined, takes precedence over the settings-derived `reasoningEffort`
* wherever the effective effort is resolved (see `resolveEffectiveReasoningEffort`).
* Task-scoped and transient: it applies to this request only (the next request
* after being set — no mid-stream effect) and is never persisted to settings.
*/
reasoningEffort?: ReasoningEffortExtended
}

export interface ApiHandler {
Expand Down
Loading
Loading