Skip to content

Commit ea525df

Browse files
authored
Merge pull request #722 from Kilo-Org/christiaan/key
Fix key props not being set
2 parents 27899cf + 3023357 commit ea525df

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

webview-ui/src/components/settings/ApiOptions.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { memo, useCallback, useEffect, useMemo, useState } from "react"
1+
import React, { Fragment, memo, useCallback, useEffect, useMemo, useState } from "react" // kilocode_change Fragment
22
import { convertHeadersToObject } from "./utils/headers"
33
import { useDebounce } from "react-use"
44
import { VSCodeButtonLink } from "../common/VSCodeButtonLink"
@@ -307,15 +307,14 @@ const ApiOptions = ({
307307
<SelectValue placeholder={t("settings:common.select")} />
308308
</SelectTrigger>
309309
<SelectContent>
310+
{/* kilocode_change start: separator */}
310311
{PROVIDERS.map(({ value, label }, i) => (
311-
<>
312-
<SelectItem key={value} value={value}>
313-
{label}
314-
</SelectItem>
315-
{/* kilocode_change */}
312+
<Fragment key={value}>
313+
<SelectItem value={value}>{label}</SelectItem>
316314
{i === 0 ? <SelectSeparator /> : null}
317-
</>
315+
</Fragment>
318316
))}
317+
{/* kilocode_change end */}
319318
</SelectContent>
320319
</Select>
321320
</div>

webview-ui/src/components/settings/ModelPicker.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useMemo, useState, useCallback, useEffect, useRef } from "react"
1+
import { useMemo, useState, useCallback, useEffect, useRef, Fragment } from "react" // kilocode_change Fragment
22
import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"
33
import { Trans } from "react-i18next"
44
import { ChevronsUpDown, Check, X } from "lucide-react"
@@ -193,10 +193,9 @@ export const ModelPicker = ({
193193
models?.[modelIds[i - 1]]?.preferredIndex !== null
194194

195195
return (
196-
<>
196+
<Fragment key={model}>
197197
{!isPreferred && previousModelWasPreferred ? <SelectSeparator /> : null}
198198
<CommandItem
199-
key={model}
200199
value={model}
201200
onSelect={onSelect}
202201
className={cn(isPreferred ? "font-semibold" : "")}>
@@ -208,7 +207,7 @@ export const ModelPicker = ({
208207
)}
209208
/>
210209
</CommandItem>
211-
</>
210+
</Fragment>
212211
)
213212
})}
214213
{/* kilocode_change end */}

0 commit comments

Comments
 (0)