Merge upstream/dev into feat/vision-autocomplete

This commit is contained in:
CREDO23 2026-04-04 09:15:13 +02:00
commit d7315e7f27
142 changed files with 9440 additions and 3390 deletions

View file

@ -126,6 +126,8 @@ export const getConnectorIcon = (connectorType: EnumConnectorName | string, clas
return <Microscope {...iconProps} />;
case "DEEPEST":
return <Telescope {...iconProps} />;
case "LOCAL_FOLDER_FILE":
return null;
default:
return <Search {...iconProps} />;
}

View file

@ -5,7 +5,7 @@ export interface LLMModel {
contextWindow?: string;
}
// Comprehensive LLM models database organized by provider
// Comprehensive models database organized by provider
export const LLM_MODELS: LLMModel[] = [
// OpenAI
{

View file

@ -26,6 +26,7 @@ export const documentTypeEnum = z.enum([
"BOOKSTACK_CONNECTOR",
"CIRCLEBACK",
"OBSIDIAN_CONNECTOR",
"LOCAL_FOLDER_FILE",
"SURFSENSE_DOCS",
"NOTE",
"COMPOSIO_GOOGLE_DRIVE_CONNECTOR",
@ -39,6 +40,7 @@ export const document = z.object({
document_type: documentTypeEnum,
document_metadata: z.record(z.string(), z.any()),
content: z.string(),
content_preview: z.string().optional().default(""),
content_hash: z.string(),
unique_identifier_hash: z.string().nullable(),
created_at: z.string(),
@ -69,6 +71,8 @@ export const documentWithChunks = document.extend({
created_at: z.string(),
})
),
total_chunks: z.number().optional().default(0),
chunk_start_index: z.number().optional().default(0),
});
/**
@ -243,10 +247,36 @@ export const getDocumentTypeCountsResponse = z.record(z.string(), z.number());
*/
export const getDocumentByChunkRequest = z.object({
chunk_id: z.number(),
chunk_window: z.number().optional(),
});
export const getDocumentByChunkResponse = documentWithChunks;
/**
* Get paginated chunks for a document
*/
export const getDocumentChunksRequest = z.object({
document_id: z.number(),
page: z.number().optional().default(0),
page_size: z.number().optional().default(20),
start_offset: z.number().optional(),
});
export const chunkRead = z.object({
id: z.number(),
content: z.string(),
document_id: z.number(),
created_at: z.string(),
});
export const getDocumentChunksResponse = z.object({
items: z.array(chunkRead),
total: z.number(),
page: z.number(),
page_size: z.number(),
has_more: z.boolean(),
});
/**
* Get Surfsense docs by chunk
*/
@ -328,3 +358,6 @@ export type GetSurfsenseDocsByChunkRequest = z.infer<typeof getSurfsenseDocsByCh
export type GetSurfsenseDocsByChunkResponse = z.infer<typeof getSurfsenseDocsByChunkResponse>;
export type GetSurfsenseDocsRequest = z.infer<typeof getSurfsenseDocsRequest>;
export type GetSurfsenseDocsResponse = z.infer<typeof getSurfsenseDocsResponse>;
export type GetDocumentChunksRequest = z.infer<typeof getDocumentChunksRequest>;
export type GetDocumentChunksResponse = z.infer<typeof getDocumentChunksResponse>;
export type ChunkRead = z.infer<typeof chunkRead>;

View file

@ -9,6 +9,7 @@ export const folder = z.object({
created_by_id: z.string().nullable().optional(),
created_at: z.string(),
updated_at: z.string(),
metadata: z.record(z.unknown()).nullable().optional(),
});
export const folderCreateRequest = z.object({

View file

@ -41,14 +41,14 @@ export const liteLLMProviderEnum = z.enum([
export type LiteLLMProvider = z.infer<typeof liteLLMProviderEnum>;
/**
* NewLLMConfig - combines LLM model settings with prompt configuration
* NewLLMConfig - combines model settings with prompt configuration
*/
export const newLLMConfig = z.object({
id: z.number(),
name: z.string().max(100),
description: z.string().max(500).nullable().optional(),
// LLM Model Configuration
// Model Configuration
provider: liteLLMProviderEnum,
custom_provider: z.string().max(100).nullable().optional(),
model_name: z.string().max(100),
@ -148,7 +148,7 @@ export const globalNewLLMConfig = z.object({
name: z.string(),
description: z.string().nullable().optional(),
// LLM Model Configuration (no api_key)
// Model Configuration (no api_key)
provider: z.string(), // String because YAML doesn't enforce enum, "AUTO" for Auto mode
custom_provider: z.string().nullable().optional(),
model_name: z.string(),