Skip to content
TypeScript

refactor(mobile): remove unused provider option summary (#9971)

Julius Marmingec1e279eca52e
diff --git a/apps/mobile/src/lib/providerOptions.test.ts b/apps/mobile/src/lib/providerOptions.test.ts
index d87df6baaf1..9b94cecb3db 100644
--- a/apps/mobile/src/lib/providerOptions.test.ts
+++ b/apps/mobile/src/lib/providerOptions.test.ts
@@ -2,11 +2,7 @@ import { describe, expect, it } from "vite-plus/test";
import type { ModelCapabilities } from "@t3tools/contracts";
-import {
- applyProviderOptionSelection,
- providerOptionValueLabels,
- resolveProviderOptionDescriptors,
-} from "./providerOptions";
+import { applyProviderOptionSelection, resolveProviderOptionDescriptors } from "./providerOptions";
const CODEX_CAPABILITIES: ModelCapabilities = {
optionDescriptors: [
@@ -34,15 +30,6 @@ const CODEX_CAPABILITIES: ModelCapabilities = {
};
describe("mobile provider options", () => {
- it("summarizes the option values currently in effect", () => {
- const descriptors = resolveProviderOptionDescriptors({
- capabilities: CODEX_CAPABILITIES,
- selections: undefined,
- });
-
- expect(providerOptionValueLabels(descriptors)).toEqual(["Medium", "Standard"]);
- });
-
it("updates generic select options without knowing provider-specific ids", () => {
const descriptors = resolveProviderOptionDescriptors({
capabilities: CODEX_CAPABILITIES,
@@ -62,7 +49,7 @@ describe("mobile provider options", () => {
expect(applyProviderOptionSelection(descriptors, { id: "unknown", value: "high" })).toBeNull();
});
- it("treats an unspecified boolean capability as off", () => {
+ it("updates generic boolean options", () => {
const descriptors = resolveProviderOptionDescriptors({
capabilities: {
optionDescriptors: [{ id: "fastMode", label: "Fast Mode", type: "boolean" }],
@@ -70,7 +57,6 @@ describe("mobile provider options", () => {
selections: undefined,
});
- expect(providerOptionValueLabels(descriptors)).toEqual([]);
expect(applyProviderOptionSelection(descriptors, { id: "fastMode", value: true })).toEqual([
{ id: "fastMode", value: true },
]);
diff --git a/apps/mobile/src/lib/providerOptions.ts b/apps/mobile/src/lib/providerOptions.ts
index 593f5a37442..dec0d327030 100644
--- a/apps/mobile/src/lib/providerOptions.ts
+++ b/apps/mobile/src/lib/providerOptions.ts
@@ -5,7 +5,6 @@ import type {
} from "@t3tools/contracts";
import {
buildProviderOptionSelectionsFromDescriptors,
- getProviderOptionCurrentLabel,
getProviderOptionDescriptors,
} from "@t3tools/shared/model";
@@ -22,23 +21,6 @@ export function resolveProviderOptionDescriptors(input: {
});
}
-/**
- * Labels for the option values currently in effect (select values plus
- * enabled booleans), used to summarize the thread configuration in the
- * composer trigger pill.
- */
-export function providerOptionValueLabels(
- descriptors: ReadonlyArray<ProviderOptionDescriptor>,
-): ReadonlyArray<string> {
- return descriptors.flatMap((descriptor) => {
- if (descriptor.type === "boolean") {
- return descriptor.currentValue ? [descriptor.label] : [];
- }
- const label = getProviderOptionCurrentLabel(descriptor);
- return label ? [label] : [];
- });
-}
-
/**
* Applies one option change (by descriptor id) and returns the full selection
* list to store on the model selection, or null when the change doesn't match