Skip to content

Commit 396e949

Browse files
committed
Improve URL field handling in ApiOptions
1 parent 6037140 commit 396e949

File tree

11 files changed

+268
-120
lines changed

11 files changed

+268
-120
lines changed

webview-ui/package-lock.json

Lines changed: 38 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"build-storybook": "storybook build"
1515
},
1616
"dependencies": {
17+
"@hookform/resolvers": "^3.10.0",
1718
"@radix-ui/react-dropdown-menu": "^2.1.5",
1819
"@radix-ui/react-icons": "^1.3.2",
1920
"@radix-ui/react-slot": "^1.1.1",
@@ -26,6 +27,7 @@
2627
"fzf": "^0.5.2",
2728
"react": "^18.3.1",
2829
"react-dom": "^18.3.1",
30+
"react-hook-form": "^7.54.2",
2931
"react-remark": "^2.1.0",
3032
"react-textarea-autosize": "^8.5.3",
3133
"react-use": "^17.5.1",
@@ -36,7 +38,8 @@
3638
"tailwind-merge": "^2.6.0",
3739
"tailwindcss": "^4.0.0",
3840
"tailwindcss-animate": "^1.0.7",
39-
"vscrui": "^0.2.0"
41+
"vscrui": "^0.2.0",
42+
"zod": "^3.24.1"
4043
},
4144
"devDependencies": {
4245
"@storybook/addon-essentials": "^8.5.2",

webview-ui/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useEvent } from "react-use"
33
import { ExtensionMessage } from "../../src/shared/ExtensionMessage"
44
import ChatView from "./components/chat/ChatView"
55
import HistoryView from "./components/history/HistoryView"
6-
import SettingsView from "./components/settings/SettingsView"
6+
import { SettingsView } from "./components/settings/SettingsView"
77
import WelcomeView from "./components/welcome/WelcomeView"
88
import { ExtensionStateContextProvider, useExtensionState } from "./context/ExtensionStateContext"
99
import { vscode } from "./utils/vscode"

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { VSCodeButton, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"
2-
import { memo, useEffect, useRef, useState } from "react"
2+
import { useEffect, useRef, useState } from "react"
33
import { ApiConfigMeta } from "../../../../src/shared/ExtensionMessage"
44
import { Dropdown } from "vscrui"
55
import type { DropdownOption } from "vscrui"
@@ -13,7 +13,7 @@ interface ApiConfigManagerProps {
1313
onUpsertConfig: (configName: string) => void
1414
}
1515

16-
const ApiConfigManager = ({
16+
export const ApiConfigManager = ({
1717
currentApiConfigName = "",
1818
listApiConfigMeta = [],
1919
onSelectConfig,
@@ -215,5 +215,3 @@ const ApiConfigManager = ({
215215
</div>
216216
)
217217
}
218-
219-
export default memo(ApiConfigManager)

0 commit comments

Comments
 (0)