Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions apps/server/src/orchestration-v2/Orchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import {
ProviderInstanceId,
ProviderInteractionMode,
isRuntimeModeAbove,
isUnconfiguredDefaultInstanceEnabled,
resolveProviderInstanceEnabled,
resolveProjectProviderInstanceEnabled,
type ProviderSessionId,
Expand Down Expand Up @@ -2718,8 +2719,10 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio
? settings.providerInstances[queuedRun.providerInstanceId]
: undefined;
const instanceDisabledForProject =
machineInstance === undefined ||
!(projectOverride ?? resolveProviderInstanceEnabled(machineInstance));
machineInstance === undefined
? projectOverride === false ||
!isUnconfiguredDefaultInstanceEnabled(queuedRun.providerInstanceId)
: !(projectOverride ?? resolveProviderInstanceEnabled(machineInstance));
if (
worktreeMissing ||
instanceDisabledForProject ||
Expand Down Expand Up @@ -7978,7 +7981,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio
}),
);
const queuedProviderThread: OrchestrationV2ProviderThread = targetProviderThread ??
queueProviderThread ?? {
(freshContext ? undefined : queueProviderThread) ?? {
id: idAllocator.derive.providerThread({
driver: queuedAdapter.driver,
nativeThreadId: `pending:${runId}`,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/bots/botOrgTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const SEAT_ORDER = Object.keys(REPORTS_TO);
/** Founders are humans: Kameron and Jeff are never listed as bots. */
const FOUNDER_NAMES = new Set(["kameron", "kameron smith", "jeff", "jeffrey", "jeffrey smith"]);

export function botSeat(name: string | null | undefined): string {
function botSeat(name: string | null | undefined): string {
const key = (name ?? "").trim().toLowerCase().replace(/\s+/g, " ");
return ALIASES[key] ?? key;
}
Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/components/chat/useComposerSend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import {
import { createModelSelection } from "@t3tools/shared/model";
import { type SetStateAction, useLayoutEffect, useRef } from "react";
import { useNavigate } from "@tanstack/react-router";
import * as Schema from "effect/Schema";
import {
isAtomCommandInterrupted,
settlePromise,
Expand Down Expand Up @@ -170,6 +171,7 @@ import type { useUsageLimitsPanel } from "./useUsageLimitsPanel";
import type { useWorktreeSetup } from "./useWorktreeSetup";

const ENVIRONMENT_UNAVAILABLE_SEND_TOAST_TRAIL_SIZE = 3;
const isHumanNoteUnavailableError = Schema.is(HumanNoteUnavailableError);

function readEnvironmentPresentation(environmentId: EnvironmentId) {
return appAtomRegistry.get(environmentPresentations.presentationsAtom).get(environmentId);
Expand Down Expand Up @@ -627,7 +629,7 @@ export function useComposerSend(input: ComposerSendInput) {
stackedThreadToast({
type: "warning",
title: "Note not saved",
description: error instanceof HumanNoteUnavailableError ? error.message : "Try again.",
description: isHumanNoteUnavailableError(error) ? error.message : "Try again.",
}),
);
return;
Expand Down
Loading