add tracking for regenerate
This commit is contained in:
parent
87d5a1da57
commit
273a77f7c4
@ -157,6 +157,8 @@ function App({ navbarComponent }: Props) {
|
|||||||
|
|
||||||
const regenerate = () => {
|
const regenerate = () => {
|
||||||
if (currentVersion === null) {
|
if (currentVersion === null) {
|
||||||
|
// This would be a error that I log to Sentry
|
||||||
|
addEvent("RegenerateCurrentVersionNull");
|
||||||
toast.error(
|
toast.error(
|
||||||
"No current version set. Please open a Github issue as this shouldn't happen."
|
"No current version set. Please open a Github issue as this shouldn't happen."
|
||||||
);
|
);
|
||||||
@ -166,10 +168,13 @@ function App({ navbarComponent }: Props) {
|
|||||||
// Retrieve the previous command
|
// Retrieve the previous command
|
||||||
const previousCommand = appHistory[currentVersion];
|
const previousCommand = appHistory[currentVersion];
|
||||||
if (previousCommand.type !== "ai_create") {
|
if (previousCommand.type !== "ai_create") {
|
||||||
|
addEvent("RegenerateNotFirstVersion");
|
||||||
toast.error("Only the first version can be regenerated.");
|
toast.error("Only the first version can be regenerated.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addEvent("Regenerate");
|
||||||
|
|
||||||
// Re-run the create
|
// Re-run the create
|
||||||
doCreate(referenceImages, inputMode);
|
doCreate(referenceImages, inputMode);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user