From 4324932fc9c37a8cd44962d82bafc04d3647fe0b Mon Sep 17 00:00:00 2001 From: wancat Date: Mon, 1 Jul 2024 10:41:26 +0800 Subject: [PATCH 1/3] fix: exception not showing --- app/src/store/session.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/store/session.ts b/app/src/store/session.ts index c4669c9..5845ea8 100644 --- a/app/src/store/session.ts +++ b/app/src/store/session.ts @@ -58,7 +58,9 @@ const useSession = defineStore('session', { if (!this.session) return this.session.responses.push(response.responses) this.session.hints.push(response.hints) - this.session.tasks = response.tasks + if (response.tasks) { + this.session.tasks = response.tasks + } this.session.status = response.status }, reset() { From 988cb65b5193cfd118546fb2877a1b17f4c84fad Mon Sep 17 00:00:00 2001 From: wancat Date: Mon, 1 Jul 2024 10:41:48 +0800 Subject: [PATCH 2/3] fix: wrong exception condition --- quests/exceptions.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/quests/exceptions.yml b/quests/exceptions.yml index 1cabbca..edf5341 100644 --- a/quests/exceptions.yml +++ b/quests/exceptions.yml @@ -28,7 +28,7 @@ exceptions: - condition: command: - - ^echo\S$ + - ^echo[^\s] responses: - type: narrative content: @@ -36,7 +36,7 @@ exceptions: - condition: command: - - ^cd\S$ + - ^cd\S responses: - type: narrative content: @@ -44,7 +44,7 @@ exceptions: - condition: command: - - ^ls\S$ + - ^ls\S responses: - type: narrative content: @@ -52,7 +52,7 @@ exceptions: - condition: command: - - ^cat\S$ + - ^cat\S responses: - type: narrative content: @@ -60,7 +60,7 @@ exceptions: - condition: command: - - ^touch\S$ + - ^touch\S responses: - type: narrative content: @@ -71,7 +71,7 @@ exceptions: command: - ^rmdir$ command: - - ^rm\S$ + - ^rm\S responses: - type: narrative content: @@ -79,7 +79,7 @@ exceptions: - condition: command: - - ^mv\S$ + - ^mv\S responses: - type: narrative content: @@ -87,7 +87,7 @@ exceptions: - condition: command: - - ^mkdir\S$ + - ^mkdir\S responses: - type: narrative content: @@ -95,7 +95,7 @@ exceptions: - condition: command: - - ^rmdir\S$ + - ^rmdir\S responses: - type: narrative content: @@ -103,7 +103,7 @@ exceptions: - condition: command: - - ^cp\S$ + - ^cp\S responses: - type: narrative content: @@ -111,7 +111,7 @@ exceptions: - condition: command: - - ^[Ii1]s$ + - ^[Ii1]s responses: - type: narrative content: From 248271355f3e1b5bfef68bcbe6d48041a4a633ad Mon Sep 17 00:00:00 2001 From: wancat Date: Tue, 2 Jul 2024 11:57:55 +0800 Subject: [PATCH 3/3] fix: restore quests changes to prevent conflicts --- quests/exceptions.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/quests/exceptions.yml b/quests/exceptions.yml index edf5341..1cabbca 100644 --- a/quests/exceptions.yml +++ b/quests/exceptions.yml @@ -28,7 +28,7 @@ exceptions: - condition: command: - - ^echo[^\s] + - ^echo\S$ responses: - type: narrative content: @@ -36,7 +36,7 @@ exceptions: - condition: command: - - ^cd\S + - ^cd\S$ responses: - type: narrative content: @@ -44,7 +44,7 @@ exceptions: - condition: command: - - ^ls\S + - ^ls\S$ responses: - type: narrative content: @@ -52,7 +52,7 @@ exceptions: - condition: command: - - ^cat\S + - ^cat\S$ responses: - type: narrative content: @@ -60,7 +60,7 @@ exceptions: - condition: command: - - ^touch\S + - ^touch\S$ responses: - type: narrative content: @@ -71,7 +71,7 @@ exceptions: command: - ^rmdir$ command: - - ^rm\S + - ^rm\S$ responses: - type: narrative content: @@ -79,7 +79,7 @@ exceptions: - condition: command: - - ^mv\S + - ^mv\S$ responses: - type: narrative content: @@ -87,7 +87,7 @@ exceptions: - condition: command: - - ^mkdir\S + - ^mkdir\S$ responses: - type: narrative content: @@ -95,7 +95,7 @@ exceptions: - condition: command: - - ^rmdir\S + - ^rmdir\S$ responses: - type: narrative content: @@ -103,7 +103,7 @@ exceptions: - condition: command: - - ^cp\S + - ^cp\S$ responses: - type: narrative content: @@ -111,7 +111,7 @@ exceptions: - condition: command: - - ^[Ii1]s + - ^[Ii1]s$ responses: - type: narrative content: