gptscript-ai / desktop

MIT License
22 stars 13 forks source link

No way to remove the tool entry that was failed to get added from featured tool list #479

Open sangee2004 opened 2 months ago

sangee2004 commented 2 months ago

Electron build - b6c00b533

Steps to lead to this problem: I had tried to add Hubspot tool to an existing assistant which failed due to - https://github.com/gptscript-ai/desktop/issues/434 After this failure , when I try to chat with this assistant , I am getting the following error

Screenshot 2024-09-10 at 9 16 49 AM

Edit page for this assistant shows no tool entries.

Screenshot 2024-09-10 at 9 18 08 AM

Assistant script file (from gateway) shows github.com/gptscript-ai/tools/apis/hubspot/crm tool being present.

Name: github-agent1
Description: An agent to help you with GitHub related tasks using the gh cli
Type: Tool
Tools: sys.exec, github.com/gptscript-ai/tools/apis/outlook/mail/manage, github.com/gptscript-ai/tools/apis/slack/write, github.com/sangee2004/testrepo/context/direct, github.com/gptscript-ai/tools/apis/hubspot/crm
Context: dynamic-instructions
Chat: true

You are a helpful assistant named New Assistant. When you first start, just introduce yourself and wait for the user's next message updated

---
Name: dynamic-instructions
Type: Tool

#!/usr/bin/env bash

echo "The following is the help text for the gh cli and some of its sub-commands. Use these when figuring out how to construct new commands.  Note that the --search flag is used for filtering and sorting as well; there is no dedicated --sort flag."
gh --help
gh repo --help
gh issue --help
gh issue list --help
gh issue create --help
gh issue comment --help
gh issue delete --help
gh issue edit --help
gh pr --help
gh pr create --help
gh pr checkout --help
gh release --help
gh release create --help

Expected Behavior: When there is a failure to load a tool , is it possible to not have it added to the assistant to begin with ? Or get it removed from the assistant when the failure is encountered? If this is not possible , then we should be able to show this tool as being in bad state and provide user the ability to get it removed.

thedadams commented 2 months ago

Related issue: https://github.com/gptscript-ai/desktop/issues/296

The linked issue mentions that if an invalid tool exists on the assistant, then the entire tools section of the edit screen is blank.