Skip to content

Commit f52ba2e

Browse files
authored
Merge pull request #296 from chrismahoney/fix/provider-consolelog
Fix/provider consolelog
2 parents 57c0236 + e799197 commit f52ba2e

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

app/components/chat/BaseChat.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const ModelSelector = ({ model, setModel, provider, setProvider, modelList, prov
3333
<select
3434
value={provider?.name}
3535
onChange={(e) => {
36-
setProvider(providerList.find(p => p.name === e.target.value));
36+
setProvider(providerList.find((p) => p.name === e.target.value));
3737
const firstModel = [...modelList].find((m) => m.provider == e.target.value);
3838
setModel(firstModel ? firstModel.name : '');
3939
}}
@@ -49,7 +49,7 @@ const ModelSelector = ({ model, setModel, provider, setProvider, modelList, prov
4949
key={provider?.name}
5050
value={model}
5151
onChange={(e) => setModel(e.target.value)}
52-
style={{maxWidth: "70%"}}
52+
style={{ maxWidth: '70%' }}
5353
className="flex-1 p-2 rounded-lg border border-bolt-elements-borderColor bg-bolt-elements-prompt-background text-bolt-elements-textPrimary focus:outline-none focus:ring-2 focus:ring-bolt-elements-focus transition-all"
5454
>
5555
{[...modelList]
@@ -111,12 +111,10 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
111111
},
112112
ref,
113113
) => {
114-
console.log(provider);
115114
const TEXTAREA_MAX_HEIGHT = chatStarted ? 400 : 200;
116115
const [apiKeys, setApiKeys] = useState<Record<string, string>>({});
117116
const [modelList, setModelList] = useState(MODEL_LIST);
118117

119-
120118
useEffect(() => {
121119
// Load API keys from cookies on component mount
122120
try {
@@ -133,7 +131,7 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
133131
Cookies.remove('apiKeys');
134132
}
135133

136-
initializeModelList().then(modelList => {
134+
initializeModelList().then((modelList) => {
137135
setModelList(modelList);
138136
});
139137
}, []);
@@ -207,12 +205,13 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
207205
setProvider={setProvider}
208206
providerList={PROVIDER_LIST}
209207
/>
210-
{provider &&
208+
{provider && (
211209
<APIKeyManager
212210
provider={provider}
213211
apiKey={apiKeys[provider.name] || ''}
214212
setApiKey={(key) => updateApiKey(provider.name, key)}
215-
/>}
213+
/>
214+
)}
216215
<div
217216
className={classNames(
218217
'shadow-lg border border-bolt-elements-borderColor bg-bolt-elements-prompt-background backdrop-filter backdrop-blur-[8px] rounded-lg overflow-hidden transition-all',

app/components/workbench/EditorPanel.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { isMobile } from '~/utils/mobile';
2323
import { FileBreadcrumb } from './FileBreadcrumb';
2424
import { FileTree } from './FileTree';
2525
import { Terminal, type TerminalRef } from './terminal/Terminal';
26+
import React from 'react';
2627

2728
interface EditorPanelProps {
2829
files?: FileMap;
@@ -203,7 +204,7 @@ export const EditorPanel = memo(
203204
const isActive = activeTerminal === index;
204205

205206
return (
206-
<>
207+
<React.Fragment key={index}>
207208
{index == 0 ? (
208209
<button
209210
key={index}
@@ -222,7 +223,7 @@ export const EditorPanel = memo(
222223
Bolt Terminal
223224
</button>
224225
) : (
225-
<>
226+
<React.Fragment>
226227
<button
227228
key={index}
228229
className={classNames(
@@ -238,9 +239,9 @@ export const EditorPanel = memo(
238239
<div className="i-ph:terminal-window-duotone text-lg" />
239240
Terminal {terminalCount > 1 && index}
240241
</button>
241-
</>
242+
</React.Fragment>
242243
)}
243-
</>
244+
</React.Fragment>
244245
);
245246
})}
246247
{terminalCount < MAX_TERMINALS && <IconButton icon="i-ph:plus" size="md" onClick={addTerminal} />}

0 commit comments

Comments
 (0)