Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Conversation

@MarcMcIntosh
Copy link
Contributor

@MarcMcIntosh MarcMcIntosh commented Feb 13, 2025

Patch improvements

Description

📍 notation has been removed, patches are now down in tool messages. This PR removed the code for the pin messages and uses a dedicated ui for the tool if it's a textdoc type tool.

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)
  • Refactoring (no functional changes, only code improvements)
  • Documentation update

How to Test

  • Step 1: Build chat
  • Step 2: run the dev brnch of the lsp
  • Step 3: checkout the new-patch-functions branch of refact-vscode
  • Step 4: ask a agentic model to make changes to the code base.

Screenshots (if applicable)

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.
  • I have updated the documentation where necessary.

Linked Issues

Additional Notes

 Conflicts:
	src/__tests__/PinMessages.test.tsx
	src/components/Callout/Callout.tsx

 Changes to be committed:
	modified:   package-lock.json
	modified:   package.json
	modified:   src/__fixtures__/chat.ts
	modified:   src/__fixtures__/chat_config_thread.ts
	modified:   src/__fixtures__/chat_links_response.ts
	modified:   src/__fixtures__/history.ts
	modified:   src/__fixtures__/msw.ts
	modified:   src/__fixtures__/some_chrome_screenshots.ts
	modified:   src/__tests__/DeleteChat.test.tsx
	modified:   src/__tests__/RestoreChat.test.tsx
	modified:   src/components/Callout/Callout.tsx
	modified:   src/components/Chat/Chat.stories.tsx
	modified:   src/components/Chat/Chat.tsx
	modified:   src/components/ChatContent/ChatContent.stories.tsx
	modified:   src/components/ChatForm/ChatControls.tsx
	modified:   src/components/ChatForm/ChatForm.tsx
	new file:   src/components/ChatForm/SuggestNewChat/SuggestNewChat.module.css
	new file:   src/components/ChatForm/SuggestNewChat/SuggestNewChat.tsx
	new file:   src/components/ChatForm/SuggestNewChat/index.ts
	modified:   src/components/IntegrationsView/DisplayIntegrations/IntegrationCard.module.css
	modified:   src/components/IntegrationsView/DisplayIntegrations/IntegrationCard.tsx
	new file:   src/components/IntegrationsView/DisplayIntegrations/useUpdateIntegration.ts
	modified:   src/components/IntegrationsView/IntegrationsView.tsx
	modified:   src/components/IntegrationsView/hooks/useIntegrations.ts
	modified:   src/features/Chat/Thread/actions.ts
	modified:   src/features/Chat/Thread/reducer.ts
	modified:   src/features/Chat/Thread/selectors.ts
	modified:   src/features/Chat/Thread/types.ts
	modified:   src/hooks/useCapsForToolUse.ts
	modified:   src/hooks/useLinksFromLsp.ts
	modified:   src/services/refact/links.ts
@MarcMcIntosh MarcMcIntosh marked this pull request as ready for review February 17, 2025 15:02

const handleRetryClick = () => {
// TBD: why was this added?
// if (preventRetry) return;
Copy link
Member

Choose a reason for hiding this comment

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

This was added in PR for special callouts on 401 errors, when I needed to prevent closing of callout to make them request help or re-login.

But though this functionality now doesn't work, just because LSP still returns 500 codes

Comment on lines 97 to 103
"error" in results &&
typeof results.error === "object" &&
"data" in results.error &&
results.error.data &&
typeof results.error.data === "object" &&
"detail" in results.error.data &&
typeof results.error.data.detail === "string"
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't all of these checks live in local and near-living typeguard functions?

)}
</Flex>
{errorMessage && (
<ErrorCallout onClick={clearErrorMessage} timeout={5000} preventRetry>
Copy link
Member

Choose a reason for hiding this comment

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

Please, uncomment in Callout.tsx preventRetry property, we might need to come up with better naming to avoid commenting it out in the future :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay I'll need to change the order of checking preventRetry and closing the error message.

@alashchev17
Copy link
Member

It looks nice, though a few comments left

Copy link
Member

@alashchev17 alashchev17 left a comment

Choose a reason for hiding this comment

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

LGTM :)

@MarcMcIntosh MarcMcIntosh merged commit 149e2b0 into alpha Feb 18, 2025
2 checks passed
@MarcMcIntosh MarcMcIntosh deleted the patch-impovements branch February 18, 2025 12:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants