feat: track优化
This commit is contained in:
@@ -854,6 +854,21 @@ export const ParameterDebugInterface: React.FC<ParameterDebugInterfaceProps> = (
|
||||
console.log(`Applied image ${selectedImageIndex + 1} with parameters:`, generatedImages[selectedImageIndex].params);
|
||||
|
||||
// 发送埋点事件
|
||||
let count_temp = 1;
|
||||
// Calculate total parameter combinations
|
||||
if (paramTestValues) {
|
||||
for (const nodeId in paramTestValues) {
|
||||
if (paramTestValues[nodeId] && paramTestValues[nodeId].values) {
|
||||
for (const paramName in paramTestValues[nodeId].values) {
|
||||
const paramOptions = paramTestValues[nodeId].values[paramName];
|
||||
if (Array.isArray(paramOptions) && paramOptions.length > 0) {
|
||||
count_temp = count_temp * paramOptions.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WorkflowChatAPI.trackEvent({
|
||||
event_type: 'parameter_debug_apply',
|
||||
message_type: 'parameter_debug',
|
||||
@@ -862,7 +877,7 @@ export const ParameterDebugInterface: React.FC<ParameterDebugInterfaceProps> = (
|
||||
workflow: (await app.graphToPrompt()).output,
|
||||
selected_params: generatedImages[selectedImageIndex].params,
|
||||
all_params: paramTestValues,
|
||||
count: Object.keys(paramTestValues).length
|
||||
count: count_temp
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user