feat: TTD dialog tweaks (#7346)

* tweaks to TTD dialog ~ prepping for settings dialog

* tweaks to ttd parsing & error logging
This commit is contained in:
David Luzar 2023-11-27 16:03:03 +01:00 committed by GitHub
parent fe75f29c15
commit dd220bcaea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 227 additions and 104 deletions

View file

@ -1700,7 +1700,11 @@ class App extends React.Component<AppProps, AppState> {
) {
if (!this.OPENAI_KEY) {
this.setState({
openDialog: { name: "magicSettings", source: "generation" },
openDialog: {
name: "settings",
tab: "diagram-to-code",
source: "generation",
},
});
trackEvent("ai", "generate (missing key)", "d2c");
return;
@ -1871,7 +1875,11 @@ class App extends React.Component<AppProps, AppState> {
public onMagicframeToolSelect = () => {
if (!this.OPENAI_KEY) {
this.setState({
openDialog: { name: "magicSettings", source: "tool" },
openDialog: {
name: "settings",
tab: "diagram-to-code",
source: "tool",
},
});
trackEvent("ai", "tool-select (missing key)", "d2c");
return;