diff --git a/.husky/pre-commit b/.husky/pre-commit index 23b9a80..966a4ad 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1,17 @@ -pnpm lint:fix +#!/bin/sh + +echo "🔍 Running pre-commit hook to check the code looks good... 🔍" + +if ! pnpm typecheck; then + echo "❌ Type checking failed! Please review TypeScript types." + echo "Once you're done, don't forget to add your changes to the commit! 🚀" + exit 1 +fi + +if ! pnpm lint; then + echo "❌ Linting failed! 'pnpm lint:check' will help you fix the easy ones." + echo "Once you're done, don't forget to add your beautification to the commit! 🤩" + exit 1 +fi + +echo "👍 All good! Committing changes..." diff --git a/app/lib/.server/llm/stream-text.ts b/app/lib/.server/llm/stream-text.ts index 86e285c..3ef8792 100644 --- a/app/lib/.server/llm/stream-text.ts +++ b/app/lib/.server/llm/stream-text.ts @@ -1,11 +1,11 @@ // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck – TODO: Provider proper types -import { streamText as _streamText, convertToCoreMessages } from 'ai'; +import { convertToCoreMessages, streamText as _streamText } from 'ai'; import { getModel } from '~/lib/.server/llm/model'; import { MAX_TOKENS } from './constants'; import { getSystemPrompt } from './prompts'; -import { MODEL_LIST, DEFAULT_MODEL, DEFAULT_PROVIDER, MODEL_REGEX, PROVIDER_REGEX } from '~/utils/constants'; +import { DEFAULT_MODEL, DEFAULT_PROVIDER, MODEL_LIST, MODEL_REGEX, PROVIDER_REGEX } from '~/utils/constants'; interface ToolResult { toolCallId: string;