feat(app): fix type resolving issues

This commit is contained in:
ItzCrazyKns
2025-11-23 19:22:11 +05:30
parent 6d35d60b49
commit d7dd17c069
8 changed files with 11 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
import z from 'zod';
import { ResearchAction } from '../../types';
import { searchSearxng } from '@/lib/searxng';
import { Chunk } from '@/lib/types';
const actionSchema = z.object({
type: z.literal('web_search'),

View File

@@ -2,6 +2,7 @@ import z from 'zod';
import BaseLLM from '../../models/base/llm';
import BaseEmbedding from '@/lib/models/base/embedding';
import SessionManager from '@/lib/session';
import { ChatTurnMessage, Chunk } from '@/lib/types';
export type SearchSources = 'web' | 'discussions' | 'academic';

View File

@@ -1,5 +1,6 @@
import { sql } from 'drizzle-orm';
import { text, integer, sqliteTable } from 'drizzle-orm/sqlite-core';
import { Block } from '../types';
export const messages = sqliteTable('messages', {
id: integer('id').primaryKey(),

View File

@@ -1,3 +1,5 @@
import { Chunk } from '@/lib/types';
abstract class BaseEmbedding<CONFIG> {
constructor(protected config: CONFIG) {}
abstract embedText(texts: string[]): Promise<number[][]>;

View File

@@ -1,5 +1,6 @@
import { Ollama } from 'ollama';
import BaseEmbedding from '../../base/embedding';
import { Chunk } from '@/lib/types';
type OllamaConfig = {
model: string;

View File

@@ -1,5 +1,6 @@
import OpenAI from 'openai';
import BaseEmbedding from '../../base/embedding';
import { Chunk } from '@/lib/types';
type OpenAIConfig = {
apiKey: string;

View File

@@ -1,7 +1,5 @@
import { ConfigModelProvider } from '../config/types';
import BaseModelProvider, {
createProviderInstance,
} from './providers/baseProvider';
import BaseModelProvider, { createProviderInstance } from './base/provider';
import { getConfiguredModelProviders } from '../config/serverRegistry';
import { providers } from './providers';
import { MinimalProvider, ModelList } from './types';

View File

@@ -1,4 +1,5 @@
import z from 'zod';
import { ChatTurnMessage } from '../types';
type Model = {
name: string;
@@ -37,7 +38,7 @@ type GenerateOptions = {
};
type GenerateTextInput = {
messages: Message[];
messages: ChatTurnMessage[];
options?: GenerateOptions;
};
@@ -54,7 +55,7 @@ type StreamTextOutput = {
type GenerateObjectInput = {
schema: z.ZodTypeAny;
messages: Message[];
messages: ChatTurnMessage[];
options?: GenerateOptions;
};