fix(core.gbapp): Fix in undeploy and markdown processsing.
This commit is contained in:
parent
134cf31695
commit
b477c46d9c
2 changed files with 38 additions and 14 deletions
|
@ -151,6 +151,8 @@ export class GBConversationalService implements IGBConversationalService {
|
|||
InEmbedAddressBegin,
|
||||
InEmbedAddressEnd,
|
||||
InLineBreak,
|
||||
InLineBreak1,
|
||||
InLineBreak2,
|
||||
};
|
||||
let state = State.InText;
|
||||
let currentImage = '';
|
||||
|
@ -175,12 +177,26 @@ export class GBConversationalService implements IGBConversationalService {
|
|||
state = State.InLineBreak;
|
||||
}
|
||||
else {
|
||||
state = State.InText;
|
||||
currentText = currentText.concat(c);
|
||||
}
|
||||
break;
|
||||
case State.InLineBreak:
|
||||
if (c === '\n') {
|
||||
if (currentText !== '') {
|
||||
state = State.InLineBreak1;
|
||||
}
|
||||
else if (c === '!') {
|
||||
state = State.InImageBegin;
|
||||
}
|
||||
else if (c === '[') {
|
||||
state = State.InEmbedBegin;
|
||||
} else {
|
||||
currentText = currentText.concat('\n', c);
|
||||
state = State.InText;
|
||||
}
|
||||
break;
|
||||
case State.InLineBreak1:
|
||||
if (c === '\n') {
|
||||
if (mobile === null) {
|
||||
await step.context.sendActivity(currentText);
|
||||
}
|
||||
|
@ -188,10 +204,18 @@ export class GBConversationalService implements IGBConversationalService {
|
|||
this.sendToMobile(min, mobile, currentText);
|
||||
}
|
||||
await sleep(3000);
|
||||
}
|
||||
currentText = '';
|
||||
state = State.InText;
|
||||
}
|
||||
else if (c === '!') {
|
||||
state = State.InImageBegin;
|
||||
}
|
||||
else if (c === '[') {
|
||||
state = State.InEmbedBegin;
|
||||
} else {
|
||||
currentText = currentText.concat('\n', '\n', c);
|
||||
state = State.InText;
|
||||
}
|
||||
break;
|
||||
case State.InEmbedBegin:
|
||||
if (c === '=') {
|
||||
|
@ -217,7 +241,7 @@ export class GBConversationalService implements IGBConversationalService {
|
|||
await sleep(5000);
|
||||
currentEmbedUrl = '';
|
||||
}
|
||||
else{
|
||||
else {
|
||||
currentEmbedUrl = currentEmbedUrl.concat(c);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -338,7 +338,7 @@ export class GBDeployer implements IGBDeployer {
|
|||
|
||||
case '.gbkb':
|
||||
const service = new KBService(this.core.sequelize);
|
||||
return service.undeployKbFromStorage(instance, this, p.packageId);
|
||||
return await service.undeployKbFromStorage(instance, this, p.packageId);
|
||||
|
||||
case '.gbui':
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue