Add LLM model to shared conversation view and remove feature flag (#12476)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Tim O'Farrell
2026-01-16 21:27:20 -07:00
committed by GitHub
parent 2e9b29970e
commit 0176cd9669
4 changed files with 10 additions and 42 deletions

View File

@@ -605,10 +605,7 @@ describe("ConversationNameContextMenu", () => {
});
describe("ConversationNameContextMenu - Share Link Functionality", () => {
const { mockWriteText, featureFlagMock } = vi.hoisted(() => ({
mockWriteText: vi.fn().mockResolvedValue(undefined),
featureFlagMock: vi.fn(() => true),
}));
const mockWriteText = vi.fn().mockResolvedValue(undefined);
const mockOnCopyShareLink = vi.fn();
const mockOnTogglePublic = vi.fn();
@@ -621,10 +618,6 @@ describe("ConversationNameContextMenu - Share Link Functionality", () => {
shareUrl: "https://example.com/shared/conversations/test-id",
};
vi.mock("#/utils/feature-flags", () => ({
ENABLE_PUBLIC_CONVERSATION_SHARING: () => featureFlagMock(),
}));
vi.mock("#/hooks/mutation/use-update-conversation-public-flag", () => ({
useUpdateConversationPublicFlag: () => ({
mutate: vi.fn(),
@@ -646,7 +639,6 @@ describe("ConversationNameContextMenu - Share Link Functionality", () => {
beforeEach(() => {
mockWriteText.mockClear();
mockDisplaySuccessToast.mockClear();
featureFlagMock.mockReturnValue(true);
});
afterEach(() => {
@@ -875,25 +867,9 @@ describe("ConversationNameContextMenu - Share Link Functionality", () => {
);
});
it("should not show share buttons when feature flag is disabled", () => {
// Arrange
featureFlagMock.mockReturnValue(false);
renderConversationNameWithRouter();
// Act - try to find share buttons (should not exist even if conversation is public)
const copyButton = screen.queryByTestId("copy-share-link-button");
const openButton = screen.queryByTestId("open-share-link-button");
// Assert
expect(copyButton).not.toBeInTheDocument();
expect(openButton).not.toBeInTheDocument();
});
it("should show both copy and open buttons when conversation is public and feature flag is enabled", async () => {
it("should show both copy and open buttons when conversation is public", async () => {
// Arrange
const user = userEvent.setup();
featureFlagMock.mockReturnValue(true);
renderConversationNameWithRouter();

View File

@@ -6,7 +6,6 @@ import { useUpdateConversation } from "#/hooks/mutation/use-update-conversation"
import { useConversationNameContextMenu } from "#/hooks/use-conversation-name-context-menu";
import { displaySuccessToast } from "#/utils/custom-toast-handlers";
import { I18nKey } from "#/i18n/declaration";
import { ENABLE_PUBLIC_CONVERSATION_SHARING } from "#/utils/feature-flags";
import { EllipsisButton } from "../conversation-panel/ellipsis-button";
import { ConversationNameContextMenu } from "./conversation-name-context-menu";
import { SystemMessageModal } from "../conversation-panel/system-message-modal";
@@ -187,19 +186,9 @@ export function ConversationName() {
onDownloadViaVSCode={
shouldShowDownload ? handleDownloadViaVSCode : undefined
}
onTogglePublic={
ENABLE_PUBLIC_CONVERSATION_SHARING()
? handleTogglePublic
: undefined
}
shareUrl={
ENABLE_PUBLIC_CONVERSATION_SHARING() ? shareUrl : undefined
}
onCopyShareLink={
ENABLE_PUBLIC_CONVERSATION_SHARING()
? handleCopyShareLink
: undefined
}
onTogglePublic={handleTogglePublic}
shareUrl={shareUrl}
onCopyShareLink={handleCopyShareLink}
onDownloadConversation={
shouldShowDownloadConversation
? handleDownloadConversation

View File

@@ -80,6 +80,11 @@ export default function SharedConversation() {
{conversation.selected_repository}
</div>
)}
{conversation?.llm_model && (
<div className="text-sm text-neutral-400">
{t(I18nKey.LLM$MODEL)}: {conversation.llm_model}
</div>
)}
</div>
</div>
</div>

View File

@@ -18,5 +18,3 @@ export const VSCODE_IN_NEW_TAB = () => loadFeatureFlag("VSCODE_IN_NEW_TAB");
export const ENABLE_TRAJECTORY_REPLAY = () =>
loadFeatureFlag("TRAJECTORY_REPLAY");
export const USE_PLANNING_AGENT = () => loadFeatureFlag("USE_PLANNING_AGENT");
export const ENABLE_PUBLIC_CONVERSATION_SHARING = () =>
loadFeatureFlag("PUBLIC_CONVERSATION_SHARING");