mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: add hints to session, update API
This commit is contained in:
1 parent
ae61bfc768
commit
6f368f761e
8 files changed
+52
-46
No files matched your search
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user