feat: add hints to session, update API

This commit is contained in:
wancat committed 2023-08-08 20:38:27 +08:00
1 parent ae61bfc768
commit 6f368f761e
8 files changed
+52 -46

No files matched your search

+1 -1
View File
@@ -28,6 +28,7 @@ const commandHandler = async (session, commandInput) => {
if (!commandMatch || !outputMatch || !errorMatch) return {}
session.completion.push(session.progress)
session.hints.push(...stage.hints)
const nextStage = quest.stages.find((s) => s.id === stage.next)
session.progress = nextStage.id
@@ -35,7 +36,6 @@ const commandHandler = async (session, commandInput) => {
return {
responses: stage.responses,
hint: stage.hint,
}
}