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:
@@ -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>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user