mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-08 17:34:51 +00:00
Flatten the profile fold's base selection and drop an unused import
This commit is contained in:
@@ -183,12 +183,9 @@ export function foldProfileFeatureValues<T extends ProfileOptionFields>(input: {
|
||||
if (featureValues) return { ...rest, options: { ...featureValues, ...ownOptions } };
|
||||
return ownOptions ? { ...rest, options: ownOptions } : rest;
|
||||
}
|
||||
const base =
|
||||
rest.options !== undefined
|
||||
? ownOptions
|
||||
: stored?.provider === rest.provider
|
||||
? convert(provider, stored?.options)
|
||||
: undefined;
|
||||
const storedOptions =
|
||||
stored?.provider === rest.provider ? convert(provider, stored?.options) : undefined;
|
||||
const base = rest.options !== undefined ? ownOptions : storedOptions;
|
||||
const options = applyProviderOptionsPatch({ options: base, patch: featureValues ?? {} });
|
||||
return Object.keys(options).length > 0 ? { ...rest, options } : { ...rest, options: undefined };
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createTestLogger } from "../../test-utils/test-logger.js";
|
||||
import type {
|
||||
AgentClient,
|
||||
AgentDraftControls,
|
||||
AgentOptionControl,
|
||||
AgentModelDefinition,
|
||||
AgentMode,
|
||||
AgentSessionConfig,
|
||||
|
||||
Reference in New Issue
Block a user