This commit is contained in:
Benjamin Toby
2025-07-28 07:23:45 +01:00
parent a429436939
commit 8ac8b8eb51
49 changed files with 475 additions and 177 deletions
+2
View File
@@ -118,6 +118,7 @@ export type DSQL_DATASQUIREL_USER_DATABASES = {
db_full_name?: string;
db_image?: string;
db_description?: string;
db_long_description?: string;
remote_connected?: number;
remote_connection_type?: string;
remote_db_full_name?: string;
@@ -146,6 +147,7 @@ export type DSQL_DATASQUIREL_USER_DATABASE_TABLES = {
table_name?: string;
table_slug?: string;
table_description?: string;
table_long_description?: string;
child_table?: number;
child_table_parent_database_schema_id?: number;
child_table_parent_table_schema_id?: number;
+84
View File
@@ -107,6 +107,7 @@ export interface DSQL_ChildrenTablesType {
export const TextFieldTypesArray = [
{ title: "Plain Text", value: "plain" },
{ title: "Rich Text", value: "richText" },
{ title: "Markdown", value: "markdown" },
{ title: "JSON", value: "json" },
{ title: "YAML", value: "yaml" },
{ title: "HTML", value: "html" },
@@ -119,6 +120,7 @@ export const TextFieldTypesArray = [
export type DSQL_FieldSchemaType = {
id?: number | string;
fieldName?: string;
fieldDescription?: string;
originName?: string;
updatedField?: boolean;
dataType?: string;
@@ -1471,6 +1473,7 @@ export type DsqlCrudParam<
countOnly?: boolean;
dbFullName?: string;
dbName?: string;
tableSchema?: DSQL_TableSchemaType;
};
export type ErrorCallback = (title: string, error: Error, data?: any) => void;
@@ -2137,6 +2140,19 @@ export type SiteConfigMain = {
sharp_image_quality?: SiteConfigMainValue;
max_backups?: SiteConfigMainValue;
max_disk_usage?: SiteConfigMainValue;
api_keys?: SiteConfigMainAPIKeysObject;
target_ai?: AIOptionsObject;
};
export type SiteConfigMainAPIKeysObject = {
[k: string]: SiteConfigMainAPIKeysObjectInfo;
};
export type SiteConfigMainAPIKeysObjectInfo = {
key?: string;
id?: string;
model?: string;
custom_model?: string;
};
export type SiteConfigMainValue = {
@@ -2629,6 +2645,7 @@ export const OpsActions = [
"exit",
"test",
"restart-web-app",
"restart-web-app-container",
"restart-db",
"restart-all",
"clear",
@@ -2637,3 +2654,70 @@ export const OpsActions = [
export type OpsObject = {
action: (typeof OpsActions)[number];
};
export const AIOptions: AIOptionsObject[] = [
{
name: "openai",
title: "Open AI",
models: [
"gpt-4.1",
"gpt-4o",
"gpt-4o-audio",
"04-mini",
"o3",
"o3-pro",
"o3-mini",
"o1",
"o1-mini",
"o1-pro",
],
},
{
name: "xai",
title: "X-AI",
baseUrl: "https://api.x.ai/v1",
models: [
"grok-4-0709",
"grok-3",
"grok-3-mini",
"grok-3-fast",
"grok-3-mini-fast",
],
},
{
name: "anthropic",
models: [
"claude-opus-4-0",
"claude-sonnet-4-0",
"claude-3-7-sonnet-latest",
"claude-3-5-sonnet-latest",
"claude-3-5-haiku-latest",
],
},
{
name: "gemini",
models: [
"gemini-2.5-pro",
"gemini-2.5-flash",
"gemini-2.5-flash-lite",
"gemini-2.5-flash-preview-tts",
"gemini-2.5-pro-preview-tts",
"gemini-2.0-flash",
],
},
] as const;
export type AIOptionsObject = {
name?: string;
title?: string;
models?: string[];
targetModel?: string;
customModel?: string;
apiKey?: string;
baseUrl?: string;
};
export type AIComponentProps = {
targetAI: AIOptionsObject;
context: any[];
};