rm task lifecycle events from ui
This commit is contained in:
1 parent
12d7a5c411
commit
4f8ed7206f
3 files changed
+38
-11
No files matched your search
@@ -343,6 +343,35 @@ describe("deriveWorkLogEntries", () => {
|
||||
expect(entries.map((entry) => entry.id)).toEqual(["tool-complete"]);
|
||||
});
|
||||
|
||||
it("omits task start and completion lifecycle entries", () => {
|
||||
const activities: OrchestrationThreadActivity[] = [
|
||||
makeActivity({
|
||||
id: "task-start",
|
||||
createdAt: "2026-02-23T00:00:01.000Z",
|
||||
kind: "task.started",
|
||||
summary: "default task started",
|
||||
tone: "info",
|
||||
}),
|
||||
makeActivity({
|
||||
id: "task-progress",
|
||||
createdAt: "2026-02-23T00:00:02.000Z",
|
||||
kind: "task.progress",
|
||||
summary: "Updating files",
|
||||
tone: "info",
|
||||
}),
|
||||
makeActivity({
|
||||
id: "task-complete",
|
||||
createdAt: "2026-02-23T00:00:03.000Z",
|
||||
kind: "task.completed",
|
||||
summary: "Task completed",
|
||||
tone: "info",
|
||||
}),
|
||||
];
|
||||
|
||||
const entries = deriveWorkLogEntries(activities, undefined);
|
||||
expect(entries.map((entry) => entry.id)).toEqual(["task-progress"]);
|
||||
});
|
||||
|
||||
it("filters by turn id when provided", () => {
|
||||
const activities: OrchestrationThreadActivity[] = [
|
||||
makeActivity({ id: "turn-1", turnId: "turn-1", summary: "Tool call", kind: "tool.started" }),
|
||||
|
||||
@@ -394,6 +394,7 @@ export function deriveWorkLogEntries(
|
||||
return ordered
|
||||
.filter((activity) => (latestTurnId ? activity.turnId === latestTurnId : true))
|
||||
.filter((activity) => activity.kind !== "tool.started")
|
||||
.filter((activity) => activity.kind !== "task.started" && activity.kind !== "task.completed")
|
||||
.filter((activity) => activity.summary !== "Checkpoint captured")
|
||||
.map((activity) => {
|
||||
const payload =
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Schema } from "effect";
|
||||
import { ProviderKind } from "./orchestration";
|
||||
|
||||
export const CODEX_REASONING_EFFORT_OPTIONS = ["xhigh", "high", "medium", "low"] as const;
|
||||
export type CodexReasoningEffort = (typeof CODEX_REASONING_EFFORT_OPTIONS)[number];
|
||||
@@ -27,15 +28,14 @@ export const MODEL_OPTIONS_BY_PROVIDER = {
|
||||
{ slug: "gpt-5.2-codex", name: "GPT-5.2 Codex" },
|
||||
{ slug: "gpt-5.2", name: "GPT-5.2" },
|
||||
],
|
||||
} as const satisfies Record<"codex", readonly ModelOption[]>;
|
||||
} as const satisfies Record<ProviderKind, readonly ModelOption[]>;
|
||||
|
||||
type BuiltInModelSlug =
|
||||
(typeof MODEL_OPTIONS_BY_PROVIDER)[keyof typeof MODEL_OPTIONS_BY_PROVIDER][number]["slug"];
|
||||
type BuiltInModelSlug = (typeof MODEL_OPTIONS_BY_PROVIDER)[ProviderKind][number]["slug"];
|
||||
export type ModelSlug = BuiltInModelSlug | (string & {});
|
||||
|
||||
export const DEFAULT_MODEL_BY_PROVIDER = {
|
||||
codex: "gpt-5.3-codex",
|
||||
} as const satisfies Record<keyof typeof MODEL_OPTIONS_BY_PROVIDER, ModelSlug>;
|
||||
codex: "gpt-5.4",
|
||||
} as const satisfies Record<ProviderKind, ModelSlug>;
|
||||
|
||||
// Backward compatibility for existing Codex-only call sites.
|
||||
export const MODEL_OPTIONS = MODEL_OPTIONS_BY_PROVIDER.codex;
|
||||
@@ -49,15 +49,12 @@ export const MODEL_SLUG_ALIASES_BY_PROVIDER = {
|
||||
"5.3-spark": "gpt-5.3-codex-spark",
|
||||
"gpt-5.3-spark": "gpt-5.3-codex-spark",
|
||||
},
|
||||
} as const satisfies Record<keyof typeof MODEL_OPTIONS_BY_PROVIDER, Record<string, ModelSlug>>;
|
||||
} as const satisfies Record<ProviderKind, Record<string, ModelSlug>>;
|
||||
|
||||
export const REASONING_EFFORT_OPTIONS_BY_PROVIDER = {
|
||||
codex: CODEX_REASONING_EFFORT_OPTIONS,
|
||||
} as const satisfies Record<
|
||||
keyof typeof MODEL_OPTIONS_BY_PROVIDER,
|
||||
readonly CodexReasoningEffort[]
|
||||
>;
|
||||
} as const satisfies Record<ProviderKind, readonly CodexReasoningEffort[]>;
|
||||
|
||||
export const DEFAULT_REASONING_EFFORT_BY_PROVIDER = {
|
||||
codex: "high",
|
||||
} as const satisfies Record<keyof typeof MODEL_OPTIONS_BY_PROVIDER, CodexReasoningEffort | null>;
|
||||
} as const satisfies Record<ProviderKind, CodexReasoningEffort | null>;
|
||||
Reference in new issue
Block a user