Skip to content

Commit

Permalink
fix async editor loading for new codemirror and babyloanian programming
Browse files Browse the repository at this point in the history
SQUASHED: AUTO-COMMIT-src-components-widgets-lively-code-mirror.js,fix-async-editor-loading-for-new-codemirror-and-babyloanian-programming,
  • Loading branch information
JensLincke committed Jul 19, 2024
1 parent 4e33d8c commit 2b10e60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ export default class BabylonianProgrammingEditor extends Morph {
var editorComp = this.editorComp()

console.log("Babylonian: load editor" + editorComp)
editorComp.addEventListener("editor-loaded", () => {

// editorComp.addEventListener("editor-loaded", () => {
editorComp.editorLoaded().then(() => {

console.log("Babylonian: editor loaded ", this.livelyEditor())
// Patch editor to load/save comments
Expand All @@ -143,6 +145,7 @@ export default class BabylonianProgrammingEditor extends Morph {
"Tab": (cm) => { cm.replaceSelection(" ") },
})

debugger
// Inject styling into CodeMirror
const livelyEditorStyle =
<link rel="stylesheet" href={`${COMPONENT_URL}/lively-code-editor-inject-styles.css`}></link>
Expand Down
2 changes: 1 addition & 1 deletion src/components/tools/openai-audio-chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default class OpenaiAudioChat extends Morph {
//comboboxes
this.voiceBox.setOptions(["alloy", "echo", "fable", "onyx", "nova", "shimmer", "silent"])
if (!this.voiceBox.value) this.voiceBox.value="shimmer"
this.modelBox.setOptions(["gpt-4o", "gpt-4-turbo", "gpt-4", "gpt-3.5-turbo"])
this.modelBox.setOptions(["gpt-4o","gpt-4o-mini", "gpt-4-turbo", "gpt-4", "gpt-3.5-turbo"])
if (!this.modelBox.value) this.modelBox.value="gpt-3.5-turbo"
}

Expand Down

0 comments on commit 2b10e60

Please sign in to comment.