Skip to content

Commit 5c4680a

Browse files
committed
Revert these
1 parent e4eeab6 commit 5c4680a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/core/config/__tests__/ContextProxy.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// npx jest src/core/config/__tests__/ContextProxy.test.ts
22

3+
import fs from "fs/promises"
4+
35
import * as vscode from "vscode"
46
import { ContextProxy } from "../ContextProxy"
57

webview-ui/src/context/ExtensionStateContext.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
174174
(value: ApiConfigMeta[]) => setState((prevState) => ({ ...prevState, listApiConfigMeta: value })),
175175
[],
176176
)
177-
178177
const handleMessage = useCallback(
179178
(event: MessageEvent) => {
180179
const message: ExtensionMessage = event.data
@@ -254,7 +253,13 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
254253
setExperimentEnabled: (id, enabled) =>
255254
setState((prevState) => ({ ...prevState, experiments: { ...prevState.experiments, [id]: enabled } })),
256255
setApiConfiguration: (value) =>
257-
setState((prevState) => ({ ...prevState, apiConfiguration: { ...prevState.apiConfiguration, ...value } })),
256+
setState((prevState) => ({
257+
...prevState,
258+
apiConfiguration: {
259+
...prevState.apiConfiguration,
260+
...value,
261+
},
262+
})),
258263
setCustomInstructions: (value) => setState((prevState) => ({ ...prevState, customInstructions: value })),
259264
setAlwaysAllowReadOnly: (value) => setState((prevState) => ({ ...prevState, alwaysAllowReadOnly: value })),
260265
setAlwaysAllowReadOnlyOutsideWorkspace: (value) =>

0 commit comments

Comments
 (0)