Skip to content

Commit

Permalink
Merge pull request #1122 from System233/patch-model-picker
Browse files Browse the repository at this point in the history
fix: ModelID cannot be saved and refactor ModelPicker
  • Loading branch information
cte authored Feb 26, 2025
2 parents 6d38e34 + 4897500 commit 3860abf
Show file tree
Hide file tree
Showing 19 changed files with 1,214 additions and 505 deletions.
6 changes: 6 additions & 0 deletions webview-ui/src/__mocks__/lucide-react.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from "react"

export const Check = () => React.createElement("div")
export const ChevronsUpDown = () => React.createElement("div")
export const Loader = () => React.createElement("div")
export const X = () => React.createElement("div")
3 changes: 3 additions & 0 deletions webview-ui/src/__mocks__/vscrui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export const Dropdown = ({ children, value, onChange }: any) =>

export const Pane = ({ children }: any) => React.createElement("div", { "data-testid": "mock-pane" }, children)

export const Button = ({ children, ...props }: any) =>
React.createElement("div", { "data-testid": "mock-button", ...props }, children)

export type DropdownOption = {
label: string
value: string
Expand Down
16 changes: 16 additions & 0 deletions webview-ui/src/components/settings/ApiErrorMessage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from "react"

interface ApiErrorMessageProps {
errorMessage: string | undefined
children?: React.ReactNode
}
const ApiErrorMessage = ({ errorMessage, children }: ApiErrorMessageProps) => {
return (
<div className="text-vscode-errorForeground text-sm">
<span style={{ fontSize: "2em" }} className={`codicon codicon-close align-middle mr-1`} />
{errorMessage}
{children}
</div>
)
}
export default ApiErrorMessage
Loading

0 comments on commit 3860abf

Please sign in to comment.