Update Announcement

This commit is contained in:
Saoud Rizwan
2024-08-28 07:44:25 -04:00
parent 3d4e828850
commit d963966309
3 changed files with 20 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
import { useCallback, useMemo, useState } from "react"
import { useCallback, useEffect, useMemo, useState } from "react"
import { useEvent } from "react-use"
import { ExtensionMessage } from "../../src/shared/ExtensionMessage"
import { normalizeApiConfiguration } from "./components/ApiOptions"
@@ -10,7 +10,7 @@ import { ExtensionStateContextProvider, useExtensionState } from "./context/Exte
import { vscode } from "./utils/vscode"
const AppContent = () => {
const { apiConfiguration } = useExtensionState()
const { apiConfiguration, shouldShowAnnouncement } = useExtensionState()
const [showSettings, setShowSettings] = useState(false)
const [showHistory, setShowHistory] = useState(false)
const [showWelcome, setShowWelcome] = useState<boolean>(false)
@@ -26,11 +26,6 @@ const AppContent = () => {
message.state!.apiConfiguration?.awsAccessKey !== undefined ||
message.state!.apiConfiguration?.vertexProjectId !== undefined
setShowWelcome(!hasKey)
// don't update showAnnouncement to false if shouldShowAnnouncement is false
if (message.state!.shouldShowAnnouncement) {
setShowAnnouncement(true)
vscode.postMessage({ type: "didShowAnnouncement" })
}
break
case "action":
switch (message.action!) {
@@ -58,6 +53,13 @@ const AppContent = () => {
return normalizeApiConfiguration(apiConfiguration)
}, [apiConfiguration])
useEffect(() => {
if (shouldShowAnnouncement) {
setShowAnnouncement(true)
vscode.postMessage({ type: "didShowAnnouncement" })
}
}, [shouldShowAnnouncement])
return (
<>
{showWelcome ? (

View File

@@ -29,13 +29,19 @@ const Announcement = ({ version, hideAnnouncement, apiConfiguration, vscodeUriSc
<h3 style={{ margin: "0 0 8px" }}>
🎉{" "}New in v{version}
</h3>
<ul style={{ margin: "0 0 8px", paddingLeft: "12px" }}>
<li>
Added "Always allow read-only operations" setting to let Claude read files and view directories
without needing to approve (off by default).
Adds "Always allow read-only operations" setting to let Claude read files and view directories
without needing to approve (<b>off</b> by default).
</li>
<li>Adds sliding window context management to keep tasks going past 200k tokens.</li>
<li>
Adds Google Cloud Vertex AI support and updates Claude 3.5 Sonnet max output to 8192 tokens for all
providers.
</li>
<li>
Improves system prompt to guard against lazy edits (less "<code>{"//rest of code here"}</code>")
</li>
<li>Added sliding window context management to keep tasks going past 200k tokens.</li>
</ul>
<p style={{ margin: "0" }}>
Follow me for more updates!{" "}