diff --git a/src/api.ts b/src/api.ts
index ae6a9d3..a447f28 100644
--- a/src/api.ts
+++ b/src/api.ts
@@ -228,6 +228,7 @@ export const Submission = {
const res = await http.get(`/submission/stats/${taskId}`, { params })
return res.data as TaskStatsOut
},
+
}
export const Prompt = {
diff --git a/src/components/submissions/ChainModal.vue b/src/components/submissions/ChainModal.vue
index 175293d..4809f81 100644
--- a/src/components/submissions/ChainModal.vue
+++ b/src/components/submissions/ChainModal.vue
@@ -75,7 +75,19 @@
transition: 'all 0.2s',
}"
>
- {{ round.question }}
+
+ {{ round.question }}
+ L{{ round.prompt_level }}
+
@@ -121,6 +133,7 @@ const selectedRound = ref(0)
const rounds = computed(() => {
const result: {
question: string
+ prompt_level: number | null
html: string | null
css: string | null
js: string | null
@@ -139,11 +152,20 @@ const rounds = computed(() => {
break
}
}
- result.push({ question: msg.content, html, css, js })
+ result.push({ question: msg.content, prompt_level: msg.prompt_level ?? null, html, css, js })
}
return result
})
+const levelColors: Record = {
+ 1: "#aaa",
+ 2: "#6aab9c",
+ 3: "#4a9ade",
+ 4: "#c47ab8",
+ 5: "#e0a040",
+ 6: "#e05c5c",
+}
+
const selectedPageHtml = computed(() => {
const round = rounds.value[selectedRound.value]
if (!round?.html) return null
diff --git a/src/utils/type.ts b/src/utils/type.ts
index 484c04a..e585153 100644
--- a/src/utils/type.ts
+++ b/src/utils/type.ts
@@ -7,6 +7,7 @@ export interface PromptMessage {
code_html: string | null
code_css: string | null
code_js: string | null
+ prompt_level?: number | null
created: string
}