feat(FN-3006): merge fusion/fn-3006
Commits merged: - fix(FN-3006): complete Step 3 — repair dashboard typecheck mapper signatures - test(FN-3006): complete Step 2 — cover Use default reselection flow - feat(FN-3006): complete Step 1 — resolve default model selection target Files changed: .../app/components/ModelOnboardingModal.tsx | 24 ++++++--- packages/dashboard/app/components/QuickChatFAB.tsx | 13 +++-- .../dashboard/app/components/SettingsModal.tsx | 24 ++++++--- .../app/components/__tests__/QuickChatFAB.test.tsx | 61 ++++++++++++++++++++++ 4 files changed, 103 insertions(+), 19 deletions(-) Fusion-Task-Id: FN-3006
This commit is contained in:
@@ -25,14 +25,22 @@ import { LoginInstructions } from "./LoginInstructions";
|
||||
import { CustomProviderForm } from "./CustomProviderForm";
|
||||
import { appendTokenQuery } from "../auth";
|
||||
|
||||
const mapLegacyCustomProviderToConfig = (provider: CustomProvider): CustomProviderConfig => ({
|
||||
id: provider.id,
|
||||
name: provider.name,
|
||||
baseUrl: provider.baseUrl,
|
||||
api: provider.apiType === "anthropic-compatible" ? "anthropic-messages" : "openai-responses",
|
||||
apiKey: provider.apiKey,
|
||||
models: provider.models?.map((model) => ({ id: model.id, name: model.name })) ?? [],
|
||||
});
|
||||
const mapLegacyCustomProviderToConfig = (
|
||||
provider: CustomProvider | CustomProviderConfig,
|
||||
): CustomProviderConfig => {
|
||||
if ("api" in provider) {
|
||||
return provider;
|
||||
}
|
||||
|
||||
return {
|
||||
id: provider.id,
|
||||
name: provider.name,
|
||||
baseUrl: provider.baseUrl,
|
||||
api: provider.apiType === "anthropic-compatible" ? "anthropic-messages" : "openai-responses",
|
||||
apiKey: provider.apiKey,
|
||||
models: provider.models?.map((model) => ({ id: model.id, name: model.name })) ?? [],
|
||||
};
|
||||
};
|
||||
|
||||
/** Provider-specific API key setup metadata for onboarding form rendering */
|
||||
interface ApiKeyInfo {
|
||||
|
||||
Reference in New Issue
Block a user