Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/features/chat/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { PendingFile } from "~/features/chat/components/messages/file-previ
import type { FileUIPart } from "~/features/chat/types";
import type { ApiKeyProvider } from "~/lib/api-keys/types";

import { STARTER_FAVORITE_MODELS } from "~/features/settings/types";
import { getClientKey, removeClientKey, setClientKey } from "~/lib/api-keys/client";

type ChatUIStore = {
Expand Down Expand Up @@ -73,7 +74,7 @@ export const useChatUIStore = create<ChatUIStore>()(
clearInput: () => set({ input: "" }),

// Model selection
selectedModelId: null,
selectedModelId: STARTER_FAVORITE_MODELS[0],
setSelectedModelId: id => set({ selectedModelId: id }),

// Search toggle
Expand Down
7 changes: 2 additions & 5 deletions src/features/settings/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ import {
updateUserSettings,
updateUserSettingsPartial,
} from "./queries";
import {
apiKeyUpdateSchema,
favoriteModelsUpdateSchema,
preferencesUpdateSchema,
} from "./types";
import { apiKeyUpdateSchema, favoriteModelsUpdateSchema, preferencesUpdateSchema, STARTER_FAVORITE_MODELS } from "./types";

/**
* Update user preferences (theme, custom instructions, default thread name, landing page content)
Expand Down Expand Up @@ -121,6 +117,7 @@ export async function createDefaultUserSettings(userId: string): Promise<UserSet
handoffEnabled: false,
toolHandoffModel: "gemini-flash-lite",
desktopNotifications: false,
favoriteModels: STARTER_FAVORITE_MODELS,
};

await updateUserSettings(userId, defaultSettings);
Expand Down
2 changes: 2 additions & 0 deletions src/features/settings/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { eq } from "drizzle-orm";
import type { EncryptedApiKeysData, UserSettingsData } from "~/features/settings/types";
import type { ApiKeyProvider } from "~/lib/api-keys";

import { STARTER_FAVORITE_MODELS } from "~/features/settings/types";
import { decryptValue, encryptValue } from "~/lib/api-keys/encryption";
import { db } from "~/lib/db";
import { userSettings } from "~/lib/db/schema/settings";
Expand Down Expand Up @@ -31,6 +32,7 @@ const DEFAULT_SETTINGS: UserSettingsData = {
handoffEnabled: false,
toolHandoffModel: "gemini-flash-lite",
desktopNotifications: false,
favoriteModels: STARTER_FAVORITE_MODELS,
};

export type ResolvedUserData = {
Expand Down
8 changes: 8 additions & 0 deletions src/features/settings/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ import type { ApiKeyProvider } from "~/lib/api-keys/types";

import { THREAD_ICONS } from "~/lib/db/schema/chat";

export const STARTER_FAVORITE_MODELS = [
"google/gemini-3-flash-preview",
"moonshotai/kimi-k2.5",
"anthropic/claude-sonnet-4.6",
"z-ai/glm-5",
"anthropic/claude-opus-4.6",
];

export type LandingPageContentType = "suggestions" | "greeting" | "blank";

export type ProfileCardWidget = "apiKeyStatus" | "openrouterCredits" | "storageQuota";
Expand Down
Loading