fix: 提示词链里的引导提问不算轮数,分类器固定结果、跳过过短输入

- 引导对话和 AI 对话存在同一个对话里,提示词链把它当成一轮“AI 对话”,显示“没有网页”。
  现在标成“引导”,淡化显示,不计入轮数,也不能选中(↑↓ 跳过)
- 分类器 temperature 设为 0:同一句提示词以前约两成会被打成不同层级
- 不到 4 个字的提问(“1”“,”等)不打层级,--force 重标时清掉旧标签

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-27 20:26:29 +08:00
1 parent bc9da688ba
commit 30630e8125
6 files changed
+73 -10

No files matched your search

+10 -2
View File
@@ -121,14 +121,14 @@
<section>
<n-flex justify="space-between" align="center" class="chain-head">
<h4>提示词 <span class="muted" v-if="chain.length">· {{ chain.length }} 轮</span></h4>
<h4>提示词 <span class="muted" v-if="chainSteps">· {{ chainSteps }} 轮</span></h4>
<n-button v-if="chain.length" size="tiny" quaternary @click="showChain = true">
逐轮看网页
</n-button>
</n-flex>
<div v-if="!chain.length" class="muted">这份提交没有关联的提示词</div>
<ol class="chain">
<li v-for="(r, i) in chain" :key="i">
<li v-for="(r, i) in chain" :key="i" :class="{ guide: r.source === 'guidance' }">
<n-flex :size="6" align="center">
<span class="src">{{ sourceLabel(r.source) }}</span>
<span v-if="r.prompt_level" class="level">{{ levelLabel(r.prompt_level) }}</span>
@@ -195,6 +195,8 @@ const versions = ref<SubmissionOut[]>([])
const chain = ref<PromptRound[]>([])
const rating = ref(false)
const showChain = ref(false)
// 引导对话不生成网页,不算轮数
const chainSteps = computed(() => chain.value.filter((r) => r.source !== "guidance").length)
let awardsCache: Promise<AwardManageOut[]> | null = null
const awards = ref<AwardManageOut[]>([])
@@ -490,6 +492,12 @@ h4 {
color: var(--wp-muted);
}
/* 不是 list-item,就不占 ol 的序号 */
.chain .guide {
display: block;
color: var(--wp-muted);
}
.level {
font: 600 11px var(--wp-font-mono);
color: var(--wp-brand);
@@ -9,7 +9,7 @@
<template #header>
<div class="head">
<b>提示词</b>
<span v-if="rounds.length" class="muted">{{ rounds.length }} 轮</span>
<span v-if="steps" class="muted">{{ steps }} 轮</span>
<span v-if="title" class="muted title">{{ title }}</span>
</div>
</template>
@@ -41,16 +41,17 @@
<li
v-for="(r, i) in rounds"
:key="i"
:class="['round', { on: i === selected }]"
@click="selected = i"
:class="['round', { on: i === selected, guide: isGuide(r) }]"
@click="isGuide(r) || (selected = i)"
>
<div class="round-head">
<span class="num">{{ i + 1 }}</span>
<span class="num">{{ nums[i] }}</span>
<span :class="['src', `src-${r.source || 'conversation'}`]">
{{ sourceLabel(r.source) }}
</span>
<span v-if="r.prompt_level" class="level">{{ levelLabel(r.prompt_level) }}</span>
<span v-if="i === rounds.length - 1" class="final">交的这一版</span>
<span v-else-if="isGuide(r)" class="muted no-code">问写提示词的建议,不生成网页</span>
<span v-else-if="!r.html" class="muted no-code">没有网页</span>
</div>
<div
@@ -65,7 +66,7 @@
<div class="stage">
<div class="stage-head">
<b>第 {{ selected + 1 }} 轮生成的网页</b>
<b>第 {{ nums[selected] }} 轮生成的网页</b>
<span class="muted">↑ ↓ 切换</span>
</div>
<div class="frame">
@@ -110,6 +111,14 @@ const rounds = ref<PromptRound[]>([])
const selected = ref(0)
const expanded = ref(new Set<number>())
// 引导对话(问怎么写提示词)夹在 AI 对话中间,不算轮数,也不能选中
const isGuide = (r: PromptRound) => r.source === "guidance"
const steps = computed(() => rounds.value.filter((r) => !isGuide(r)).length)
const nums = computed(() => {
let n = 0
return rounds.value.map((r) => (isGuide(r) ? "" : String(++n)))
})
const doc = computed(() => {
const r = rounds.value[selected.value]
if (!r?.html) return ""
@@ -165,7 +174,9 @@ function onKey(e: KeyboardEvent) {
const step = e.key === "ArrowDown" ? 1 : e.key === "ArrowUp" ? -1 : 0
if (!step || !rounds.value.length) return
e.preventDefault()
selected.value = Math.min(rounds.value.length - 1, Math.max(0, selected.value + step))
let i = selected.value + step
while (rounds.value[i] && isGuide(rounds.value[i]!)) i += step
if (rounds.value[i]) selected.value = i
nextTick(() =>
document.querySelector(".rounds .round.on")?.scrollIntoView({ block: "nearest" }),
)
@@ -291,6 +302,25 @@ onUnmounted(() => window.removeEventListener("keydown", onKey, true))
background: var(--wp-html-soft);
}
.src-guidance {
color: var(--wp-muted);
background: var(--wp-paper);
}
.round.guide {
border-style: dashed;
background: transparent;
cursor: default;
}
.round.guide:hover {
border-color: var(--wp-line);
}
.round.guide .q {
color: var(--wp-muted);
}
.level {
color: var(--wp-ink);
background: var(--wp-paper);
+1
View File
@@ -21,6 +21,7 @@ export function goHome(router: any, type: TASK_TYPE, display: number) {
export function sourceLabel(source: string | null | undefined) {
if (source === "edit") return "手改"
if (source === "manual") return "外部 AI"
if (source === "guidance") return "引导"
return "AI 对话"
}