feat: include complete stage name in command

This commit is contained in:
wancat committed 2023-10-29 17:41:38 +08:00
1 parent 8f22babe7d
commit aec0cf84ad
6 files changed
+27 -7

No files matched your search

+1 -3
View File
@@ -113,16 +113,14 @@ export default class CommandHandler extends SessionHandler {
stages.map((stage) => this.isMatch(stage.condition))
)
console.log('matches', matches)
const stage = stages.find((_, i) => matches[i])
console.log('stage', stage)
if (!stage) {
return {}
}
const response = this.execute(stage)
return {
stage: stage.id,
end: this.session.status === 'finished',
...response,
}