|
@@ -1,14 +1,14 @@
|
|
|
import { Component, OnInit } from '@angular/core';
|
|
|
import { IonButton, IonContent,IonInput,IonTextarea } from '@ionic/angular/standalone';
|
|
|
/** 引用:从fmode-ng库引用FmodeChatCompletion类 */
|
|
|
-import { FmodeChatCompletion } from 'fmode-ng';
|
|
|
+import { FmodeChatCompletion,MarkdownPreviewModule} from 'fmode-ng';
|
|
|
|
|
|
@Component({
|
|
|
selector: 'app-page-write',
|
|
|
templateUrl: './page-write.component.html',
|
|
|
styleUrls: ['./page-write.component.scss'],
|
|
|
standalone: true,
|
|
|
- imports: [IonButton,IonContent,IonTextarea,IonInput
|
|
|
+ imports: [IonButton,IonContent,IonTextarea,IonInput,MarkdownPreviewModule
|
|
|
],
|
|
|
})
|
|
|
export class PageWriteComponent implements OnInit {
|
|
@@ -30,6 +30,7 @@ export class PageWriteComponent implements OnInit {
|
|
|
}
|
|
|
responseMsg:any = ""
|
|
|
// 方法:实例化completion对象,传入消息数组,并订阅生成的可观察对象。
|
|
|
+ isComplete:boolean=false;
|
|
|
sendMessage(){
|
|
|
console.log("create")
|
|
|
|
|
@@ -47,6 +48,9 @@ export class PageWriteComponent implements OnInit {
|
|
|
console.log(message.content)
|
|
|
// 赋值消息内容给组件内属性
|
|
|
this.responseMsg = message.content
|
|
|
+ if(message?.complete){
|
|
|
+ this.isComplete=true
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
|