mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-23 19:05:16 +02:00
Merge remote-tracking branch 'upstream/dev' into feat/sur-159
This commit is contained in:
commit
fc64f65876
86 changed files with 6332 additions and 5653 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { IconLinkPlus, IconUsersGroup } from "@tabler/icons-react";
|
||||
import { IconUsersGroup } from "@tabler/icons-react";
|
||||
import {
|
||||
BookOpen,
|
||||
File,
|
||||
|
|
@ -15,11 +15,16 @@ import { EnumConnectorName } from "./connector";
|
|||
|
||||
export const getConnectorIcon = (connectorType: EnumConnectorName | string, className?: string) => {
|
||||
const iconProps = { className: className || "h-4 w-4" };
|
||||
const imgProps = { className: className || "h-5 w-5", width: 20, height: 20 };
|
||||
const imgProps = {
|
||||
className: `${className || "h-5 w-5"} select-none pointer-events-none`,
|
||||
width: 20,
|
||||
height: 20,
|
||||
draggable: false as const,
|
||||
};
|
||||
|
||||
switch (connectorType) {
|
||||
case EnumConnectorName.LINKUP_API:
|
||||
return <IconLinkPlus {...iconProps} />;
|
||||
return <Image src="/connectors/linkup.svg" alt="Linkup" {...imgProps} />;
|
||||
case EnumConnectorName.LINEAR_CONNECTOR:
|
||||
return <Image src="/connectors/linear.svg" alt="Linear" {...imgProps} />;
|
||||
case EnumConnectorName.GITHUB_CONNECTOR:
|
||||
|
|
@ -63,7 +68,7 @@ export const getConnectorIcon = (connectorType: EnumConnectorName | string, clas
|
|||
case EnumConnectorName.YOUTUBE_CONNECTOR:
|
||||
return <Image src="/connectors/youtube.svg" alt="YouTube" {...imgProps} />;
|
||||
case EnumConnectorName.CIRCLEBACK_CONNECTOR:
|
||||
return <IconUsersGroup {...iconProps} />;
|
||||
return <Image src="/connectors/circleback.svg" alt="Circleback" {...imgProps} />;
|
||||
case EnumConnectorName.MCP_CONNECTOR:
|
||||
return <Image src="/connectors/modelcontextprotocol.svg" alt="MCP" {...imgProps} />;
|
||||
case EnumConnectorName.OBSIDIAN_CONNECTOR:
|
||||
|
|
|
|||
|
|
@ -1477,6 +1477,78 @@ export const LLM_MODELS: LLMModel[] = [
|
|||
provider: "DATABRICKS",
|
||||
contextWindow: "128K",
|
||||
},
|
||||
|
||||
// GitHub Models
|
||||
{
|
||||
value: "openai/gpt-5",
|
||||
label: "GitHub GPT-5",
|
||||
provider: "GITHUB_MODELS",
|
||||
},
|
||||
{
|
||||
value: "openai/gpt-4.1",
|
||||
label: "GitHub GPT-4.1",
|
||||
provider: "GITHUB_MODELS",
|
||||
contextWindow: "1048K",
|
||||
},
|
||||
{
|
||||
value: "openai/gpt-4o",
|
||||
label: "GitHub GPT-4o",
|
||||
provider: "GITHUB_MODELS",
|
||||
contextWindow: "128K",
|
||||
},
|
||||
{
|
||||
value: "deepseek/DeepSeek-V3-0324",
|
||||
label: "GitHub DeepSeek V3",
|
||||
provider: "GITHUB_MODELS",
|
||||
contextWindow: "64K",
|
||||
},
|
||||
{
|
||||
value: "xai/grok-3",
|
||||
label: "GitHub Grok 3",
|
||||
provider: "GITHUB_MODELS",
|
||||
contextWindow: "131K",
|
||||
},
|
||||
{
|
||||
value: "openai/gpt-5-mini",
|
||||
label: "GitHub GPT-5 Mini",
|
||||
provider: "GITHUB_MODELS",
|
||||
},
|
||||
{
|
||||
value: "openai/gpt-4.1-mini",
|
||||
label: "GitHub GPT-4.1 Mini",
|
||||
provider: "GITHUB_MODELS",
|
||||
contextWindow: "1048K",
|
||||
},
|
||||
{
|
||||
value: "meta/Llama-4-Scout-17B-16E-Instruct",
|
||||
label: "GitHub Llama 4 Scout",
|
||||
provider: "GITHUB_MODELS",
|
||||
contextWindow: "512K",
|
||||
},
|
||||
{
|
||||
value: "openai/gpt-4.1-nano",
|
||||
label: "GitHub GPT-4.1 Nano",
|
||||
provider: "GITHUB_MODELS",
|
||||
contextWindow: "1048K",
|
||||
},
|
||||
{
|
||||
value: "openai/gpt-4o-mini",
|
||||
label: "GitHub GPT-4o Mini",
|
||||
provider: "GITHUB_MODELS",
|
||||
contextWindow: "128K",
|
||||
},
|
||||
{
|
||||
value: "openai/o4-mini",
|
||||
label: "GitHub O4 Mini",
|
||||
provider: "GITHUB_MODELS",
|
||||
contextWindow: "200K",
|
||||
},
|
||||
{
|
||||
value: "deepseek/DeepSeek-R1",
|
||||
label: "GitHub DeepSeek R1",
|
||||
provider: "GITHUB_MODELS",
|
||||
contextWindow: "64K",
|
||||
},
|
||||
];
|
||||
|
||||
// Helper function to get models by provider
|
||||
|
|
|
|||
|
|
@ -174,6 +174,13 @@ export const LLM_PROVIDERS: LLMProvider[] = [
|
|||
example: "databricks/databricks-meta-llama-3-3-70b-instruct",
|
||||
description: "Databricks Model Serving",
|
||||
},
|
||||
{
|
||||
value: "GITHUB_MODELS",
|
||||
label: "GitHub Models",
|
||||
example: "openai/gpt-5, meta/llama-3.1-405b-instruct",
|
||||
description: "AI models from GitHub Marketplace",
|
||||
apiBase: "https://models.github.ai/inference",
|
||||
},
|
||||
{
|
||||
value: "CUSTOM",
|
||||
label: "Custom Provider",
|
||||
|
|
|
|||
|
|
@ -138,6 +138,37 @@ export const uploadDocumentRequest = z.object({
|
|||
|
||||
export const uploadDocumentResponse = z.object({
|
||||
message: z.literal("Files uploaded for processing"),
|
||||
document_ids: z.array(z.number()),
|
||||
duplicate_document_ids: z.array(z.number()).optional(),
|
||||
total_files: z.number().optional(),
|
||||
pending_files: z.number().optional(),
|
||||
skipped_duplicates: z.number().optional(),
|
||||
});
|
||||
|
||||
/**
|
||||
* Batch document status
|
||||
*/
|
||||
export const getDocumentsStatusRequest = z.object({
|
||||
queryParams: z.object({
|
||||
search_space_id: z.number(),
|
||||
document_ids: z.array(z.number()).min(1),
|
||||
}),
|
||||
});
|
||||
|
||||
export const documentStatus = z.object({
|
||||
state: z.enum(["ready", "pending", "processing", "failed"]),
|
||||
reason: z.string().nullable().optional(),
|
||||
});
|
||||
|
||||
export const documentStatusItem = z.object({
|
||||
id: z.number(),
|
||||
title: z.string(),
|
||||
document_type: documentTypeEnum,
|
||||
status: documentStatus,
|
||||
});
|
||||
|
||||
export const getDocumentsStatusResponse = z.object({
|
||||
items: z.array(documentStatusItem),
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
@ -261,6 +292,10 @@ export type CreateDocumentRequest = z.infer<typeof createDocumentRequest>;
|
|||
export type CreateDocumentResponse = z.infer<typeof createDocumentResponse>;
|
||||
export type UploadDocumentRequest = z.infer<typeof uploadDocumentRequest>;
|
||||
export type UploadDocumentResponse = z.infer<typeof uploadDocumentResponse>;
|
||||
export type GetDocumentsStatusRequest = z.infer<typeof getDocumentsStatusRequest>;
|
||||
export type GetDocumentsStatusResponse = z.infer<typeof getDocumentsStatusResponse>;
|
||||
export type DocumentStatus = z.infer<typeof documentStatus>;
|
||||
export type DocumentStatusItem = z.infer<typeof documentStatusItem>;
|
||||
export type SearchDocumentsRequest = z.infer<typeof searchDocumentsRequest>;
|
||||
export type SearchDocumentsResponse = z.infer<typeof searchDocumentsResponse>;
|
||||
export type SearchDocumentTitlesRequest = z.infer<typeof searchDocumentTitlesRequest>;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { z } from "zod";
|
|||
/**
|
||||
* Incentive task type enum - matches backend IncentiveTaskType
|
||||
*/
|
||||
export const incentiveTaskTypeEnum = z.enum(["GITHUB_STAR"]);
|
||||
export const incentiveTaskTypeEnum = z.enum(["GITHUB_STAR", "REDDIT_FOLLOW", "DISCORD_JOIN"]);
|
||||
|
||||
/**
|
||||
* Single incentive task info schema
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ export const liteLLMProviderEnum = z.enum([
|
|||
"DATABRICKS",
|
||||
"COMETAPI",
|
||||
"HUGGINGFACE",
|
||||
"GITHUB_MODELS",
|
||||
"CUSTOM",
|
||||
]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue