Skip to content

Commit 920aa7a

Browse files
committed
feat(cloud-agent): support codex cloud runs
1 parent a167fe7 commit 920aa7a

File tree

20 files changed

+2895
-2711
lines changed

20 files changed

+2895
-2711
lines changed

apps/code/src/main/services/agent/service.ts

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
POSTHOG_NOTIFICATIONS,
1919
} from "@posthog/agent";
2020
import { hydrateSessionJsonl } from "@posthog/agent/adapters/claude/session/jsonl-hydration";
21-
import { getEffortOptions } from "@posthog/agent/adapters/claude/session/models";
21+
import { getReasoningEffortOptions } from "@posthog/agent/adapters/reasoning-effort";
2222
import { Agent } from "@posthog/agent/agent";
2323
import {
2424
getAvailableCodexModes,
@@ -1735,33 +1735,20 @@ For git operations while detached:
17351735
},
17361736
];
17371737

1738-
if (adapter === "codex") {
1738+
const effortOpts = getReasoningEffortOptions(adapter, resolvedModelId);
1739+
if (effortOpts) {
17391740
configOptions.push({
1740-
id: "reasoning_effort",
1741-
name: "Reasoning Level",
1741+
id: adapter === "codex" ? "reasoning_effort" : "effort",
1742+
name: adapter === "codex" ? "Reasoning Level" : "Effort",
17421743
type: "select",
17431744
currentValue: "high",
1744-
options: [
1745-
{ value: "low", name: "Low" },
1746-
{ value: "medium", name: "Medium" },
1747-
{ value: "high", name: "High" },
1748-
],
1745+
options: effortOpts,
17491746
category: "thought_level",
1750-
description: "Controls how much reasoning effort the model uses",
1747+
description:
1748+
adapter === "codex"
1749+
? "Controls how much reasoning effort the model uses"
1750+
: "Controls how much effort Claude puts into its response",
17511751
});
1752-
} else {
1753-
const effortOpts = getEffortOptions(resolvedModelId);
1754-
if (effortOpts) {
1755-
configOptions.push({
1756-
id: "effort",
1757-
name: "Effort",
1758-
type: "select",
1759-
currentValue: "high",
1760-
options: effortOpts,
1761-
category: "thought_level",
1762-
description: "Controls how much effort Claude puts into its response",
1763-
});
1764-
}
17651752
}
17661753

17671754
return configOptions;

0 commit comments

Comments
 (0)