|
|
@@ -42,6 +42,12 @@ const DEFAULT_CONFIG: TopicDiscussionConfig = {
|
|
|
},
|
|
|
videoScene: {
|
|
|
enabled: false,
|
|
|
+ systemPrompt: '',
|
|
|
+ greeting: '',
|
|
|
+ },
|
|
|
+ nonVideoScene: {
|
|
|
+ systemPrompt: '',
|
|
|
+ greeting: '',
|
|
|
},
|
|
|
}
|
|
|
|
|
|
@@ -74,6 +80,12 @@ const EMPTY_CONFIG: TopicDiscussionConfig = {
|
|
|
},
|
|
|
videoScene: {
|
|
|
enabled: false,
|
|
|
+ systemPrompt: '',
|
|
|
+ greeting: '',
|
|
|
+ },
|
|
|
+ nonVideoScene: {
|
|
|
+ systemPrompt: '',
|
|
|
+ greeting: '',
|
|
|
},
|
|
|
}
|
|
|
|
|
|
@@ -174,5 +186,24 @@ export const useSpeakingStore = defineStore('speaking', {
|
|
|
toggleVideoScene() {
|
|
|
this.config.videoScene.enabled = !this.config.videoScene.enabled
|
|
|
},
|
|
|
+
|
|
|
+ hydrateDefaults(payload: {
|
|
|
+ videoScene: { systemPrompt: string; greeting: string }
|
|
|
+ nonVideoScene: { systemPrompt: string; greeting: string }
|
|
|
+ }) {
|
|
|
+ // Fill only empty slots — preserve any teacher edits already present.
|
|
|
+ if (!this.config.videoScene.systemPrompt) {
|
|
|
+ this.config.videoScene.systemPrompt = payload.videoScene.systemPrompt
|
|
|
+ }
|
|
|
+ if (!this.config.videoScene.greeting) {
|
|
|
+ this.config.videoScene.greeting = payload.videoScene.greeting
|
|
|
+ }
|
|
|
+ if (!this.config.nonVideoScene.systemPrompt) {
|
|
|
+ this.config.nonVideoScene.systemPrompt = payload.nonVideoScene.systemPrompt
|
|
|
+ }
|
|
|
+ if (!this.config.nonVideoScene.greeting) {
|
|
|
+ this.config.nonVideoScene.greeting = payload.nonVideoScene.greeting
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
})
|