gptscript-ai / desktop

MIT License
22 stars 13 forks source link

Copy option for tools in `https://tools.gptscript.ai` has "tool:<tool-url>" which when used in `Add by url` breaks. #442

Closed sangee2004 closed 1 month ago

sangee2004 commented 1 month ago

Electron build - f8cb3bd9

Steps to reproduce the problem:

  1. Chat with Tildy
  2. Use "Add tool from URL" option and use the link to "Community Catalog"
  3. Search for any tool in this site
  4. Open the link for the tool presented in the search result.
  5. Use the copy option to get the tool url and paste in the "Add tool from URL"

Notice that this this has "tool:" prepended to the url which causes the add tool to fail with following errors:

2024-09-05T20:34:42.269Z [server] [ERROR] Error: failed to load tools: github.com/gptscript-ai/tools/clis/digitalocean
    at IncomingMessage.<anonymous> (/Users/sangeethahariharan/acorn/desktop/electron-dist/mac-arm64/Acorn.app/Contents/Resources/app.asar/.next/server/chunks/666.js:28:104752)
    at IncomingMessage.emit (node:events:531:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  digest: '3970568234'
}
2024-09-05T20:34:42.274Z [client] [ERROR] Error: An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.

Expected Behavior: Have the copy option return just the tool url .

tylerslaton commented 1 month ago

Oh github automatically closed this, sorry @sangee2004.

sangee2004 commented 1 month ago

Copy text from community catalog now does not have "tool:" prepended to the tool url and when used in "Add tool from URL" succeeds as expected.