fix(linear): clarify setup actions and MCP configuration

This commit is contained in:
chengyongru authored and chengyongru committed 2026-09-23 18:29:52 +08:00
1 parent d699088705
commit 1fc44e091b
20 files changed
+228 -121

No files matched your search

@@ -1,3 +1,4 @@
import { channelUiContribution } from "@/channel-plugins/registry";
import { CircleHelp, ExternalLink } from "lucide-react";
import { useTranslation } from "react-i18next";
import { channelSetup } from "@/components/settings/channels/ChannelIdentity";
@@ -16,7 +17,8 @@ export function ChannelHelpMenu({ feature, chatAppsDocsUrl }: {
{ url: setup.officialUrl, label: setup.officialLabel },
{ url: docsUrlWithBase(setup.docsUrl, chatAppsDocsUrl), label: setup.docsLabel },
].filter((link) => link.url);
if (!links.length) return null;
const HelpContent = channelUiContribution(feature.name, feature.webui)?.HelpContent;
if (!links.length && !HelpContent) return null;
const label = t("settings.channels.help", { defaultValue: "Help" });
return (
<TooltipProvider>
@@ -33,6 +35,7 @@ export function ChannelHelpMenu({ feature, chatAppsDocsUrl }: {
<TooltipContent>{label}</TooltipContent>
</Tooltip>
<DropdownMenuContent align="end">
{HelpContent ? <HelpContent feature={feature} /> : null}
{links.map((link) => (
<DropdownMenuItem key={link.url} asChild>
<a href={link.url} target="_blank" rel="noreferrer">
@@ -79,6 +79,7 @@ export function ChannelSetupPanel({
onFeaturesUpdate,
connectRequestId = 0,
onBeforeCloseChange,
onConfigureMcp,
}: {
token: string;
feature: NanobotFeatureInfo;
@@ -87,6 +88,7 @@ export function ChannelSetupPanel({
onAction: ChannelFeatureAction;
onFeaturesUpdate: (payload: NanobotFeaturesPayload) => void;
connectRequestId?: number;
onConfigureMcp?: (name: string) => void;
onBeforeCloseChange?: (handler: (() => Promise<boolean>) | null) => void;
}) {
const { t, i18n } = useTranslation();
@@ -108,6 +110,7 @@ export function ChannelSetupPanel({
onAction={onAction}
onFeaturesUpdate={onFeaturesUpdate}
onBeforeCloseChange={onBeforeCloseChange}
onConfigureMcp={onConfigureMcp}
/>
</Suspense>
);