Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 86 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
},
"type": "module",
"dependencies": {
"@codemirror/commands": "^6.10.0",
"@codemirror/lang-python": "^6.2.1",
"@codemirror/language": "^6.11.3",
"@codemirror/state": "^6.5.2",
"@codemirror/theme-one-dark": "^6.1.3",
"@codemirror/view": "^6.38.6",
"@ernane/svelte-star-rating": "^1.1.4",
"@fullcalendar/common": "^5.11.5",
"@microsoft/signalr": "^8.0.0",
Expand All @@ -59,6 +65,7 @@
"overlayscrollbars-svelte": "^0.5.2",
"qs": "^6.14.0",
"svelte-awesome-color-picker": "^2.4.7",
"svelte-codemirror-editor": "^1.4.1",
"svelte-collapse": "^0.1.2",
"svelte-file-dropzone": "^2.0.2",
"svelte-flatpickr": "^3.3.3",
Expand Down
36 changes: 31 additions & 5 deletions src/lib/helpers/enums.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ const agentType = {
};
export const AgentType = Object.freeze(agentType);

const agentCodeScriptType = {
Src: 'src',
Test: 'test'
};
export const AgentCodeScriptType = Object.freeze(agentCodeScriptType);

const routingMode = {
Eager: "eager",
Lazy: "lazy"
Expand Down Expand Up @@ -203,14 +209,34 @@ const globalEvent = {
export const GlobalEvent = Object.freeze(globalEvent);

const llmModelType = {
Text: 1,
Chat: 2,
Image: 3,
Embedding: 4,
Audio: 5
All: "All",
Text: "Text",
Chat: "Chat",
Image: "Image",
Embedding: "Embedding",
Audio: "Audio",
Realtime: "Realtime",
Web: "Web"
};
export const LlmModelType = Object.freeze(llmModelType);

const llmModelCapability = {
All: "All",
Text: "Text",
Chat: "Chat",
ImageReading: "ImageReading",
ImageGeneration: "ImageGeneration",
ImageEdit: "ImageEdit",
ImageVariation: "ImageVariation",
Embedding: "Embedding",
AudioTranscription: "AudioTranscription",
AudioGeneration: "AudioGeneration",
Realtime: "Realtime",
WebSearch: "WebSearch",
PdfReading: "PdfReading"
};
export const LlmModelCapability = Object.freeze(llmModelCapability);

const reasoningEffortLevel = {
Minimal: "minimal",
Low: "low",
Expand Down
3 changes: 2 additions & 1 deletion src/lib/helpers/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ function skipLoader(config) {
new RegExp('http(s*)://(.*?)/knowledge/vector/(.*?)/create', 'g'),
new RegExp('http(s*)://(.*?)/knowledge/document/(.*?)/page', 'g'),
new RegExp('http(s*)://(.*?)/users', 'g'),
new RegExp('http(s*)://(.*?)/instruct/chat-completion', 'g')
new RegExp('http(s*)://(.*?)/instruct/chat-completion', 'g'),
new RegExp('http(s*)://(.*?)/agent/(.*?)/code-scripts', 'g')
];

/** @type {RegExp[]} */
Expand Down
32 changes: 32 additions & 0 deletions src/lib/helpers/types/agentTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
* @property {number} max_recursion_depth
* @property {number?} [max_output_tokens]
* @property {string?} [reasoning_effort_level]
* @property {any} [image_generation]
* @property {any} [image_edit]
* @property {any} [audio_transcription]
* @property {any} [realtime]
*/


Expand Down Expand Up @@ -105,6 +109,34 @@
* @property {string} [direct_agent_id] - Run task directly in this agent.
*/

/**
* @typedef {Object} AgentCodeScriptFilter
* @property {string[]?} [scriptNames]
* @property {string[]?} [scriptTypes]
*/


/**
* @typedef {Object} AgentCodeScriptViewModel
* @property {string?} [uid]
* @property {string} name
* @property {string} content
* @property {string} script_type
*/

/**
* @typedef {Object} AgentCodeScriptUpdateOptions
* @property {boolean?} [delete_if_not_included]
* @property {boolean?} [is_upsert]
*/

/**
* @typedef {Object} AgentCodeScriptUpdateModel
* @property {AgentCodeScriptViewModel[]?} [code_scripts]
* @property {AgentCodeScriptUpdateOptions?} [options]
*/


/**
* @typedef {Object} ChannelInstruction
* @property {string} [uid]
Expand Down
11 changes: 8 additions & 3 deletions src/lib/helpers/types/commonTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@
*/

/**
* @typedef {Object} LlmConfigOption
* @property {number?} [type]
* @typedef {Object} LlmConfigFilter
* @property {string[]?} [providers]
* @property {string[]?} [modelIds]
* @property {string[]?} [modelNames]
* @property {string[]?} [modelTypes]
* @property {string[]?} [modelCapabilities]
* @property {boolean?} [multiModal]
* @property {boolean?} [imageGeneration]
*/

/**
Expand All @@ -55,6 +58,8 @@
* @typedef {Object} LlmModelSetting
* @property {string} name
* @property {string} type
* @property {string[]} capabilities
* @property {boolean} multiModal
* @property {any} reasoning
*/

Expand Down
6 changes: 6 additions & 0 deletions src/lib/helpers/types/knowledgeTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* @property {number} [confidence] - Confidence.
* @property {boolean} [with_vector] - Include vector or not.
* @property {VectorFilterGroup[]} [filter_groups] - Search filter groups.
* @property {VectorSearchParam} [search_param] - Search params.
*/

/**
Expand All @@ -28,6 +29,11 @@
* @property {VectorSort?} [order_by] - Sort by.
*/

/**
* @typedef {Object} VectorSearchParam
* @property {boolean?} [exact_search] - Exact search or not.
*/

/**
* @typedef {Object} VectorFilterGroup
* @property {string} [logical_operator] - The logical operator.
Expand Down
20 changes: 20 additions & 0 deletions src/lib/scss/custom/pages/_agent.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,20 @@
}
}

.agent-config-container {
padding: 10px;
border: 1px dashed var(--bs-primary);
border-radius: 5px;
}

.agent-utility-container {
display: flex;
flex-direction: column;
gap: 10px;
max-height: 500px;
overflow-y: auto;
scrollbar-width: thin;
padding: 0px 10px;

.merge-utility {
display: flex;
Expand Down Expand Up @@ -266,4 +273,17 @@
&.show {
opacity: 1 !important;
}
}

.code-editor {
max-height: 500px;
overflow-y: auto;
scrollbar-width: thin;
resize: none;

.cm-editor {
min-width: 1000px;
overflow-x: auto;
scrollbar-width: thin;
}
}
Loading