|
1 | 1 | import React, { memo, useCallback, useEffect, useMemo, useState } from "react" |
2 | 2 | import { convertHeadersToObject } from "./utils/headers" |
3 | 3 | import { useDebounce } from "react-use" |
4 | | -import { VSCodeLink, VSCodeButton } from "@vscode/webview-ui-toolkit/react" |
| 4 | +import { VSCodeLink, VSCodeButton, VSCodeCheckbox, VSCodeTextField } from "@vscode/webview-ui-toolkit/react" |
5 | 5 | import { ExternalLinkIcon } from "@radix-ui/react-icons" |
6 | 6 |
|
7 | 7 | import { |
@@ -765,6 +765,32 @@ const ApiOptions = ({ |
765 | 765 | fuzzyMatchThreshold={apiConfiguration.fuzzyMatchThreshold} |
766 | 766 | onChange={(field, value) => setApiConfigurationField(field, value)} |
767 | 767 | /> |
| 768 | + |
| 769 | + {/* Morph Fast Apply - provider-scoped controls */} |
| 770 | + <div className="pl-3 border-l-2 border-vscode-button-background space-y-2"> |
| 771 | + <label className="block font-medium">Morph Fast Apply</label> |
| 772 | + <div className="flex flex-col gap-1"> |
| 773 | + <VSCodeCheckbox |
| 774 | + checked={Boolean(apiConfiguration.morphFastApplyEnabled)} |
| 775 | + onChange={(e: any) => |
| 776 | + setApiConfigurationField("morphFastApplyEnabled", e.target.checked) |
| 777 | + }> |
| 778 | + Enable Morph Fast Apply (fuzzy multi-file) |
| 779 | + </VSCodeCheckbox> |
| 780 | + |
| 781 | + <VSCodeTextField |
| 782 | + value={apiConfiguration?.morphApiKey || ""} |
| 783 | + type="password" |
| 784 | + onInput={(e: any) => setApiConfigurationField("morphApiKey", e.target.value)} |
| 785 | + placeholder="Optional API key"> |
| 786 | + Morph API key (optional) |
| 787 | + </VSCodeTextField> |
| 788 | + <div className="text-sm text-vscode-descriptionForeground"> |
| 789 | + When enabled, apply_diff uses faster tolerant matching across multiple files. An API |
| 790 | + key is only required if using a hosted Morph service. |
| 791 | + </div> |
| 792 | + </div> |
| 793 | + </div> |
768 | 794 | {selectedModelInfo?.supportsTemperature !== false && ( |
769 | 795 | <TemperatureControl |
770 | 796 | value={apiConfiguration.modelTemperature} |
|
0 commit comments