Files
CC-Switch/src/components/deeplink/SkillConfirmation.tsx
T
YoVinchen 0f959112b1 refactor(skill): remove skillsPath configuration (#310)
Remove the skillsPath field from SkillRepo and Skill structs since
recursive scanning now automatically discovers skills in all directories.
Simplify the UI by removing the path input field.
2025-11-28 16:26:28 +08:00

47 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { useTranslation } from "react-i18next";
import { DeepLinkImportRequest } from "../../lib/api/deeplink";
export function SkillConfirmation({
request,
}: {
request: DeepLinkImportRequest;
}) {
const { t } = useTranslation();
return (
<div className="space-y-4">
<h3 className="text-lg font-semibold">{t("deeplink.skill.title")}</h3>
<div>
<label className="block text-sm font-medium text-muted-foreground">
{t("deeplink.skill.repo")}
</label>
<div className="mt-1 text-sm font-mono bg-muted/50 p-2 rounded border">
{request.repo}
</div>
</div>
<div>
<label className="block text-sm font-medium text-muted-foreground">
{t("deeplink.skill.directory")}
</label>
<div className="mt-1 text-sm font-mono bg-muted/50 p-2 rounded border">
{request.directory}
</div>
</div>
<div>
<label className="block text-sm font-medium text-muted-foreground">
{t("deeplink.skill.branch")}
</label>
<div className="mt-1 text-sm">{request.branch || "main"}</div>
</div>
<div className="text-blue-600 dark:text-blue-400 text-sm bg-blue-50 dark:bg-blue-950/30 p-3 rounded border border-blue-200 dark:border-blue-800">
<p> {t("deeplink.skill.hint")}</p>
<p className="mt-1">{t("deeplink.skill.hintDetail")}</p>
</div>
</div>
);
}