Conversation
| console.error(errorMessage); | ||
|
|
||
| if (toastId) toast.dismiss(toastId); | ||
| toast(<ErrorMsg name={extensionName} message={data.message} />, { |
There was a problem hiding this comment.
Now that we have ToastError I think you can remove the custom ErrorMsg component and just use the reusable version.
|
|
||
| try { | ||
| toastId = toast.loading(`${actionVerb} ${extensionName} extension...`, { | ||
| position: 'top-center', |
There was a problem hiding this comment.
Do we want to go with top-center for more things? I'm just thinking it might feel inconsistent as other things use top right. I am good with either - perhaps we should just be consistent across the board!
There was a problem hiding this comment.
The top right was annoying and covered the more menu :D top left covered the exit button lol
| const errorMessage = `Failed to ${actionType === 'adding' ? 'add' : 'remove'} ${extensionName} extension: ${error instanceof Error ? error.message : 'Unknown error'}`; | ||
| console.error(errorMessage); | ||
| if (toastId) toast.dismiss(toastId); | ||
| toast.error(errorMessage, { autoClose: false }); |
There was a problem hiding this comment.
This can also nicely be ToastError
| // First add to the config system | ||
| await addExtensionFn(nameToKey(name), config, true); | ||
|
|
||
| if (config.type != 'stdio') { |
There was a problem hiding this comment.
The V1 implementation supported the other kinds as well so this is a reminder to myself to go in very quickly after this and refactor to support HTTP+SSE ones as well.
Implements these flows for adding, removing, and updating extensions:

Follow up PRs will unify this with index.ts