Skip to content

Commit 6de9e6b

Browse files
Merge the updated first-run setup into the voice stack tip
2 parents 25ebeed + 986061b commit 6de9e6b

4 files changed

Lines changed: 22 additions & 6 deletions

File tree

‎apps/mobile/src/components/ProviderIcon.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { resolveOfficialAcpRegistryIconUrl } from "@t3tools/contracts";
1111
import { useAppearancePreferences } from "../features/settings/appearance/AppearancePreferencesProvider";
1212
import { AppText as Text } from "./ui/AppText";
1313
import { cn } from "../lib/cn";
14-
import { getProviderClient } from "@t3tools/client-runtime/provider-clients";
14+
import { getProviderClient, openRouterIcon } from "@t3tools/client-runtime/provider-clients";
1515

1616
type ProviderIconProps = {
1717
readonly provider: string | null | undefined;
@@ -99,7 +99,8 @@ export function ProviderIcon(props: ProviderIconProps) {
9999
);
100100
}
101101

102-
const packageIcon = getProviderClient(props.provider)?.icon;
102+
const packageIcon =
103+
props.provider === "openrouter" ? openRouterIcon : getProviderClient(props.provider)?.icon;
103104
if (packageIcon) {
104105
const themeFill = (fill: { readonly light: string; readonly dark: string }) =>
105106
isDarkMode ? fill.dark : fill.light;

‎apps/mobile/src/features/settings/CloudVoiceSection.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ function CloudChoices({ environment, active, onClose }: Props & { onClose: () =>
278278
label={label}
279279
leading={
280280
<ProviderIcon
281-
provider={provider === "openai" ? "codex" : provider === "xai" ? "grok" : null}
281+
provider={
282+
provider === "openai" ? "codex" : provider === "xai" ? "grok" : provider
283+
}
282284
size={20}
283285
/>
284286
}

‎apps/web/src/components/settings/VoiceSettingsPanel.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
updateEnvironmentSpeechModelUnloadTimeout,
1010
} from "@t3tools/client-runtime/voice-input";
1111
import type { PreparedConnection } from "@t3tools/client-runtime/connection";
12+
import { openRouterIcon } from "@t3tools/client-runtime/provider-clients";
1213
import {
1314
AuthSettingsWriteScope,
1415
CLOUD_SPEECH_LABELS,
@@ -36,7 +37,6 @@ import {
3637
MonitorIcon,
3738
MicOffIcon,
3839
MicIcon,
39-
WaypointsIcon,
4040
RefreshCwIcon,
4141
StarIcon,
4242
SlidersHorizontalIcon,
@@ -70,6 +70,7 @@ import {
7070
import { ComposerSpeechRecordingPill } from "../chat/ComposerSpeechButton";
7171
import { ProviderModelPicker } from "../chat/ProviderModelPicker";
7272
import { ProviderInstanceIcon } from "../chat/ProviderInstanceIcon";
73+
import { ProviderPackageIcon } from "../chat/ProviderPackageIcon";
7374
import { TraitsPicker } from "../chat/TraitsPicker";
7475
import { VoiceInputSetup } from "../chat/VoiceInputSetup";
7576
import { Badge } from "../ui/badge";
@@ -122,7 +123,8 @@ import { useScopedSettings, useUpdateScopedSettings } from "./useScopedSettings"
122123

123124
const OFF = "off";
124125
function CloudSpeechLogo({ provider }: { provider: CloudSpeechProvider }) {
125-
if (provider === "openrouter") return <WaypointsIcon aria-hidden className="size-4" />;
126+
if (provider === "openrouter")
127+
return <ProviderPackageIcon icon={openRouterIcon} aria-hidden className="size-4 shrink-0" />;
126128
return (
127129
<ProviderInstanceIcon
128130
driverKind={ProviderDriverKind.make(provider === "openai" ? "codex" : "grok")}

‎packages/client-runtime/src/providerClients.ts‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
ProviderDriverKind,
77
} from "@t3tools/contracts";
88
import { acpRegistryClient } from "@t3tools/provider-acp-registry/client";
9-
import { makeProviderClientRegistry } from "@t3tools/provider-core/client";
9+
import { makeProviderClientRegistry, type ProviderIcon } from "@t3tools/provider-core/client";
1010
import { modelShortName } from "@t3tools/provider-core/modelShortName";
1111
import { cursorClient } from "@t3tools/provider-cursor/client";
1212
import { fxClient } from "@t3tools/provider-fx/client";
@@ -16,6 +16,17 @@ import { museClient } from "@t3tools/provider-muse/client";
1616
import { openCodeClient } from "@t3tools/provider-opencode/client";
1717
import { piClient } from "@t3tools/provider-pi/client";
1818

19+
// OpenRouter's Ink and Cloud glyphs from https://openrouter.ai/brand.
20+
export const openRouterIcon: ProviderIcon = {
21+
viewBox: "0 0 1024 730",
22+
fill: { light: "#03080A", dark: "#FCFCFE" },
23+
paths: [
24+
{
25+
d: "M795.893 0C915.776 0 1012.95 97.9963 1012.95 218.88C1012.95 339.764 915.776 437.76 795.893 437.76L1011.2 654.869C1038.55 682.447 1019.18 729.6 980.504 729.6H361.77C161.97 729.6 0 566.273 0 364.8C0 163.327 161.97 0 361.77 0L795.893 0ZM361.77 145.92C241.89 145.92 144.708 243.916 144.708 364.8C144.708 485.684 241.89 583.68 361.77 583.68C481.649 583.68 578.831 485.684 578.831 364.8C578.831 243.916 481.649 145.92 361.77 145.92Z",
26+
},
27+
],
28+
};
29+
1930
export const providerClients = makeProviderClientRegistry([
2031
{
2132
driverKind: ProviderDriverKind.make("codex"),

0 commit comments

Comments
 (0)