feat: add reasoning effort support for Codex models

- Add ReasoningEffortSelector component for UI selection
- Integrate reasoning effort in feature creation/editing dialogs
- Add reasoning effort support to phase model selector
- Update agent service and board actions to handle reasoning effort
- Add reasoning effort fields to feature and settings types
- Update model selector and agent info panel with reasoning effort display
- Enhance agent context parser for reasoning effort processing

Reasoning effort allows fine-tuned control over Codex model reasoning
capabilities, providing options from 'none' to 'xhigh' for different
task complexity requirements.
This commit is contained in:
DhanushSantosh
2026-01-08 20:43:36 +05:30
parent 8a9715adef
commit 4dcf54146c
13 changed files with 361 additions and 59 deletions

View File

@@ -3,6 +3,7 @@
*/
import type { PlanningMode, ThinkingLevel } from './settings.js';
import type { ReasoningEffort } from './provider.js';
/**
* A single entry in the description history
@@ -49,6 +50,7 @@ export interface Feature {
branchName?: string; // Name of the feature branch (undefined = use current worktree)
skipTests?: boolean;
thinkingLevel?: ThinkingLevel;
reasoningEffort?: ReasoningEffort;
planningMode?: PlanningMode;
requirePlanApproval?: boolean;
planSpec?: {

View File

@@ -11,6 +11,7 @@ import type { CursorModelId } from './cursor-models.js';
import { CURSOR_MODEL_MAP, getAllCursorModelIds } from './cursor-models.js';
import type { PromptCustomization } from './prompts.js';
import type { CodexSandboxMode, CodexApprovalPolicy } from './codex.js';
import type { ReasoningEffort } from './provider.js';
// Re-export ModelAlias for convenience
export type { ModelAlias };
@@ -108,14 +109,18 @@ const DEFAULT_CODEX_ADDITIONAL_DIRS: string[] = [];
/**
* PhaseModelEntry - Configuration for a single phase model
*
* Encapsulates both the model selection and optional thinking level
* for Claude models. Cursor models handle thinking internally.
* Encapsulates the model selection and optional reasoning/thinking capabilities:
* - Claude models: Use thinkingLevel for extended thinking
* - Codex models: Use reasoningEffort for reasoning intensity
* - Cursor models: Handle thinking internally
*/
export interface PhaseModelEntry {
/** The model to use (Claude alias or Cursor model ID) */
model: ModelAlias | CursorModelId;
/** The model to use (Claude alias, Cursor model ID, or Codex model ID) */
model: ModelAlias | CursorModelId | CodexModelId;
/** Extended thinking level (only applies to Claude models, defaults to 'none') */
thinkingLevel?: ThinkingLevel;
/** Reasoning effort level (only applies to Codex models, defaults to 'none') */
reasoningEffort?: ReasoningEffort;
}
/**