-
-
Notifications
You must be signed in to change notification settings - Fork 353
feat(codex): Add support for codex /fast mode #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -321,6 +321,7 @@ export class SyncEngine { | |
| agent: 'claude' | 'codex' | 'cursor' | 'gemini' | 'opencode' = 'claude', | ||
| model?: string, | ||
| modelReasoningEffort?: string, | ||
| serviceTier?: string, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MAJOR] Fast mode is wired for initial spawn only; inactive-session resume still drops it.
Suggested fix: const spawnResult = await this.rpcGateway.spawnSession(
targetMachine.id,
metadata.path,
flavor,
session.model ?? undefined,
session.modelReasoningEffort ?? undefined,
session.serviceTier ?? undefined,
undefined,
undefined,
resumeToken,
session.effort ?? undefined
)Persist |
||
| yolo?: boolean, | ||
| sessionType?: 'simple' | 'worktree', | ||
| worktreeName?: string, | ||
|
|
@@ -333,6 +334,7 @@ export class SyncEngine { | |
| agent, | ||
| model, | ||
| modelReasoningEffort, | ||
| serviceTier, | ||
| yolo, | ||
| sessionType, | ||
| worktreeName, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| import type { AgentType, CodexServiceTier } from './types' | ||
| import { CODEX_FAST_SERVICE_TIER } from './types' | ||
| import { useTranslation } from '@/lib/use-translation' | ||
|
|
||
| export function FastModeToggle(props: { | ||
| agent: AgentType | ||
| serviceTier: CodexServiceTier | ||
| isDisabled: boolean | ||
| onToggle: (value: CodexServiceTier) => void | ||
| }) { | ||
| const { t } = useTranslation() | ||
|
|
||
| if (props.agent !== 'codex') { | ||
| return null | ||
| } | ||
|
|
||
| const isEnabled = props.serviceTier === CODEX_FAST_SERVICE_TIER | ||
|
|
||
| return ( | ||
| <div className="flex flex-col gap-1.5 px-3 py-3"> | ||
| <label className="text-xs font-medium text-[var(--app-hint)]"> | ||
| {t('newSession.fastMode')} | ||
| </label> | ||
| <div className="flex items-center justify-between gap-3"> | ||
| <div className="flex flex-col"> | ||
| <span className="text-sm text-[var(--app-fg)]"> | ||
| {t('newSession.fastMode.title')} | ||
| </span> | ||
| <span className="text-xs text-[var(--app-hint)]"> | ||
| {t('newSession.fastMode.desc')} | ||
| </span> | ||
| </div> | ||
| <label className="relative inline-flex h-5 w-9 items-center"> | ||
| <input | ||
| type="checkbox" | ||
| checked={isEnabled} | ||
| onChange={(e) => props.onToggle(e.target.checked ? CODEX_FAST_SERVICE_TIER : 'default')} | ||
| disabled={props.isDisabled} | ||
| className="peer sr-only" | ||
| /> | ||
| <span className="absolute inset-0 rounded-full bg-[var(--app-border)] transition-colors peer-checked:bg-[var(--app-link)] peer-disabled:opacity-50" /> | ||
| <span className="absolute left-0.5 h-4 w-4 rounded-full bg-[var(--app-bg)] transition-transform peer-checked:translate-x-4 peer-disabled:opacity-50" /> | ||
| </label> | ||
| </div> | ||
| </div> | ||
| ) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[MAJOR]
--service-tieris swallowed in local/terminal mode.This new branch parses the flag into
options.serviceTier, but it never adds the original CLI args back intounknownArgs. The local launcher only forwardssession.codexArgsto the nativecodexprocess (cli/src/codex/codexLocalLauncher.ts:18-49), sohapi codex --service-tier fastwill silently start at the default tier.Suggested fix: