Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: The symbol "provider" has already been declared #239

Closed
Corwin006 opened this issue Nov 10, 2024 · 2 comments
Closed

Error: The symbol "provider" has already been declared #239

Corwin006 opened this issue Nov 10, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Corwin006
Copy link

Corwin006 commented Nov 10, 2024

Describe the bug

There is an Error in the latest version.

20:34:26 [vite] Internal server error: Transform failed with 2 errors:
F:/AI/AI_Dev/bolt.new-any-llm/app/components/chat/BaseChat.tsx:116:10: ERROR: The symbol "provider" has already been declared
F:/AI/AI_Dev/bolt.new-any-llm/app/components/chat/BaseChat.tsx:116:10: ERROR: The symbol "setProvider" has already been declared
Plugin: vite:esbuild
File: F:/AI/AI_Dev/bolt.new-any-llm/app/components/chat/BaseChat.tsx:116:10

The symbol "provider" has already been declared
114| ) => {
115| const TEXTAREA_MAX_HEIGHT = chatStarted ? 400 : 200;
116| const [provider, setProvider] = useState(DEFAULT_PROVIDER);
| ^
117| const [apiKeys, setApiKeys] = useState<Record<string, string>>({});
118|

The symbol "setProvider" has already been declared
114| ) => {
115| const TEXTAREA_MAX_HEIGHT = chatStarted ? 400 : 200;
116| const [provider, setProvider] = useState(DEFAULT_PROVIDER);
| ^
117| const [apiKeys, setApiKeys] = useState<Record<string, string>>({});
118|

Link to the Bolt URL that caused the error

http://localhost:5173/

Steps to reproduce

Maybe caused by this commit:
SHA-1: 936a9c0

fix: respect provider choice from UI

Expected behavior

shouldn't display this error.

Screen Recording / Screenshot

image

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

@chrismahoney chrismahoney added the bug Something isn't working label Nov 12, 2024
@chrismahoney chrismahoney self-assigned this Nov 12, 2024
@chrismahoney
Copy link
Collaborator

chrismahoney commented Nov 12, 2024

Can you ensure you're on latest main branch and try this again? There is currently just one reference to instantiating provider/setProvider via useState on line 28 of BaseChat.

@Corwin006
Copy link
Author

Can you ensure you're on latest main branch and try this again? There is currently just one reference to instantiating provider/setProvider via useState on line 28 of BaseChat.

Thank you very much. After pulling the latest branch, the problem is resolved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants