MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / SkillInstallView

Function SkillInstallView

src/pages/install/components/SkillInstallView.tsx:19–239  ·  view source on GitHub ↗
({
  metadata,
  prompt,
  scripts,
  references,
  isUpdate,
  installUrl,
  onInstall,
  onClose,
}: SkillInstallViewProps)

Source from the content-addressed store, hash-verified

17}
18
19function SkillInstallView({
20 metadata,
21 prompt,
22 scripts,
23 references,
24 isUpdate,
25 installUrl,
26 onInstall,
27 onClose,
28}: SkillInstallViewProps) {
29 const { t } = useTranslation();
30 const [promptExpanded, setPromptExpanded] = useState(false);
31
32 return (
33 <div id="install-app-container" className="tw-flex tw-flex-col">
34 {/* Header */}
35 <div className="tw-flex tw-flex-row tw-gap-x-3 tw-pt-3 tw-pb-3">
36 <div className="tw-grow-1 tw-shrink-1 tw-flex tw-flex-row tw-justify-start tw-items-center">
37 <Tag bordered color="purple" style={{ marginRight: "8px" }}>
38 {"Skill"}
39 </Tag>
40 <Typography.Text bold className="tw-text-size-lg tw-truncate tw-w-0 tw-grow-1">
41 {metadata.name}
42 </Typography.Text>
43 {metadata.version && (
44 <Tag bordered color="gray" style={{ marginLeft: "8px" }}>
45 {"v"}
46 {metadata.version}
47 </Tag>
48 )}
49 {isUpdate && (
50 <Tag bordered color="green" style={{ marginLeft: "4px" }}>
51 {t("update")}
52 </Tag>
53 )}
54 </div>
55 </div>
56
57 {/* Content */}
58 <div className="tw-shrink-1 tw-grow-1 tw-overflow-y-auto tw-pl-4 tw-pr-4 tw-gap-y-2 tw-flex tw-flex-col tw-mb-4 tw-h-0">
59 <div className="tw-flex tw-flex-wrap tw-gap-x-3 tw-gap-y-2 tw-items-start">
60 <div className="tw-flex tw-flex-col tw-shrink-1 tw-grow-1 tw-basis-full">
61 {/* Description */}
62 {metadata.description && (
63 <div className="tw-mb-2">
64 <Typography.Text bold>{metadata.description}</Typography.Text>
65 </div>
66 )}
67
68 {/* Install URL */}
69 {installUrl && (
70 <div className="tw-mb-2">
71 <Typography.Text type="secondary" className="tw-text-xs">
72 {"URL: "}
73 {installUrl}
74 </Typography.Text>
75 </div>
76 )}

Callers

nothing calls this directly

Calls 4

parseSkillScriptMetadataFunction · 0.90
keysMethod · 0.80
entriesMethod · 0.80
sliceMethod · 0.45

Tested by

no test coverage detected