Skip to content

Commit 0b445b0

Browse files
authored
Merge branch 'RooVetGit:main' into update-package.json
2 parents 821ee38 + e6f3bb7 commit 0b445b0

File tree

16 files changed

+633
-604
lines changed

16 files changed

+633
-604
lines changed

src/core/webview/ClineProvider.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2236,18 +2236,17 @@ export class ClineProvider implements vscode.WebviewViewProvider {
22362236

22372237
if (response.data) {
22382238
const rawModels: Record<string, any> = response.data
2239-
22402239
for (const [modelId, model] of Object.entries(rawModels)) {
22412240
models[modelId] = {
2242-
maxTokens: model.maxTokens ? parseInt(model.maxTokens) : undefined,
2243-
contextWindow: model.contextWindow ? parseInt(model.contextWindow) : 0,
2244-
supportsImages: model.supportsImages ?? false,
2245-
supportsPromptCache: model.supportsPromptCaching ?? false,
2246-
supportsComputerUse: model.supportsComputerUse ?? false,
2247-
inputPrice: model.inputTokenPrice ? parseFloat(model.inputTokenPrice) : undefined,
2248-
outputPrice: model.outputTokenPrice ? parseFloat(model.outputTokenPrice) : undefined,
2249-
cacheWritesPrice: model.cacheWritePrice ? parseFloat(model.cacheWritePrice) : undefined,
2250-
cacheReadsPrice: model.cacheReadPrice ? parseFloat(model.cacheReadPrice) : undefined,
2241+
maxTokens: model?.maxTokens ? parseInt(model.maxTokens) : undefined,
2242+
contextWindow: model?.contextWindow ? parseInt(model.contextWindow) : 0,
2243+
supportsImages: model?.supportsImages ?? false,
2244+
supportsPromptCache: model?.supportsPromptCaching ?? false,
2245+
supportsComputerUse: model?.supportsComputerUse ?? false,
2246+
inputPrice: model?.inputTokenPrice ? parseFloat(model.inputTokenPrice) : undefined,
2247+
outputPrice: model?.outputTokenPrice ? parseFloat(model.outputTokenPrice) : undefined,
2248+
cacheWritesPrice: model?.cacheWritePrice ? parseFloat(model.cacheWritePrice) : undefined,
2249+
cacheReadsPrice: model?.cacheReadPrice ? parseFloat(model.cacheReadPrice) : undefined,
22512250
}
22522251
}
22532252
}

webview-ui/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"build-storybook": "storybook build"
1616
},
1717
"dependencies": {
18+
"@radix-ui/react-alert-dialog": "^1.1.6",
1819
"@radix-ui/react-collapsible": "^1.1.3",
1920
"@radix-ui/react-dialog": "^1.1.6",
2021
"@radix-ui/react-dropdown-menu": "^2.1.5",
@@ -23,7 +24,7 @@
2324
"@radix-ui/react-progress": "^1.1.2",
2425
"@radix-ui/react-separator": "^1.1.2",
2526
"@radix-ui/react-slider": "^1.2.3",
26-
"@radix-ui/react-slot": "^1.1.1",
27+
"@radix-ui/react-slot": "^1.1.2",
2728
"@radix-ui/react-tooltip": "^1.1.8",
2829
"@tailwindcss/vite": "^4.0.0",
2930
"@vscode/webview-ui-toolkit": "^1.4.0",

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

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { ApiConfigMeta } from "../../../../src/shared/ExtensionMessage"
44
import { Dropdown } from "vscrui"
55
import type { DropdownOption } from "vscrui"
66
import { Dialog, DialogContent, DialogTitle } from "../ui/dialog"
7+
import { Button, Input } from "../ui"
78

89
interface ApiConfigManagerProps {
910
currentApiConfigName?: string
@@ -299,10 +300,7 @@ const ApiConfigManager = ({
299300
aria-labelledby="new-profile-title">
300301
<DialogContent className="p-4 max-w-sm">
301302
<DialogTitle>New Configuration Profile</DialogTitle>
302-
<button className="absolute right-4 top-4" aria-label="Close dialog" onClick={resetCreateState}>
303-
<span className="codicon codicon-close" />
304-
</button>
305-
<VSCodeTextField
303+
<Input
306304
ref={newProfileInputRef}
307305
value={newProfileName}
308306
onInput={(e: unknown) => {
@@ -327,15 +325,12 @@ const ApiConfigManager = ({
327325
</p>
328326
)}
329327
<div className="flex justify-end gap-2 mt-4">
330-
<VSCodeButton appearance="secondary" onClick={resetCreateState}>
328+
<Button variant="secondary" onClick={resetCreateState}>
331329
Cancel
332-
</VSCodeButton>
333-
<VSCodeButton
334-
appearance="primary"
335-
disabled={!newProfileName.trim()}
336-
onClick={handleNewProfileSave}>
330+
</Button>
331+
<Button variant="default" disabled={!newProfileName.trim()} onClick={handleNewProfileSave}>
337332
Create Profile
338-
</VSCodeButton>
333+
</Button>
339334
</div>
340335
</DialogContent>
341336
</Dialog>

0 commit comments

Comments
 (0)