Merge branch 'main' of github.com:halo-dev/upage into docs/add-upage-docs

This commit is contained in:
LIlGG
2025-09-28 17:38:12 +08:00
37 changed files with 263 additions and 723 deletions

View File

@@ -17,9 +17,9 @@ import { createScopedLogger } from '~/lib/.server/logger';
import { getHistoryChatMessages, saveChatMessages, updateDiscardedMessage } from '~/lib/.server/message';
import { getPageByMessageId } from '~/lib/.server/page';
import { CONTINUE_PROMPT } from '~/lib/common/prompts/prompts';
import { DEFAULT_MODEL, DEFAULT_MODEL_DETAILS, getModel, MINOR_MODEL } from '~/lib/modules/constants';
import type { Page } from '~/types/actions';
import type { UPageUIMessage } from '~/types/message';
import { DEFAULT_MODEL, DEFAULT_MODEL_DETAILS, getModel, MINOR_MODEL } from '~/utils/constants';
import { approximateUsageFromContent } from '~/utils/token';
const logger = createScopedLogger('api.chat.chat');

View File

@@ -3,8 +3,8 @@ import type { UIMessage } from 'ai';
import { requireAuth } from '~/lib/.server/auth';
import { streamEnhancer } from '~/lib/.server/llm/stream-enhancer';
import { createScopedLogger } from '~/lib/.server/logger';
import { getModel, MINOR_MODEL } from '~/lib/modules/constants';
import { errorResponse } from '~/utils/api-response';
import { getModel, MINOR_MODEL } from '~/utils/constants';
export async function action(args: ActionFunctionArgs) {
const authResult = await requireAuth(args.request, { isApi: true });