From 2e865f32fe2990c6aff5116073fa6651c0bc8546 Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Sat, 21 Sep 2024 11:50:25 -0400 Subject: [PATCH] Prepare for release --- CHANGELOG.md | 5 +++ package.json | 2 +- src/providers/ClaudeDevProvider.ts | 2 +- src/utils/UrlContentFetcher.ts | 16 +++++----- webview-ui/src/components/Announcement.tsx | 36 ++++++++++++++++------ 5 files changed, 41 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17abc19..3c59c99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to the "claude-dev" extension will be documented in this fil +## [1.9.0] + +- Claude can now use a browser! This update adds a new `inspect_site` tool that captures screenshots and console logs from websites (including localhost), making it easier for Claude to troubleshoot issues on his own. +- Improved automatic linter/compiler debugging by only sending Claude new errors that result from his edits, rather than reporting all workspace problems. + ## [1.8.0] - You can now use '@' in the textarea to add context! diff --git a/package.json b/package.json index 6048664..aa96b35 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Claude Dev", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, and more with your permission every step of the way.", - "version": "1.8.1", + "version": "1.9.0", "icon": "icons/icon.png", "galleryBanner": { "color": "#1E1E1E", diff --git a/src/providers/ClaudeDevProvider.ts b/src/providers/ClaudeDevProvider.ts index 4335679..062b384 100644 --- a/src/providers/ClaudeDevProvider.ts +++ b/src/providers/ClaudeDevProvider.ts @@ -54,7 +54,7 @@ export class ClaudeDevProvider implements vscode.WebviewViewProvider { private view?: vscode.WebviewView | vscode.WebviewPanel private claudeDev?: ClaudeDev private workspaceTracker?: WorkspaceTracker - private latestAnnouncementId = "sep-19-2024" // update to some unique identifier when we add a new announcement + private latestAnnouncementId = "sep-21-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") diff --git a/src/utils/UrlContentFetcher.ts b/src/utils/UrlContentFetcher.ts index 717da49..f5c337b 100644 --- a/src/utils/UrlContentFetcher.ts +++ b/src/utils/UrlContentFetcher.ts @@ -1,7 +1,7 @@ import * as vscode from "vscode" import * as fs from "fs/promises" import * as path from "path" -import { Browser, Page, TimeoutError, launch } from "puppeteer-core" +import { Browser, Page, launch } from "puppeteer-core" import * as cheerio from "cheerio" import TurndownService from "turndown" // @ts-ignore @@ -113,18 +113,18 @@ export class UrlContentFetcher { }) try { - // networkidle0 is when there are no more than 0 network connections - this is better for local dev servers that often have fewer concurrent connections than production sites - await this.page.goto(url, { timeout: 10_000, waitUntil: ["domcontentloaded", "networkidle0"] }) + // networkidle2 is a good point to take a screenshot without having to wait for the timeout to hit if the site never reaches networkidle0 + await this.page.goto(url, { timeout: 10_000, waitUntil: ["domcontentloaded", "networkidle2"] }) } catch (err) { - // don't want to log in case of timeout error, that likely means the site just never reached networkidle0 but claude can still inspect the page and logs - if (!(err instanceof TimeoutError)) { - logs.push(`[Navigation Error] ${err.toString()}`) - } + // if (!(err instanceof TimeoutError)) { + // logs.push(`[Navigation Error] ${err.toString()}`) + // } + logs.push(`[Navigation Error] ${err.toString()}`) } // Wait for console inactivity, with a timeout await pWaitFor(() => Date.now() - lastLogTs >= 500, { - timeout: 5_000, + timeout: 3_000, interval: 100, }).catch(() => {}) diff --git a/webview-ui/src/components/Announcement.tsx b/webview-ui/src/components/Announcement.tsx index 476b9d8..9890a07 100644 --- a/webview-ui/src/components/Announcement.tsx +++ b/webview-ui/src/components/Announcement.tsx @@ -31,22 +31,38 @@ const Announcement = ({ version, hideAnnouncement }: AnnouncementProps) => {
You can now use '@' in the textarea to add context!
+inspect_site tool that captures
+ screenshots and console logs from websites (including localhost), making it easier for Claude to
+ troubleshoot issues on his own.
+