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

@@ -34,7 +34,7 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider {
private disposables: vscode.Disposable[] = [] private disposables: vscode.Disposable[] = []
private view?: vscode.WebviewView | vscode.WebviewPanel private view?: vscode.WebviewView | vscode.WebviewPanel
private claudeDev?: ClaudeDev 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) { constructor(readonly context: vscode.ExtensionContext, private readonly outputChannel: vscode.OutputChannel) {
this.outputChannel.appendLine("ClaudeDevProvider instantiated") this.outputChannel.appendLine("ClaudeDevProvider instantiated")

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

View File

@@ -29,13 +29,19 @@ const Announcement = ({ version, hideAnnouncement, apiConfiguration, vscodeUriSc
<h3 style={{ margin: "0 0 8px" }}> <h3 style={{ margin: "0 0 8px" }}>
🎉{" "}New in v{version} 🎉{" "}New in v{version}
</h3> </h3>
<ul style={{ margin: "0 0 8px", paddingLeft: "12px" }}> <ul style={{ margin: "0 0 8px", paddingLeft: "12px" }}>
<li> <li>
Added "Always allow read-only operations" setting to let Claude read files and view directories Adds "Always allow read-only operations" setting to let Claude read files and view directories
without needing to approve (off by default). 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>
<li>Added sliding window context management to keep tasks going past 200k tokens.</li>
</ul> </ul>
<p style={{ margin: "0" }}> <p style={{ margin: "0" }}>
Follow me for more updates!{" "} Follow me for more updates!{" "}