The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 24, 10:15 UTC
refactor(mobile): remove unused provider option summary (#9971)
Julius Marminge committed
Sep 5, 2026 at 00:09 UTC
c1e279eca52e02ee3fb9c8d133057a30526f282c
2 files changed
+2
-34
apps/mobile/src/lib/providerOptions.test.ts
+2
-16
@@ -2,11 +2,7 @@ import { describe, expect, it } from "vite-plus/test";
2
3
import type { ModelCapabilities } from "@t3tools/contracts";
4
5
-import {
6
- applyProviderOptionSelection,
7
- providerOptionValueLabels,
8
- resolveProviderOptionDescriptors,
9
-} from "./providerOptions";
5
+import { applyProviderOptionSelection, resolveProviderOptionDescriptors } from "./providerOptions";
6
7
const CODEX_CAPABILITIES: ModelCapabilities = {
8
optionDescriptors: [
@@ -34,15 +30,6 @@ const CODEX_CAPABILITIES: ModelCapabilities = {
30
};
31
32
describe("mobile provider options", () => {
37
- it("summarizes the option values currently in effect", () => {
38
- const descriptors = resolveProviderOptionDescriptors({
39
- capabilities: CODEX_CAPABILITIES,
40
- selections: undefined,
41
- });
42
-
43
- expect(providerOptionValueLabels(descriptors)).toEqual(["Medium", "Standard"]);
44
- });
45
-
33
it("updates generic select options without knowing provider-specific ids", () => {
34
const descriptors = resolveProviderOptionDescriptors({
35
capabilities: CODEX_CAPABILITIES,
@@ -62,7 +49,7 @@ describe("mobile provider options", () => {
49
expect(applyProviderOptionSelection(descriptors, { id: "unknown", value: "high" })).toBeNull();
50
});
51
65
- it("treats an unspecified boolean capability as off", () => {
52
+ it("updates generic boolean options", () => {
53
const descriptors = resolveProviderOptionDescriptors({
54
capabilities: {
55
optionDescriptors: [{ id: "fastMode", label: "Fast Mode", type: "boolean" }],
@@ -70,7 +57,6 @@ describe("mobile provider options", () => {
57
selections: undefined,
58
});
59
73
- expect(providerOptionValueLabels(descriptors)).toEqual([]);
60
expect(applyProviderOptionSelection(descriptors, { id: "fastMode", value: true })).toEqual([
61
{ id: "fastMode", value: true },
62
]);
apps/mobile/src/lib/providerOptions.ts
-18
@@ -5,7 +5,6 @@ import type {
5
} from "@t3tools/contracts";
6
import {
7
buildProviderOptionSelectionsFromDescriptors,
8
- getProviderOptionCurrentLabel,
8
getProviderOptionDescriptors,
9
} from "@t3tools/shared/model";
10
@@ -22,23 +21,6 @@ export function resolveProviderOptionDescriptors(input: {
21
});
22
}
23
25
-/**
26
- * Labels for the option values currently in effect (select values plus
27
- * enabled booleans), used to summarize the thread configuration in the
28
- * composer trigger pill.
29
- */
30
-export function providerOptionValueLabels(
31
- descriptors: ReadonlyArray<ProviderOptionDescriptor>,
32
-): ReadonlyArray<string> {
33
- return descriptors.flatMap((descriptor) => {
34
- if (descriptor.type === "boolean") {
35
- return descriptor.currentValue ? [descriptor.label] : [];
36
- }
37
- const label = getProviderOptionCurrentLabel(descriptor);
38
- return label ? [label] : [];
39
- });
40
-}
41
-
24
/**
25
* Applies one option change (by descriptor id) and returns the full selection
26
* list to store on the model selection, or null when the change doesn't match