ソースを参照

Update Announcement

Saoud Rizwan 1 年間 前
コミット
d963966309

+ 1 - 1
src/providers/ClaudeDevProvider.ts

@@ -34,7 +34,7 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
 	private disposables: vscode.Disposable[] = []
 	private view?: vscode.WebviewView | vscode.WebviewPanel
 	private claudeDev?: ClaudeDev
-	private latestAnnouncementId = "aug-26-2024" // update to some unique identifier when we add a new announcement
+	private latestAnnouncementId = "aug-28-2024" // update to some unique identifier when we add a new announcement
 
 	constructor(readonly context: vscode.ExtensionContext, private readonly outputChannel: vscode.OutputChannel) {
 		this.outputChannel.appendLine("ClaudeDevProvider instantiated")

+ 9 - 7
webview-ui/src/App.tsx

@@ -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 ? (

+ 10 - 4
webview-ui/src/components/Announcement.tsx

@@ -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!{" "}