gptscript-ai / desktop

MIT License
22 stars 13 forks source link

Thread becomes unusable when adding of tools fail. #222

Closed sangee2004 closed 2 months ago

sangee2004 commented 2 months ago

electron version -e8fcaa0fec4765d6

Steps to reproduce the problem:

  1. Launch chat page.

  2. Use "Add Tool" option in the chat window with Tildy and choose vision tool and quit the tool catalog page. Once the user is brought back to the chat window , notice that we are stuck in "loading" state for ever.

    Screenshot 2024-08-21 at 11 18 38 AM
  3. Not able to launch the option list in the chat message at this time.

Expected Behavior: We should be able to show the error we encountered when adding this tool and provide the user the ability to remove this tool.

sangee2004 commented 2 months ago

I see the same behavior when I try to add slack tool as well.

thedadams commented 2 months ago

PR: https://github.com/gptscript-ai/desktop/pull/228

cjellick commented 2 months ago

@thedadams do you recall why you moved this back out of testing?

thedadams commented 2 months ago

I don't remember, but this won't happen anymore based on the changes I merged this morning. I will move it back to Testing.

sangee2004 commented 2 months ago

Tested with latest build from 37b7672110

  1. Start a chat with Tildy and add tool using "Add by URL" by providing invalid url like - github.com/trash Earlier we used to see this result in the user being brought back to chat window where we will be stuck in "loading" state for ever.

This does not happen anymore.

  1. We see the tool being added successfully which is very misleading at this time

Image

When I have any chat conversation is when I am presented with the following error message:

Image

I am able to remove the tool and continue to chat in this thread as expected.

  1. Remove tool confirmation gives this "undefined" message

Image

Reopening this issue for the following clarifications:

Wanted to know if in step 2 , we should be able to show the error messages relating to the tool load (which is currently seen only after a chat message) and not show the tool as being added in this case ?

If we cannot prevent the tool from being added to the "Assistant's list" , is there a way to indicate that there is a problem with this tool ?

Another minor issue is with "undefined" message in step 3.

thedadams commented 2 months ago

The way adding a dynamic tool is done now, there isn't a way to tell if there will be an issue with the tool before running it. Similar to gptscript: you run the tool and you will see if there is an error.

I will fix the "undefined" message.

thedadams commented 2 months ago

PR: https://github.com/gptscript-ai/desktop/pull/345

sangee2004 commented 2 months ago

The issue with tool name that is getting removed is not seen anymore when testing with d2d9d7ece9

Image