Skip to content

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Jul 28, 2025

Related Issue

Issue: #XXXX

Description

  • Clear streamingFailedMessage when user manually retries
  • Convert imports to type-only where appropriate
  • Reorder imports for better organization
  • Add explicit type annotations for better type safety
  • Move node:timers/promises import to top

Test Procedure

image
  1. in a task where last message was failed with error, address the error (log in again if it's an auth error) before re-trying the task
  2. The error should be removed before processing the task again

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • ♻️ Refactor Changes
  • 💅 Cosmetic Changes
  • 📚 Documentation update
  • 🏃 Workflow Changes

Pre-flight Checklist

  • Changes are limited to a single feature, bugfix or chore (split larger changes into separate PRs)
  • Tests are passing (npm test) and code is formatted and linted (npm run format && npm run lint)
  • I have created a changeset using npm run changeset (required for user-facing changes)
  • I have reviewed contributor guidelines

Screenshots

After

Screen.Recording.2025-08-04.at.3.36.11.PM.mov

Before

Screen.Recording.2025-08-04.at.3.42.43.PM.mov

Additional Notes


Important

Clear streamingFailedMessage when user manually retries a task and improve code quality in index.ts.

  • Behavior:
    • Clear streamingFailedMessage in attemptApiRequest() in index.ts when user manually retries a task.
  • Imports:
    • Convert imports to type-only where appropriate in index.ts.
    • Reorder imports in index.ts for better organization.
  • Types:
    • Add explicit type annotations in index.ts for better type safety.

This description was created by Ellipsis for e8b5cc0. You can customize this summary. It will automatically update as commits are pushed.

abeatrix added 2 commits July 28, 2025 13:51
- Clear streamingFailedMessage when user manually retries
- Convert imports to type-only where appropriate
- Reorder imports for better organization
- Add explicit type annotations for better type safety
- Move node:timers/promises import to top
@Copilot Copilot AI review requested due to automatic review settings July 28, 2025 20:53
Copy link

changeset-bot bot commented Jul 28, 2025

🦋 Changeset detected

Latest commit: e8b5cc0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
claude-dev Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug where streaming failure messages were not being cleared when a user manually retries a task, while also performing code organization improvements.

  • Clear streamingFailedMessage when user manually retries to improve UX
  • Convert imports to type-only where appropriate for better TypeScript performance
  • Add explicit type annotations and reorganize imports for better code maintainability

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/core/task/index.ts Main fix to clear streaming errors on retry, plus import reorganization and type safety improvements
.changeset/clean-sheep-breathe.md Changelog entry documenting the user-facing bug fix
Comments suppressed due to low confidence (2)

src/core/task/index.ts:453

  • [nitpick] Adding braces around this case is inconsistent with the "workspace" case below. Either add braces to all cases or remove them from this one for consistency.
				case "taskAndWorkspace": {

src/core/task/index.ts:2343

  • [nitpick] Adding braces around this case creates inconsistency with other cases in the same switch statement that don't use braces.
						case "text": {

Copy link
Contributor

github-actions bot commented Jul 28, 2025

Coverage Report

Extension Coverage

Base branch: 47%

PR branch: 48%

✅ Coverage increased or remained the same

Webview Coverage

Base branch: 17%

PR branch: 17%

✅ Coverage increased or remained the same

Overall Assessment

Test coverage has been maintained or improved

Last updated: 2025-08-04T22:54:42.448570

@pashpashpash
Copy link
Contributor

Code looks alright, I have not tested this yet though. I'd like to test this again once #5158 is merged. Let's hold off on merging this until that's in.

Copy link
Contributor

@arafatkatze arafatkatze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR does what it claims to do and the behavior was verified in the debugger environment.

@arafatkatze arafatkatze merged commit 7620f17 into main Aug 5, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants