add in tsx comment sections

This commit is contained in:
brownrw8 2025-01-22 14:50:31 -10:00
parent f0b04d2acf
commit 5bbae7e9cc

View file

@ -9,71 +9,113 @@ interface AnnouncementProps {
}
const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
const { t, ready } = useTranslation("translation", { keyPrefix: "announcement", useSuspense: false })
const { t } = useTranslation("translation", { keyPrefix: "announcement" })
const minorVersion = version.split(".").slice(0, 2).join(".") // 2.0.0 -> 2.0
return (
ready && (
<div
style={{
backgroundColor: "var(--vscode-editor-inactiveSelectionBackground)",
borderRadius: "3px",
padding: "12px 16px",
margin: "5px 15px 5px 15px",
position: "relative",
flexShrink: 0,
}}>
<VSCodeButton appearance="icon" onClick={hideAnnouncement} style={{ position: "absolute", top: "8px", right: "8px" }}>
<span className="codicon codicon-close"></span>
</VSCodeButton>
<h3 style={{ margin: "0 0 8px" }}>{t("newInVersion", { version: minorVersion })}</h3>
<ul style={{ margin: "0 0 8px", paddingLeft: "12px" }}>
<li>
<b>Plan/Act mode toggle:</b> Plan mode turns Cline into an architect that gathers information, asks clarifying
questions, and designs a solution. Switch back to Act mode to let him execute the plan!{" "}
<VSCodeLink href="https://x.com/sdrzn/status/1881761978986934582" style={{ display: "inline" }}>
See a demo here.
</VSCodeLink>
</li>
<li>
<b>Quick API/model switching</b> with a new popup menu under the chat field
</li>
<li>
<b>VS Code LM API</b> lets you use models from other extensions like GitHub Copilot
</li>
<li>
<b>MCP server improvements:</b> On/off toggle to disable servers when not in use, and Auto-approve option for
individual tools
</li>
<li>
In case you missed it, Cline now supports Checkpoints!{" "}
<VSCodeLink href="https://x.com/sdrzn/status/1876378124126236949" style={{ display: "inline" }}>
See it in action here.
</VSCodeLink>
</li>
</ul>
{/*<ul style={{ margin: "0 0 8px", paddingLeft: "12px" }}>
<li>
OpenRouter now supports prompt caching! They also have much higher rate limits than other providers,
so I recommend trying them out.
<br />
{!apiConfiguration?.openRouterApiKey && (
<VSCodeButtonLink
href={getOpenRouterAuthUrl(vscodeUriScheme)}
style={{
transform: "scale(0.85)",
transformOrigin: "left center",
margin: "4px -30px 2px 0",
}}>
Get OpenRouter API Key
</VSCodeButtonLink>
)}
{apiConfiguration?.openRouterApiKey && apiConfiguration?.apiProvider !== "openrouter" && (
<VSCodeButton
onClick={() => {
vscode.postMessage({
type: "apiConfiguration",
apiConfiguration: { ...apiConfiguration, apiProvider: "openrouter" },
})
}}
style={{
transform: "scale(0.85)",
transformOrigin: "left center",
margin: "4px -30px 2px 0",
}}>
Switch to OpenRouter
</VSCodeButton>
)}
</li>
<li>
<b>Edit Cline's changes before accepting!</b> When he creates or edits a file, you can modify his
changes directly in the right side of the diff view (+ hover over the 'Revert Block' arrow button in
the center to undo "<code>{"// rest of code here"}</code>" shenanigans)
</li>
<li>
New <code>search_files</code> tool that lets Cline perform regex searches in your project, letting
him refactor code, address TODOs and FIXMEs, remove dead code, and more!
</li>
<li>
When Cline runs commands, you can now type directly in the terminal (+ support for Python
environments)
</li>
</ul>*/}
<div
style={{
backgroundColor: "var(--vscode-editor-inactiveSelectionBackground)",
borderRadius: "3px",
padding: "12px 16px",
margin: "5px 15px 5px 15px",
position: "relative",
flexShrink: 0,
}}>
<VSCodeButton
appearance="icon"
onClick={hideAnnouncement}
style={{ position: "absolute", top: "8px", right: "8px" }}>
<span className="codicon codicon-close"></span>
</VSCodeButton>
<h3 style={{ margin: "0 0 8px" }}>{t("newInVersion", { version: minorVersion })}</h3>
<ul style={{ margin: "0 0 8px", paddingLeft: "12px" }}>
<li>
<b>Plan/Act mode toggle:</b> Plan mode turns Cline into an architect that gathers information, asks
clarifying questions, and designs a solution. Switch back to Act mode to let him execute the plan!{" "}
<VSCodeLink href="https://x.com/sdrzn/status/1881761978986934582" style={{ display: "inline" }}>
See a demo here.
</VSCodeLink>
</li>
<li>
<b>Quick API/model switching</b> with a new popup menu under the chat field
</li>
<li>
<b>VS Code LM API</b> lets you use models from other extensions like GitHub Copilot
</li>
<li>
<b>MCP server improvements:</b> On/off toggle to disable servers when not in use, and Auto-approve option
for individual tools
</li>
<li>
In case you missed it, Cline now supports Checkpoints!{" "}
<VSCodeLink href="https://x.com/sdrzn/status/1876378124126236949" style={{ display: "inline" }}>
See it in action here.
</VSCodeLink>
</li>
</ul>
<div
style={{
height: "1px",
background: "var(--vscode-foreground)",
opacity: 0.1,
margin: "8px 0",
height: "1px",
background: "var(--vscode-foreground)",
opacity: 0.1,
margin: "8px 0",
}}
/>
<p style={{ margin: "0" }}>
<Trans
i18nKey="announcement.joinOurCommunities"
components={{
DiscordLink: <VSCodeLink href="https://discord.gg/cline" />,
RedditLink: <VSCodeLink href="https://www.reddit.com/r/cline/" />,
}}
/>
<p style={{ margin: "0" }}>
<Trans
i18nKey="announcement.joinOurCommunities"
components={{
DiscordLink: <VSCodeLink href="https://discord.gg/cline" />,
RedditLink: <VSCodeLink href="https://www.reddit.com/r/cline/" />,
}}
/>
</p>
</div>
)
</p>
</div>
)
}