Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97d068d759 | ||
|
|
41a430a88e | ||
|
|
2711d4e426 |
No files matched your search
@@ -530,6 +530,29 @@ describe("ClaudeAdapterLive", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it.effect("preserves xhigh effort for Claude Opus 5", () => {
|
||||
const harness = makeHarness();
|
||||
return Effect.gen(function* () {
|
||||
const adapter = yield* ClaudeAdapter;
|
||||
yield* adapter.startSession({
|
||||
threadId: THREAD_ID,
|
||||
provider: ProviderDriverKind.make("claudeAgent"),
|
||||
modelSelection: createModelSelection(
|
||||
ProviderInstanceId.make("claudeAgent"),
|
||||
"claude-opus-5",
|
||||
[{ id: "effort", value: "xhigh" }],
|
||||
),
|
||||
runtimeMode: "full-access",
|
||||
});
|
||||
|
||||
const createInput = harness.getLastCreateQueryInput();
|
||||
assert.equal(createInput?.options.effort, "xhigh");
|
||||
}).pipe(
|
||||
Effect.provideService(Random.Random, makeDeterministicRandomService()),
|
||||
Effect.provide(harness.layer),
|
||||
);
|
||||
});
|
||||
|
||||
it.effect("falls back to default effort when unsupported max is requested for Sonnet 4.6", () => {
|
||||
const harness = makeHarness();
|
||||
return Effect.gen(function* () {
|
||||
|
||||
@@ -51,6 +51,7 @@ const CLAUDE_PRESENTATION = {
|
||||
displayName: "Claude",
|
||||
showInteractionModeToggle: true,
|
||||
} as const;
|
||||
const MINIMUM_CLAUDE_OPUS_5_VERSION = "2.1.219";
|
||||
const MINIMUM_CLAUDE_FABLE_5_VERSION = "2.1.169";
|
||||
const MINIMUM_CLAUDE_OPUS_4_8_VERSION = "2.1.154";
|
||||
const MINIMUM_CLAUDE_OPUS_4_7_VERSION = "2.1.111";
|
||||
@@ -87,6 +88,42 @@ const BUILT_IN_MODELS: ReadonlyArray<ServerProviderModel> = [
|
||||
],
|
||||
}),
|
||||
},
|
||||
{
|
||||
slug: "claude-opus-5",
|
||||
name: "Claude Opus 5",
|
||||
isCustom: false,
|
||||
capabilities: createModelCapabilities({
|
||||
optionDescriptors: [
|
||||
buildSelectOptionDescriptor({
|
||||
id: "effort",
|
||||
label: "Reasoning",
|
||||
options: [
|
||||
{ value: "low", label: "Low" },
|
||||
{ value: "medium", label: "Medium" },
|
||||
{ value: "high", label: "High", isDefault: true },
|
||||
{ value: "xhigh", label: "Extra High" },
|
||||
{ value: "max", label: "Max" },
|
||||
{ value: "ultracode", label: "Ultracode" },
|
||||
{ value: "ultrathink", label: "Ultrathink" },
|
||||
],
|
||||
promptInjectedValues: ["ultrathink"],
|
||||
}),
|
||||
buildBooleanOptionDescriptor({
|
||||
id: "fastMode",
|
||||
label: "Fast Mode",
|
||||
}),
|
||||
buildSelectOptionDescriptor({
|
||||
id: "contextWindow",
|
||||
label: "Context Window",
|
||||
// Claude Code selects the 1M variant explicitly (`claude-opus-5[1m]`).
|
||||
options: [
|
||||
{ value: "200k", label: "200k" },
|
||||
{ value: "1m", label: "1M", isDefault: true },
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
},
|
||||
{
|
||||
slug: "claude-opus-4-8",
|
||||
name: "Claude Opus 4.8",
|
||||
@@ -272,6 +309,10 @@ const BUILT_IN_MODELS: ReadonlyArray<ServerProviderModel> = [
|
||||
},
|
||||
];
|
||||
|
||||
function supportsClaudeOpus5(version: string | null | undefined): boolean {
|
||||
return version ? compareSemverVersions(version, MINIMUM_CLAUDE_OPUS_5_VERSION) >= 0 : false;
|
||||
}
|
||||
|
||||
function supportsClaudeFable5(version: string | null | undefined): boolean {
|
||||
return version ? compareSemverVersions(version, MINIMUM_CLAUDE_FABLE_5_VERSION) >= 0 : false;
|
||||
}
|
||||
@@ -288,6 +329,9 @@ function getBuiltInClaudeModelsForVersion(
|
||||
version: string | null | undefined,
|
||||
): ReadonlyArray<ServerProviderModel> {
|
||||
return BUILT_IN_MODELS.filter((model) => {
|
||||
if (model.slug === "claude-opus-5") {
|
||||
return supportsClaudeOpus5(version);
|
||||
}
|
||||
if (model.slug === "claude-fable-5") {
|
||||
return supportsClaudeFable5(version);
|
||||
}
|
||||
@@ -301,6 +345,11 @@ function getBuiltInClaudeModelsForVersion(
|
||||
});
|
||||
}
|
||||
|
||||
function formatClaudeOpus5UpgradeMessage(version: string | null): string {
|
||||
const versionLabel = version ? `v${version}` : "the installed version";
|
||||
return `Claude Code ${versionLabel} is too old for Claude Opus 5. Upgrade to v${MINIMUM_CLAUDE_OPUS_5_VERSION} or newer to access it.`;
|
||||
}
|
||||
|
||||
function formatClaudeFable5UpgradeMessage(version: string | null): string {
|
||||
const versionLabel = version ? `v${version}` : "the installed version";
|
||||
return `Claude Code ${versionLabel} is too old for Claude Fable 5. Upgrade to v${MINIMUM_CLAUDE_FABLE_5_VERSION} or newer to access it.`;
|
||||
@@ -360,6 +409,7 @@ export function normalizeClaudeCliEffort(
|
||||
if (
|
||||
effort === "xhigh" &&
|
||||
model !== "claude-fable-5" &&
|
||||
model !== "claude-opus-5" &&
|
||||
model !== "claude-opus-4-8" &&
|
||||
model !== "claude-sonnet-5"
|
||||
) {
|
||||
@@ -837,13 +887,15 @@ export const checkClaudeProviderStatus = Effect.fn("checkClaudeProviderStatus")(
|
||||
claudeSettings.customModels,
|
||||
DEFAULT_CLAUDE_MODEL_CAPABILITIES,
|
||||
);
|
||||
const versionUpgradeMessage = supportsClaudeFable5(parsedVersion)
|
||||
const versionUpgradeMessage = supportsClaudeOpus5(parsedVersion)
|
||||
? undefined
|
||||
: supportsClaudeOpus48(parsedVersion)
|
||||
? formatClaudeFable5UpgradeMessage(parsedVersion)
|
||||
: supportsClaudeOpus47(parsedVersion)
|
||||
? formatClaudeOpus48UpgradeMessage(parsedVersion)
|
||||
: formatClaudeOpus47UpgradeMessage(parsedVersion);
|
||||
: supportsClaudeFable5(parsedVersion)
|
||||
? formatClaudeOpus5UpgradeMessage(parsedVersion)
|
||||
: supportsClaudeOpus48(parsedVersion)
|
||||
? formatClaudeFable5UpgradeMessage(parsedVersion)
|
||||
: supportsClaudeOpus47(parsedVersion)
|
||||
? formatClaudeOpus48UpgradeMessage(parsedVersion)
|
||||
: formatClaudeOpus47UpgradeMessage(parsedVersion);
|
||||
|
||||
const capabilities = resolveCapabilities
|
||||
? yield* resolveCapabilities(claudeSettings).pipe(Effect.orElseSucceed(() => undefined))
|
||||
|
||||
@@ -1842,6 +1842,62 @@ it.layer(Layer.mergeAll(NodeServices.layer, ServerSettingsModule.layerTest(), Te
|
||||
),
|
||||
);
|
||||
|
||||
it.effect("includes Claude Opus 5 on supported Claude Code versions", () =>
|
||||
Effect.gen(function* () {
|
||||
const status = yield* checkClaudeProviderStatus(
|
||||
defaultClaudeSettings,
|
||||
claudeCapabilities(),
|
||||
);
|
||||
const opus5 = status.models.find((model) => model.slug === "claude-opus-5");
|
||||
assert.strictEqual(opus5?.name, "Claude Opus 5");
|
||||
}).pipe(
|
||||
Effect.provide(
|
||||
mockSpawnerLayer((args) => {
|
||||
const joined = args.join(" ");
|
||||
if (joined === "--version") return { stdout: "2.1.219\n", stderr: "", code: 0 };
|
||||
if (joined === "auth status")
|
||||
return {
|
||||
stdout: '{"loggedIn":true,"authMethod":"claude.ai"}\n',
|
||||
stderr: "",
|
||||
code: 0,
|
||||
};
|
||||
throw new Error(`Unexpected args: ${joined}`);
|
||||
}),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
it.effect("hides Claude Opus 5 on older Claude Code versions", () =>
|
||||
Effect.gen(function* () {
|
||||
const status = yield* checkClaudeProviderStatus(
|
||||
defaultClaudeSettings,
|
||||
claudeCapabilities(),
|
||||
);
|
||||
assert.strictEqual(
|
||||
status.models.some((model) => model.slug === "claude-opus-5"),
|
||||
false,
|
||||
);
|
||||
assert.strictEqual(
|
||||
status.message,
|
||||
"Claude Code v2.1.218 is too old for Claude Opus 5. Upgrade to v2.1.219 or newer to access it.",
|
||||
);
|
||||
}).pipe(
|
||||
Effect.provide(
|
||||
mockSpawnerLayer((args) => {
|
||||
const joined = args.join(" ");
|
||||
if (joined === "--version") return { stdout: "2.1.218\n", stderr: "", code: 0 };
|
||||
if (joined === "auth status")
|
||||
return {
|
||||
stdout: '{"loggedIn":true,"authMethod":"claude.ai"}\n',
|
||||
stderr: "",
|
||||
code: 0,
|
||||
};
|
||||
throw new Error(`Unexpected args: ${joined}`);
|
||||
}),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
it.effect("includes Claude Fable 5 on supported Claude Code versions", () =>
|
||||
Effect.gen(function* () {
|
||||
const status = yield* checkClaudeProviderStatus(
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { EnvironmentId, ProjectId, type VcsRef } from "@t3tools/contracts";
|
||||
import { EnvironmentId, type VcsRef } from "@t3tools/contracts";
|
||||
import { describe, expect, it } from "vite-plus/test";
|
||||
import {
|
||||
buildCheckoutWorkspaceChoices,
|
||||
dedupeCheckoutOptions,
|
||||
dedupeRemoteBranchesWithLocalMatches,
|
||||
deriveLocalBranchNameFromRemoteRef,
|
||||
resolveEnvironmentOptionLabel,
|
||||
@@ -108,90 +106,6 @@ describe("resolvePreviousWorktreeLabel", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("buildCheckoutWorkspaceChoices", () => {
|
||||
it("keeps every same-repository clone selectable as a checkout or worktree base", () => {
|
||||
const firstProjectId = ProjectId.make("project-first-clone");
|
||||
const secondProjectId = ProjectId.make("project-second-clone");
|
||||
|
||||
expect(
|
||||
buildCheckoutWorkspaceChoices([
|
||||
{
|
||||
projectId: firstProjectId,
|
||||
title: "t3code",
|
||||
workspaceRoot: "/src/t3code",
|
||||
},
|
||||
{
|
||||
projectId: secondProjectId,
|
||||
title: "t3code-3",
|
||||
workspaceRoot: "/src/t3code-3",
|
||||
},
|
||||
]).map(({ projectId, mode }) => ({ projectId, mode })),
|
||||
).toEqual([
|
||||
{ projectId: firstProjectId, mode: "local" },
|
||||
{ projectId: firstProjectId, mode: "worktree" },
|
||||
{ projectId: secondProjectId, mode: "local" },
|
||||
{ projectId: secondProjectId, mode: "worktree" },
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("dedupeCheckoutOptions", () => {
|
||||
it("keeps the active project when duplicate normalized roots exist", () => {
|
||||
const staleProjectId = ProjectId.make("project-stale");
|
||||
const activeProjectId = ProjectId.make("project-active");
|
||||
|
||||
expect(
|
||||
dedupeCheckoutOptions(
|
||||
[
|
||||
{
|
||||
projectId: staleProjectId,
|
||||
title: "Stale checkout",
|
||||
workspaceRoot: "C:\\src\\t3code",
|
||||
},
|
||||
{
|
||||
projectId: activeProjectId,
|
||||
title: "Active checkout",
|
||||
workspaceRoot: "C:/src/t3code",
|
||||
},
|
||||
],
|
||||
activeProjectId,
|
||||
),
|
||||
).toEqual([
|
||||
{
|
||||
projectId: activeProjectId,
|
||||
title: "Active checkout",
|
||||
workspaceRoot: "C:/src/t3code",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("preserves checkouts that differ only by path casing", () => {
|
||||
const lowerProjectId = ProjectId.make("project-lower");
|
||||
const upperProjectId = ProjectId.make("project-upper");
|
||||
const checkouts = [
|
||||
{ projectId: lowerProjectId, title: "Lowercase", workspaceRoot: "/src/t3code" },
|
||||
{ projectId: upperProjectId, title: "Uppercase", workspaceRoot: "/src/T3Code" },
|
||||
];
|
||||
|
||||
expect(dedupeCheckoutOptions(checkouts, lowerProjectId)).toEqual(checkouts);
|
||||
});
|
||||
|
||||
it("deduplicates paths that differ only by trailing separators", () => {
|
||||
const staleProjectId = ProjectId.make("project-trailing-slash");
|
||||
const activeProjectId = ProjectId.make("project-no-trailing-slash");
|
||||
|
||||
expect(
|
||||
dedupeCheckoutOptions(
|
||||
[
|
||||
{ projectId: staleProjectId, title: "Stale", workspaceRoot: "/src/t3code/" },
|
||||
{ projectId: activeProjectId, title: "Active", workspaceRoot: "/src/t3code" },
|
||||
],
|
||||
activeProjectId,
|
||||
).map((checkout) => checkout.projectId),
|
||||
).toEqual([activeProjectId]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("resolveDraftEnvModeAfterBranchChange", () => {
|
||||
it("switches to local mode when returning from an existing worktree to the main worktree", () => {
|
||||
expect(
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { EnvironmentId, VcsRef, ProjectId } from "@t3tools/contracts";
|
||||
import { normalizeProjectPathForComparison } from "@t3tools/shared/path";
|
||||
import * as Schema from "effect/Schema";
|
||||
import { toSortableTimestamp } from "../lib/threadSort";
|
||||
export {
|
||||
@@ -14,50 +13,9 @@ export interface EnvironmentOption {
|
||||
isPrimary: boolean;
|
||||
}
|
||||
|
||||
export interface CheckoutOption {
|
||||
projectId: ProjectId;
|
||||
title: string;
|
||||
workspaceRoot: string;
|
||||
}
|
||||
|
||||
export interface CheckoutWorkspaceChoice {
|
||||
projectId: ProjectId;
|
||||
mode: EnvMode;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export function dedupeCheckoutOptions(
|
||||
checkouts: readonly CheckoutOption[],
|
||||
activeProjectId: ProjectId,
|
||||
): CheckoutOption[] {
|
||||
const activeCheckout = checkouts.find((checkout) => checkout.projectId === activeProjectId);
|
||||
const orderedCheckouts = activeCheckout
|
||||
? [activeCheckout, ...checkouts.filter((checkout) => checkout.projectId !== activeProjectId)]
|
||||
: checkouts;
|
||||
const seenWorkspaceRoots = new Set<string>();
|
||||
return orderedCheckouts.filter((checkout) => {
|
||||
const workspaceRoot = normalizeProjectPathForComparison(checkout.workspaceRoot);
|
||||
if (seenWorkspaceRoots.has(workspaceRoot)) return false;
|
||||
seenWorkspaceRoots.add(workspaceRoot);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
export const EnvMode = Schema.Literals(["local", "worktree"]);
|
||||
export type EnvMode = typeof EnvMode.Type;
|
||||
|
||||
export function buildCheckoutWorkspaceChoices(
|
||||
checkouts: readonly CheckoutOption[],
|
||||
): CheckoutWorkspaceChoice[] {
|
||||
return checkouts.flatMap((checkout) =>
|
||||
(["local", "worktree"] as const).map((mode) => ({
|
||||
projectId: checkout.projectId,
|
||||
mode,
|
||||
value: JSON.stringify([checkout.projectId, mode]),
|
||||
})),
|
||||
);
|
||||
}
|
||||
|
||||
const GENERIC_LOCAL_ENVIRONMENT_LABELS = new Set(["local", "local environment"]);
|
||||
|
||||
function normalizeDisplayLabel(value: string | null | undefined): string | null {
|
||||
|
||||
@@ -15,7 +15,6 @@ import { useComposerDraftStore, type DraftId } from "../composerDraftStore";
|
||||
import { useProject, useThread, useThreadShellsForProjectRefs } from "../state/entities";
|
||||
import { useIsMobile } from "../hooks/useMediaQuery";
|
||||
import {
|
||||
type CheckoutOption,
|
||||
type EnvMode,
|
||||
type EnvironmentOption,
|
||||
resolveCurrentWorkspaceLabel,
|
||||
@@ -57,8 +56,6 @@ interface BranchToolbarProps {
|
||||
onComposerFocusRequest?: () => void;
|
||||
availableEnvironments?: readonly EnvironmentOption[];
|
||||
onEnvironmentChange?: (environmentId: EnvironmentId) => void;
|
||||
availableCheckouts?: readonly CheckoutOption[];
|
||||
onWorkspaceChange?: (projectId: CheckoutOption["projectId"], mode: EnvMode) => void;
|
||||
}
|
||||
|
||||
interface MobileRunContextSelectorProps {
|
||||
@@ -232,8 +229,6 @@ export const BranchToolbar = memo(function BranchToolbar({
|
||||
onComposerFocusRequest,
|
||||
availableEnvironments,
|
||||
onEnvironmentChange,
|
||||
availableCheckouts,
|
||||
onWorkspaceChange,
|
||||
}: BranchToolbarProps) {
|
||||
const threadRef = useMemo(
|
||||
() => scopeThreadRef(environmentId, threadId),
|
||||
@@ -345,9 +340,6 @@ export const BranchToolbar = memo(function BranchToolbar({
|
||||
onEnvModeChange={onEnvModeChange}
|
||||
previousWorktreeLabel={previousWorktreeLabel}
|
||||
onUsePreviousWorktree={onUsePreviousWorktree}
|
||||
activeProjectId={activeProject.id}
|
||||
availableCheckouts={availableCheckouts ?? []}
|
||||
{...(onWorkspaceChange ? { onWorkspaceChange } : {})}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -2,8 +2,6 @@ import { FolderGit2Icon, FolderGitIcon, FolderIcon, HistoryIcon } from "lucide-r
|
||||
import { memo, useMemo } from "react";
|
||||
|
||||
import {
|
||||
buildCheckoutWorkspaceChoices,
|
||||
type CheckoutOption,
|
||||
resolveCurrentWorkspaceLabel,
|
||||
resolveEnvModeLabel,
|
||||
resolveLockedWorkspaceLabel,
|
||||
@@ -26,78 +24,28 @@ interface BranchToolbarEnvModeSelectorProps {
|
||||
effectiveEnvMode: EnvMode;
|
||||
activeWorktreePath: string | null;
|
||||
onEnvModeChange: (mode: EnvMode) => void;
|
||||
activeProjectId: CheckoutOption["projectId"];
|
||||
availableCheckouts: readonly CheckoutOption[];
|
||||
onWorkspaceChange?: (projectId: CheckoutOption["projectId"], mode: EnvMode) => void;
|
||||
previousWorktreeLabel?: string | null;
|
||||
onUsePreviousWorktree?: () => void;
|
||||
}
|
||||
|
||||
function formatCheckoutPath(path: string): string {
|
||||
const normalized = path.replaceAll("\\", "/");
|
||||
const homePrefix = "/Users/";
|
||||
if (normalized.startsWith(homePrefix)) {
|
||||
const segments = normalized.slice(homePrefix.length).split("/");
|
||||
if (segments.length > 1) {
|
||||
return `~/${segments.slice(1).join("/")}`;
|
||||
}
|
||||
}
|
||||
return normalized;
|
||||
}
|
||||
|
||||
export const BranchToolbarEnvModeSelector = memo(function BranchToolbarEnvModeSelector({
|
||||
envLocked,
|
||||
effectiveEnvMode,
|
||||
activeWorktreePath,
|
||||
onEnvModeChange,
|
||||
activeProjectId,
|
||||
availableCheckouts,
|
||||
onWorkspaceChange,
|
||||
previousWorktreeLabel,
|
||||
onUsePreviousWorktree,
|
||||
}: BranchToolbarEnvModeSelectorProps) {
|
||||
const showPreviousWorktree = Boolean(previousWorktreeLabel && onUsePreviousWorktree);
|
||||
const hasMultipleCheckouts = availableCheckouts.length > 1 && onWorkspaceChange !== undefined;
|
||||
const activeCheckout =
|
||||
availableCheckouts.find((checkout) => checkout.projectId === activeProjectId) ?? null;
|
||||
const checkoutChoices = useMemo(
|
||||
() => buildCheckoutWorkspaceChoices(availableCheckouts),
|
||||
[availableCheckouts],
|
||||
);
|
||||
const choiceValue = (projectId: CheckoutOption["projectId"], mode: EnvMode) =>
|
||||
checkoutChoices.find((choice) => choice.projectId === projectId && choice.mode === mode)
|
||||
?.value ?? "";
|
||||
const envModeItems = useMemo(
|
||||
() =>
|
||||
hasMultipleCheckouts
|
||||
? checkoutChoices.map((choice) => {
|
||||
const checkout = availableCheckouts.find(
|
||||
(candidate) => candidate.projectId === choice.projectId,
|
||||
)!;
|
||||
return {
|
||||
value: choice.value,
|
||||
label: `${checkout.title} — ${
|
||||
choice.mode === "local"
|
||||
? resolveCurrentWorkspaceLabel(activeWorktreePath)
|
||||
: resolveEnvModeLabel("worktree")
|
||||
}`,
|
||||
};
|
||||
})
|
||||
: [
|
||||
{ value: "local", label: resolveCurrentWorkspaceLabel(activeWorktreePath) },
|
||||
{ value: "worktree", label: resolveEnvModeLabel("worktree") },
|
||||
...(showPreviousWorktree && previousWorktreeLabel
|
||||
? [{ value: PREVIOUS_WORKTREE_SELECT_VALUE, label: previousWorktreeLabel }]
|
||||
: []),
|
||||
],
|
||||
[
|
||||
activeWorktreePath,
|
||||
availableCheckouts,
|
||||
checkoutChoices,
|
||||
hasMultipleCheckouts,
|
||||
previousWorktreeLabel,
|
||||
showPreviousWorktree,
|
||||
() => [
|
||||
{ value: "local", label: resolveCurrentWorkspaceLabel(activeWorktreePath) },
|
||||
{ value: "worktree", label: resolveEnvModeLabel("worktree") },
|
||||
...(showPreviousWorktree && previousWorktreeLabel
|
||||
? [{ value: PREVIOUS_WORKTREE_SELECT_VALUE, label: previousWorktreeLabel }]
|
||||
: []),
|
||||
],
|
||||
[activeWorktreePath, previousWorktreeLabel, showPreviousWorktree],
|
||||
);
|
||||
|
||||
if (envLocked) {
|
||||
@@ -121,22 +69,13 @@ export const BranchToolbarEnvModeSelector = memo(function BranchToolbarEnvModeSe
|
||||
return (
|
||||
<Select
|
||||
modal={false}
|
||||
value={
|
||||
hasMultipleCheckouts ? choiceValue(activeProjectId, effectiveEnvMode) : effectiveEnvMode
|
||||
}
|
||||
onValueChange={(value) => {
|
||||
value={effectiveEnvMode}
|
||||
onValueChange={(value: string | null) => {
|
||||
if (value === PREVIOUS_WORKTREE_SELECT_VALUE) {
|
||||
onUsePreviousWorktree?.();
|
||||
return;
|
||||
}
|
||||
if (!hasMultipleCheckouts) {
|
||||
onEnvModeChange(value as EnvMode);
|
||||
return;
|
||||
}
|
||||
const selected = checkoutChoices.find((option) => option.value === value);
|
||||
if (selected) {
|
||||
onWorkspaceChange(selected.projectId, selected.mode);
|
||||
}
|
||||
onEnvModeChange(value as EnvMode);
|
||||
}}
|
||||
items={envModeItems}
|
||||
>
|
||||
@@ -148,82 +87,36 @@ export const BranchToolbarEnvModeSelector = memo(function BranchToolbarEnvModeSe
|
||||
) : (
|
||||
<FolderIcon className="size-3" />
|
||||
)}
|
||||
{hasMultipleCheckouts && activeCheckout ? (
|
||||
<span className="max-w-44 truncate">
|
||||
{activeCheckout.title} ·{" "}
|
||||
{effectiveEnvMode === "worktree"
|
||||
? resolveEnvModeLabel("worktree")
|
||||
: resolveCurrentWorkspaceLabel(activeWorktreePath)}
|
||||
</span>
|
||||
) : (
|
||||
<SelectValue />
|
||||
)}
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectPopup matchTriggerWidth={!hasMultipleCheckouts}>
|
||||
{hasMultipleCheckouts ? (
|
||||
availableCheckouts.map((checkout) => (
|
||||
<SelectGroup key={checkout.projectId}>
|
||||
<SelectGroupLabel>
|
||||
<span className="flex min-w-64 max-w-96 flex-col gap-0.5 py-0.5">
|
||||
<span className="truncate text-foreground">{checkout.title}</span>
|
||||
<span className="truncate font-normal text-muted-foreground/70">
|
||||
{formatCheckoutPath(checkout.workspaceRoot)}
|
||||
</span>
|
||||
</span>
|
||||
</SelectGroupLabel>
|
||||
<SelectItem value={choiceValue(checkout.projectId, "local")}>
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<FolderIcon className="size-3" />
|
||||
Current checkout
|
||||
</span>
|
||||
</SelectItem>
|
||||
<SelectItem value={choiceValue(checkout.projectId, "worktree")}>
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<FolderGit2Icon className="size-3" />
|
||||
New worktree…
|
||||
</span>
|
||||
</SelectItem>
|
||||
{checkout.projectId === activeProjectId &&
|
||||
showPreviousWorktree &&
|
||||
previousWorktreeLabel ? (
|
||||
<SelectItem value={PREVIOUS_WORKTREE_SELECT_VALUE}>
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<HistoryIcon className="size-3" />
|
||||
{previousWorktreeLabel}
|
||||
</span>
|
||||
</SelectItem>
|
||||
) : null}
|
||||
</SelectGroup>
|
||||
))
|
||||
) : (
|
||||
<SelectGroup>
|
||||
<SelectGroupLabel>Workspace</SelectGroupLabel>
|
||||
<SelectItem value="local">
|
||||
<SelectPopup>
|
||||
<SelectGroup>
|
||||
<SelectGroupLabel>Workspace</SelectGroupLabel>
|
||||
<SelectItem value="local">
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
{activeWorktreePath ? (
|
||||
<FolderGitIcon className="size-3" />
|
||||
) : (
|
||||
<FolderIcon className="size-3" />
|
||||
)}
|
||||
{resolveCurrentWorkspaceLabel(activeWorktreePath)}
|
||||
</span>
|
||||
</SelectItem>
|
||||
<SelectItem value="worktree">
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<FolderGit2Icon className="size-3" />
|
||||
{resolveEnvModeLabel("worktree")}
|
||||
</span>
|
||||
</SelectItem>
|
||||
{showPreviousWorktree && previousWorktreeLabel ? (
|
||||
<SelectItem value={PREVIOUS_WORKTREE_SELECT_VALUE}>
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
{activeWorktreePath ? (
|
||||
<FolderGitIcon className="size-3" />
|
||||
) : (
|
||||
<FolderIcon className="size-3" />
|
||||
)}
|
||||
{resolveCurrentWorkspaceLabel(activeWorktreePath)}
|
||||
<HistoryIcon className="size-3" />
|
||||
{previousWorktreeLabel}
|
||||
</span>
|
||||
</SelectItem>
|
||||
<SelectItem value="worktree">
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<FolderGit2Icon className="size-3" />
|
||||
{resolveEnvModeLabel("worktree")}
|
||||
</span>
|
||||
</SelectItem>
|
||||
{showPreviousWorktree && previousWorktreeLabel ? (
|
||||
<SelectItem value={PREVIOUS_WORKTREE_SELECT_VALUE}>
|
||||
<span className="inline-flex items-center gap-1.5">
|
||||
<HistoryIcon className="size-3" />
|
||||
{previousWorktreeLabel}
|
||||
</span>
|
||||
</SelectItem>
|
||||
) : null}
|
||||
</SelectGroup>
|
||||
)}
|
||||
) : null}
|
||||
</SelectGroup>
|
||||
</SelectPopup>
|
||||
</Select>
|
||||
);
|
||||
|
||||
@@ -223,11 +223,7 @@ import { ChatHeader } from "./chat/ChatHeader";
|
||||
import { PanelLayoutControls, RightPanelMaximizeControl } from "./chat/PanelLayoutControls";
|
||||
import { type ExpandedImagePreview } from "./chat/ExpandedImagePreview";
|
||||
import { NoActiveThreadState } from "./NoActiveThreadState";
|
||||
import {
|
||||
dedupeCheckoutOptions,
|
||||
resolveEffectiveEnvMode,
|
||||
resolveLocalCheckoutBranchMismatch,
|
||||
} from "./BranchToolbar.logic";
|
||||
import { resolveEffectiveEnvMode, resolveLocalCheckoutBranchMismatch } from "./BranchToolbar.logic";
|
||||
import {
|
||||
getProviderStatusBannerKey,
|
||||
ProviderStatusBanner,
|
||||
@@ -1673,22 +1669,6 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
return envs;
|
||||
}, [activeProject, allProjects, projectGroupingSettings, primaryEnvironmentId, environmentById]);
|
||||
const hasMultipleEnvironments = logicalProjectEnvironments.length > 1;
|
||||
const logicalProjectCheckouts = useMemo(() => {
|
||||
if (!activeProject) return [];
|
||||
const logicalKey = deriveLogicalProjectKeyFromSettings(activeProject, projectGroupingSettings);
|
||||
const checkouts = allProjects
|
||||
.filter(
|
||||
(project) =>
|
||||
project.environmentId === activeProject.environmentId &&
|
||||
deriveLogicalProjectKeyFromSettings(project, projectGroupingSettings) === logicalKey,
|
||||
)
|
||||
.map((project) => ({
|
||||
projectId: project.id,
|
||||
title: project.title,
|
||||
workspaceRoot: project.workspaceRoot,
|
||||
}));
|
||||
return dedupeCheckoutOptions(checkouts, activeProject.id);
|
||||
}, [activeProject, allProjects, projectGroupingSettings]);
|
||||
|
||||
const openPullRequestDialog = useCallback(
|
||||
(reference?: string) => {
|
||||
@@ -2462,32 +2442,6 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
[draftId, envLocked, logicalProjectEnvironments, setDraftThreadContext],
|
||||
);
|
||||
|
||||
const onWorkspaceChange = useCallback(
|
||||
(projectId: ProjectId, mode: DraftThreadEnvMode) => {
|
||||
if (envLocked || !draftId || !activeProject) return;
|
||||
const target = logicalProjectCheckouts.find((checkout) => checkout.projectId === projectId);
|
||||
if (!target) return;
|
||||
setDraftThreadContext(draftId, {
|
||||
projectRef: scopeProjectRef(activeProject.environmentId, target.projectId),
|
||||
envMode: mode,
|
||||
startFromOrigin: resolveNewDraftStartFromOrigin({
|
||||
envMode: mode,
|
||||
newWorktreesStartFromOrigin: primaryServerSettings.newWorktreesStartFromOrigin,
|
||||
}),
|
||||
...(mode === "worktree" && draftThread?.worktreePath ? { worktreePath: null } : {}),
|
||||
});
|
||||
},
|
||||
[
|
||||
activeProject,
|
||||
draftId,
|
||||
draftThread?.worktreePath,
|
||||
envLocked,
|
||||
logicalProjectCheckouts,
|
||||
primaryServerSettings.newWorktreesStartFromOrigin,
|
||||
setDraftThreadContext,
|
||||
],
|
||||
);
|
||||
|
||||
const activeTerminalGroup =
|
||||
terminalUiState.terminalGroups.find(
|
||||
(group) => group.id === terminalUiState.activeTerminalGroupId,
|
||||
@@ -5938,10 +5892,6 @@ function ChatViewContent(props: ChatViewProps) {
|
||||
: {})}
|
||||
{...(hasMultipleEnvironments ? { onEnvironmentChange } : {})}
|
||||
availableEnvironments={logicalProjectEnvironments}
|
||||
availableCheckouts={logicalProjectCheckouts}
|
||||
{...(routeKind === "draft" && !isServerThread
|
||||
? { onWorkspaceChange }
|
||||
: {})}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -553,6 +553,54 @@ describe("MessagesTimeline", () => {
|
||||
expect(markup).not.toContain("C:/Users/mike/dev-stuff/t3code/apps/web/src/session-logic.ts");
|
||||
});
|
||||
|
||||
it("renders web search queries compactly and includes details in the expanded body", async () => {
|
||||
const { buildToolCallExpandedBody } = await import("./workEntryDetails");
|
||||
const workEntry = {
|
||||
id: "web-search-work-1",
|
||||
createdAt: "2026-03-17T19:12:28.000Z",
|
||||
label: "Web search",
|
||||
tone: "tool" as const,
|
||||
toolTitle: "Web search",
|
||||
itemType: "web_search" as const,
|
||||
toolLifecycleStatus: "completed" as const,
|
||||
toolData: {
|
||||
type: "webSearch",
|
||||
id: "web-search-1",
|
||||
query: "OpenAI Codex web search payload preview",
|
||||
action: {
|
||||
type: "search",
|
||||
queries: ["OpenAI Codex web search payload", "OpenAI Codex web search result payload"],
|
||||
},
|
||||
results: [{ title: "Codex docs", url: "https://example.com/codex" }],
|
||||
},
|
||||
};
|
||||
const markup = renderToStaticMarkup(
|
||||
<MessagesTimeline
|
||||
{...buildProps()}
|
||||
timelineEntries={[
|
||||
{
|
||||
id: "entry-1",
|
||||
kind: "work",
|
||||
createdAt: "2026-03-17T19:12:28.000Z",
|
||||
entry: workEntry,
|
||||
},
|
||||
]}
|
||||
/>,
|
||||
);
|
||||
const expandedBody = buildToolCallExpandedBody(workEntry, undefined);
|
||||
|
||||
expect(markup).toContain("Web search");
|
||||
expect(markup).toContain("OpenAI Codex web search payload +1 more");
|
||||
expect(markup).toContain("lucide-globe");
|
||||
expect(expandedBody).toContain('"query": "OpenAI Codex web search payload preview"');
|
||||
expect(expandedBody).toContain('"queries": [');
|
||||
expect(expandedBody).toContain('"OpenAI Codex web search result payload"');
|
||||
expect(expandedBody).not.toContain("Web search\n");
|
||||
expect(expandedBody).not.toContain("Action: search");
|
||||
expect(expandedBody).not.toContain("Raw item");
|
||||
expect(expandedBody).toContain("https://example.com/codex");
|
||||
});
|
||||
|
||||
it("renders review comment contexts as structured cards instead of raw tags", () => {
|
||||
const markup = renderToStaticMarkup(
|
||||
<MessagesTimeline
|
||||
|
||||
@@ -105,6 +105,7 @@ import {
|
||||
formatInlineTerminalContextLabel,
|
||||
textContainsInlineTerminalContextLabels,
|
||||
} from "./userMessageTerminalContexts";
|
||||
import { buildToolCallExpandedBody, workEntryPreview } from "./workEntryDetails";
|
||||
import { SkillInlineText } from "./SkillInlineText";
|
||||
import { formatWorkspaceRelativePath } from "../../filePathDisplay";
|
||||
import {
|
||||
@@ -1820,59 +1821,6 @@ function workToneIcon(tone: TimelineWorkEntry["tone"]): {
|
||||
};
|
||||
}
|
||||
|
||||
function workEntryPreview(
|
||||
workEntry: Pick<TimelineWorkEntry, "detail" | "command" | "changedFiles">,
|
||||
workspaceRoot: string | undefined,
|
||||
) {
|
||||
if (workEntry.command) return workEntry.command;
|
||||
if (workEntry.detail) return workEntry.detail;
|
||||
if ((workEntry.changedFiles?.length ?? 0) === 0) return null;
|
||||
const [firstPath] = workEntry.changedFiles ?? [];
|
||||
if (!firstPath) return null;
|
||||
const displayPath = formatWorkspaceRelativePath(firstPath, workspaceRoot);
|
||||
return workEntry.changedFiles!.length === 1
|
||||
? displayPath
|
||||
: `${displayPath} +${workEntry.changedFiles!.length - 1} more`;
|
||||
}
|
||||
|
||||
function workEntryRawCommand(
|
||||
workEntry: Pick<TimelineWorkEntry, "command" | "rawCommand">,
|
||||
): string | null {
|
||||
const rawCommand = workEntry.rawCommand?.trim();
|
||||
if (!rawCommand || !workEntry.command) {
|
||||
return null;
|
||||
}
|
||||
return rawCommand === workEntry.command.trim() ? null : rawCommand;
|
||||
}
|
||||
|
||||
function buildToolCallExpandedBody(
|
||||
workEntry: TimelineWorkEntry,
|
||||
workspaceRoot: string | undefined,
|
||||
): string | null {
|
||||
const blocks: string[] = [];
|
||||
if (workEntry.itemType === "mcp_tool_call" && workEntry.toolData !== undefined) {
|
||||
blocks.push(`MCP call\n${JSON.stringify(workEntry.toolData, null, 2)}`);
|
||||
}
|
||||
const raw = workEntryRawCommand(workEntry);
|
||||
if (raw?.trim()) {
|
||||
blocks.push(raw.trim());
|
||||
} else if (workEntry.command?.trim()) {
|
||||
blocks.push(workEntry.command.trim());
|
||||
}
|
||||
if (workEntry.detail?.trim()) {
|
||||
blocks.push(workEntry.detail.trim());
|
||||
}
|
||||
const changedFiles = workEntry.changedFiles ?? [];
|
||||
if (changedFiles.length > 0) {
|
||||
blocks.push(
|
||||
changedFiles
|
||||
.map((filePath) => formatWorkspaceRelativePath(filePath, workspaceRoot))
|
||||
.join("\n"),
|
||||
);
|
||||
}
|
||||
return blocks.length > 0 ? blocks.join("\n\n") : null;
|
||||
}
|
||||
|
||||
function workEntryIconName(workEntry: TimelineWorkEntry): WorkEntryIconName {
|
||||
if (
|
||||
workEntry.sourceActivityKind === "user-input.requested" ||
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
import type { WorkLogEntry } from "../../session-logic";
|
||||
import { formatWorkspaceRelativePath } from "../../filePathDisplay";
|
||||
|
||||
function asPlainRecord(value: unknown): Record<string, unknown> | null {
|
||||
return value && typeof value === "object" && !Array.isArray(value)
|
||||
? (value as Record<string, unknown>)
|
||||
: null;
|
||||
}
|
||||
|
||||
function asTrimmedPlainString(value: unknown): string | null {
|
||||
if (typeof value !== "string") {
|
||||
return null;
|
||||
}
|
||||
const trimmed = value.trim();
|
||||
return trimmed.length > 0 ? trimmed : null;
|
||||
}
|
||||
|
||||
function webSearchActionRecord(toolData: unknown): Record<string, unknown> | null {
|
||||
return asPlainRecord(asPlainRecord(toolData)?.action);
|
||||
}
|
||||
|
||||
function webSearchQueries(toolData: unknown): string[] {
|
||||
const item = asPlainRecord(toolData);
|
||||
const action = webSearchActionRecord(toolData);
|
||||
if (Array.isArray(action?.queries)) {
|
||||
const queries: string[] = [];
|
||||
for (const query of action.queries) {
|
||||
const trimmed = asTrimmedPlainString(query);
|
||||
if (trimmed) {
|
||||
queries.push(trimmed);
|
||||
}
|
||||
}
|
||||
if (queries.length > 0) {
|
||||
return queries;
|
||||
}
|
||||
}
|
||||
|
||||
const actionQuery = asTrimmedPlainString(action?.query);
|
||||
if (actionQuery) {
|
||||
return [actionQuery];
|
||||
}
|
||||
|
||||
const itemQuery = asTrimmedPlainString(item?.query);
|
||||
if (itemQuery) {
|
||||
return [itemQuery];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function webSearchPreview(toolData: unknown): string | null {
|
||||
const action = webSearchActionRecord(toolData);
|
||||
const actionType = asTrimmedPlainString(action?.type);
|
||||
const queries = webSearchQueries(toolData);
|
||||
if (queries.length > 0) {
|
||||
const [firstQuery] = queries;
|
||||
if (!firstQuery) {
|
||||
return null;
|
||||
}
|
||||
return queries.length === 1 ? firstQuery : `${firstQuery} +${queries.length - 1} more`;
|
||||
}
|
||||
const url = asTrimmedPlainString(action?.url);
|
||||
const pattern = asTrimmedPlainString(action?.pattern);
|
||||
if ((actionType === "findInPage" || actionType === "find_in_page") && pattern && url) {
|
||||
return `${pattern} in ${url}`;
|
||||
}
|
||||
return pattern ?? url;
|
||||
}
|
||||
|
||||
function formatWebSearchExpandedBody(toolData: unknown): string | null {
|
||||
try {
|
||||
return JSON.stringify(toolData, null, 2);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export function workEntryPreview(
|
||||
workEntry: Pick<WorkLogEntry, "detail" | "command" | "changedFiles" | "itemType" | "toolData">,
|
||||
workspaceRoot: string | undefined,
|
||||
) {
|
||||
if (workEntry.command) return workEntry.command;
|
||||
if (workEntry.itemType === "web_search") {
|
||||
const preview = webSearchPreview(workEntry.toolData);
|
||||
if (preview) return preview;
|
||||
}
|
||||
if (workEntry.detail) return workEntry.detail;
|
||||
if ((workEntry.changedFiles?.length ?? 0) === 0) return null;
|
||||
const [firstPath] = workEntry.changedFiles ?? [];
|
||||
if (!firstPath) return null;
|
||||
const displayPath = formatWorkspaceRelativePath(firstPath, workspaceRoot);
|
||||
return workEntry.changedFiles!.length === 1
|
||||
? displayPath
|
||||
: `${displayPath} +${workEntry.changedFiles!.length - 1} more`;
|
||||
}
|
||||
|
||||
function workEntryRawCommand(
|
||||
workEntry: Pick<WorkLogEntry, "command" | "rawCommand">,
|
||||
): string | null {
|
||||
const rawCommand = workEntry.rawCommand?.trim();
|
||||
if (!rawCommand || !workEntry.command) {
|
||||
return null;
|
||||
}
|
||||
return rawCommand === workEntry.command.trim() ? null : rawCommand;
|
||||
}
|
||||
|
||||
export function buildToolCallExpandedBody(
|
||||
workEntry: WorkLogEntry,
|
||||
workspaceRoot: string | undefined,
|
||||
): string | null {
|
||||
const blocks: string[] = [];
|
||||
if (workEntry.itemType === "mcp_tool_call" && workEntry.toolData !== undefined) {
|
||||
blocks.push(`MCP call\n${JSON.stringify(workEntry.toolData, null, 2)}`);
|
||||
}
|
||||
if (workEntry.itemType === "web_search" && workEntry.toolData !== undefined) {
|
||||
const body = formatWebSearchExpandedBody(workEntry.toolData);
|
||||
if (body) {
|
||||
blocks.push(body);
|
||||
}
|
||||
}
|
||||
const raw = workEntryRawCommand(workEntry);
|
||||
if (raw?.trim()) {
|
||||
blocks.push(raw.trim());
|
||||
} else if (workEntry.command?.trim()) {
|
||||
blocks.push(workEntry.command.trim());
|
||||
}
|
||||
if (workEntry.detail?.trim()) {
|
||||
blocks.push(workEntry.detail.trim());
|
||||
}
|
||||
const changedFiles = workEntry.changedFiles ?? [];
|
||||
if (changedFiles.length > 0) {
|
||||
blocks.push(
|
||||
changedFiles
|
||||
.map((filePath) => formatWorkspaceRelativePath(filePath, workspaceRoot))
|
||||
.join("\n"),
|
||||
);
|
||||
}
|
||||
return blocks.length > 0 ? blocks.join("\n\n") : null;
|
||||
}
|
||||
@@ -1166,6 +1166,15 @@ describe("deriveWorkLogEntries", () => {
|
||||
});
|
||||
|
||||
it("uses grep raw output summaries instead of repeating the generic tool label", () => {
|
||||
const searchItem = {
|
||||
type: "webSearch",
|
||||
id: "web-search-1",
|
||||
query: "React 19 hydration warnings",
|
||||
action: {
|
||||
type: "search",
|
||||
queries: ["React 19 hydration warnings"],
|
||||
},
|
||||
};
|
||||
const activities: OrchestrationThreadActivity[] = [
|
||||
makeActivity({
|
||||
id: "grep-update",
|
||||
@@ -1179,6 +1188,7 @@ describe("deriveWorkLogEntries", () => {
|
||||
data: {
|
||||
toolCallId: "tool-grep-1",
|
||||
kind: "search",
|
||||
item: searchItem,
|
||||
rawInput: {},
|
||||
},
|
||||
},
|
||||
@@ -1211,6 +1221,7 @@ describe("deriveWorkLogEntries", () => {
|
||||
toolTitle: "grep",
|
||||
detail: "19 files",
|
||||
itemType: "web_search",
|
||||
toolData: searchItem,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -734,7 +734,7 @@ function toDerivedWorkLogEntry(activity: OrchestrationThreadActivity): DerivedWo
|
||||
if (title) {
|
||||
entry.toolTitle = title;
|
||||
}
|
||||
if (itemType === "mcp_tool_call") {
|
||||
if (itemType === "mcp_tool_call" || itemType === "web_search") {
|
||||
const data = asRecord(payload?.data);
|
||||
if (data?.item !== undefined) {
|
||||
entry.toolData = data.item;
|
||||
|
||||
@@ -176,7 +176,10 @@ export const MODEL_SLUG_ALIASES_BY_PROVIDER: Partial<
|
||||
"gpt-5.3-spark": "gpt-5.3-codex-spark",
|
||||
},
|
||||
[CLAUDE_DRIVER_KIND]: {
|
||||
opus: "claude-opus-4-8",
|
||||
opus: "claude-opus-5",
|
||||
"opus-5": "claude-opus-5",
|
||||
"claude-opus-5.0": "claude-opus-5",
|
||||
"claude-opus-5-0": "claude-opus-5",
|
||||
"opus-4.8": "claude-opus-4-8",
|
||||
"claude-opus-4.8": "claude-opus-4-8",
|
||||
"opus-4.7": "claude-opus-4-7",
|
||||
|
||||
@@ -151,7 +151,7 @@ describe("model slug normalization", () => {
|
||||
it("preserves exact custom slugs instead of expanding provider aliases", () => {
|
||||
const claude = ProviderDriverKind.make("claudeAgent");
|
||||
|
||||
expect(normalizeModelSlug("opus", claude)).toBe("claude-opus-4-8");
|
||||
expect(normalizeModelSlug("opus", claude)).toBe("claude-opus-5");
|
||||
expect(normalizeCustomModelSlug(" opus ")).toBe("opus");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user