Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(orchestrator): Prevent redundant delegated completion turns #5311

Mergedmwolson(GitHub profile, opens in a new tab)merged 5 commits intot3code/codex-turn-mapping fromrefs/pull/5311/headmerged by juliusmarminge View on GitHub

Showing 28 changed files with 150 additions and 47 deletions (loading 26).

x
0 of 28 viewed, 28 left
81 additions and 47 deletionsapps/mobile/src/features/threads/ThreadQueueControl.tsxModified
View file
@@ -10,6 +10,10 @@
import { threadEnvironment } from "../../state/threads";
import { useAtomCommand } from "../../state/use-atom-command";
import { useThreadProjection } from "../../state/use-thread-detail";
+import {
+ buildCancelQueuedRunCommand,
+ resolveThreadQueueRowControls,
+} from "./threadQueueControlPresentation";
​
export function ThreadQueueControl(props: {
readonly environmentId: EnvironmentId;
@@ -22,6 +26,7 @@
);
const reorder = useAtomCommand(threadEnvironment.reorderQueuedRun, "reorder queued message");
const promote = useAtomCommand(threadEnvironment.promoteQueuedRun, "promote queued message");
+ const cancel = useAtomCommand(threadEnvironment.cancelQueuedRun, "cancel queued message");
const [busyRunId, setBusyRunId] = useState<RunId | null>(null);
const iconColor = useThemeColor("--color-icon-subtle");
​
@@ -52,6 +57,19 @@
setBusyRunId(null);
};
​
+ const dismiss = async (runId: RunId) => {
+ setBusyRunId(runId);
+ void Haptics.selectionAsync();
+ await cancel(
+ buildCancelQueuedRunCommand({