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
4 changes: 1 addition & 3 deletions site/src/pages/AgentsPage/AgentChatPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,7 @@ export const AgentChatPageView: React.FC<AgentChatPageViewProps> = ({
// needs a workspace to render; the agent arrives once the build runs.
const availableDesktopChatId = workspace ? desktopChatId : undefined;

const availableBrowserApp = workspace
? getAgentBrowserApp(workspaceAgent)
: undefined;
const availableBrowserApp = getAgentBrowserApp(workspaceAgent);

const singletonTabSupport: Record<SingletonRightPanelTabId, boolean> = {
browser: availableBrowserApp !== undefined,
Expand Down
4 changes: 1 addition & 3 deletions site/src/pages/AgentsPage/components/AgentChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1332,9 +1332,7 @@ export const AgentChatInput: React.FC<AgentChatInputProps> = ({
)}
{showAgentSetupNotice && (
<div className="relative z-0 -mb-10">
{(aiGatewayDisabled ||
(providerCount !== undefined && modelCount !== undefined)) &&
canConfigureAgentSetup ? (
{canConfigureAgentSetup ? (
<AgentSetupNotice
isAdmin
providerCount={providerCount ?? 0}
Expand Down
16 changes: 7 additions & 9 deletions site/src/pages/AgentsPage/components/ChatPageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ export const ChatPageInput: React.FC<ChatPageInputProps> = ({
})
.filter(isChatMessage);
// Source the composer's prompt-history cycle from the dedicated /prompts endpoint.
const { data: promptsData } = useQuery(chatPromptsQuery(chatId ?? ""));
const { data: promptsData } = useQuery(chatPromptsQuery(chatId));
const userPromptHistory: readonly string[] =
promptsData?.prompts.map((prompt) => prompt.text) ?? [];

Expand All @@ -442,15 +442,13 @@ export const ChatPageInput: React.FC<ChatPageInputProps> = ({
: rawUsage;
const queryClient = useQueryClient();
const refreshContextMutation = useMutation(
refreshChatContext(queryClient, chatId ?? ""),
refreshChatContext(queryClient, chatId),
);
const handleRefreshContext = chatId
? () =>
refreshContextMutation.mutate(undefined, {
onSuccess: () => toast.success("Context refreshed."),
onError: () => toast.error("Failed to refresh context."),
})
: undefined;
const handleRefreshContext = () =>
refreshContextMutation.mutate(undefined, {
onSuccess: () => toast.success("Context refreshed."),
onError: () => toast.error("Failed to refresh context."),
});
const composeAttachments = useChatDraftAttachments(organizationId, chatId, {
provider: getProviderForModelOption(modelOptions, selectedModel),
});
Expand Down
Loading