Implement V2 AI functions and enhance progress handling

- Added support for new V2 functions: `auto_cluster_v2` and `generate_ideas_v2`, including backend logic and API endpoints.
- Updated model configuration to ensure V2 functions validate the presence of models before execution.
- Enhanced progress modal to provide better feedback during asynchronous tasks, including task IDs for debugging.
- Updated frontend components to integrate new V2 functionalities and improve user experience with clustering and idea generation.
This commit is contained in:
Desktop
2025-11-10 22:16:02 +05:00
parent 46f5bb4d62
commit e2f2d79d4c
12 changed files with 920 additions and 58 deletions

View File

@@ -66,7 +66,7 @@ export default function AIProgressModal({
const modalInstanceId = modalInstanceIdRef.current || 'modal-01';
// Build full function ID with modal instance
// Build full function ID with modal instance (only for debugging, not shown in UI)
const fullFunctionId = functionId ? `${functionId}-${modalInstanceId}` : null;
// Determine color based on status
@@ -201,11 +201,10 @@ export default function AIProgressModal({
</div>
)}
{/* Function ID and Task ID (for debugging) */}
{(fullFunctionId || taskId) && (
{/* Task ID (for debugging - Function ID not shown per requirements) */}
{taskId && (
<div className="mb-6 space-y-1 text-xs text-gray-400 dark:text-gray-600">
{fullFunctionId && <div>Function ID: {fullFunctionId}</div>}
{taskId && <div>Task ID: {taskId}</div>}
<div>Task ID: {taskId}</div>
</div>
)}
@@ -282,11 +281,10 @@ export default function AIProgressModal({
{config.errorMessage || message}
</p>
{/* Function ID and Task ID (for debugging) */}
{(fullFunctionId || taskId) && (
{/* Task ID (for debugging - Function ID not shown per requirements) */}
{taskId && (
<div className="mb-6 space-y-1 text-xs text-gray-400 dark:text-gray-600">
{fullFunctionId && <div>Function ID: {fullFunctionId}</div>}
{taskId && <div>Task ID: {taskId}</div>}
<div>Task ID: {taskId}</div>
</div>
)}
@@ -390,15 +388,10 @@ export default function AIProgressModal({
</div>
)}
{/* Function ID and Task ID (for debugging) */}
{(fullFunctionId || taskId) && (
{/* Task ID (for debugging - Function ID not shown per requirements) */}
{taskId && (
<div className="mb-4 space-y-1 text-xs text-gray-400 dark:text-gray-600">
{fullFunctionId && (
<div>Function ID: {fullFunctionId}</div>
)}
{taskId && (
<div>Task ID: {taskId}</div>
)}
<div>Task ID: {taskId}</div>
</div>
)}