dsh-lqa-panel 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 xsarthur90-art
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,74 @@
1
- # Temporary Holding Version
1
+ # dsh-lqa-panel
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ DeepSeek Harness(DSH)插件:在输入框下方的 dock 里打开一个「LQA 通读」面板,粘贴整段游戏文案,按五层检查后发给当前会话。
4
+
5
+ 它不判断对错,也不读屏、不抓游戏进程。它只做一件事:把你贴的文本包装成一条结构化的 LQA 审校请求,通过当前会话发出去。
6
+
7
+ ## 要求
8
+
9
+ - DSH 桌面版(Web UI)
10
+ - 支持客户端插件(`dsh.client`)的版本
11
+
12
+ ## 安装
13
+
14
+ ### 1. 按包名(已发布到 npm)
15
+
16
+ 在 DSH 的「插件」页点安装,输入:
17
+
18
+ ```
19
+ dsh-lqa-panel
20
+ ```
21
+
22
+ ### 2. 本地目录
23
+
24
+ ```
25
+ C:\path\to\lqa-toolkit\dsh-lqa-panel
26
+ ```
27
+
28
+ 安装完成后**刷新页面**(`Ctrl + R`)。输入框下方出现「LQA 通读」即成功;没有出现就重启 DSH 再看。
29
+
30
+ ## 用法
31
+
32
+ 1. 点「LQA 通读」展开面板
33
+ 2. 粘贴整段文案(一条任务线、一个 PV、一整列字符串表都行,带行号更好)
34
+ 3. 点一个层(默认五层全查)
35
+ 4. 「发送分析」或 `Ctrl + Enter`
36
+ 5. 需要改法时勾上「给改法」;只想先看问题就取消
37
+
38
+ 发送后就是一条普通消息,回复出现在当前会话里,可继续追问。
39
+
40
+ ## 五个层
41
+
42
+ | 层 | 查什么 |
43
+ |---|---|
44
+ | 1 逻辑一致性 | 前后矛盾、事实冲突、时间线对不上 |
45
+ | 2 专名与称谓 | 人名/地名/组织名不一致、称号被写成团体、称谓阶级错位 |
46
+ | 3 信息增减 | 译文加了原文没有的信息、丢了原文有的信息 |
47
+ | 4 人物口吻 | 这句话像不像这个人在这个场合说的 |
48
+ | 5 语域 | 美式/现代用语混进维多利亚英式 |
49
+
50
+ 另有独立的 **重写型本地化** 模式:英文是重写稿而不是直译时用。它不逐句对照,查的是设定一致性、线索完整性(侦探题材里线索被改没或提前说破算 Critical)、新增信息是否越权、人物口吻、语域、跨语言事实是否变了。
51
+
52
+ ## 排错
53
+
54
+ | 现象 | 处理 |
55
+ |---|---|
56
+ | 按钮不出现 | 先刷新页面;仍没有就重启 DSH;确认「插件」页里它是启用状态 |
57
+ | 点发送报"当前会话还没有可用的输入通道" | 先在这个会话里手动发一条消息,再试 |
58
+ | 安装后 DSH 起不来 | 到「插件」页禁用它,或从 profile 的 `package.json` 依赖里移除后重装 |
59
+
60
+ ## 副作用说明
61
+
62
+ 安装会把包以 `link:` 或 registry 依赖写进当前 DSH profile 的 `package.json`,并运行一次 pnpm。这是 DSH 插件的标准安装行为。如果你同时用其它本地 link 插件,注意 pnpm 会按 lockfile 重新链接它们。
63
+
64
+ ## 隐私
65
+
66
+ 面板里的文本会作为一条普通消息发给你自己的 DSH 会话,再由当前会话模型处理——**文本会作为推理输入发往模型服务**。是否允许把公司未上线文本发出去,取决于你的 NDA 和公司规定,请先确认。
67
+
68
+ ## 兼容性
69
+
70
+ 插件依赖 DSH 的客户端槽位(`conversation.composer.dock`)与 `sessions` 客户端服务。DSH 升级后如果槽位或服务签名变化,面板可能需要跟着改。
71
+
72
+ ## License
73
+
74
+ MIT
package/client.js ADDED
@@ -0,0 +1,342 @@
1
+ /**
2
+ * LQA 五层通读面板(Client 半)。
3
+ *
4
+ * 在 composer dock 放一个「LQA 通读」入口:点开 → 粘贴整段文案 → 选检查层 → 发送。
5
+ * 发送走 `ctx.sessions.scope(sessionId).get('conversation').send(text)`,
6
+ * 也就是把提示词当作一条用户消息送进当前会话,由 Agent 通读后出清单。
7
+ * 不联网、不读屏、不碰游戏进程;文本只发往当前会话。
8
+ */
9
+ window.__ModuleLoader__.load({
10
+ id: 'dsh-lqa-panel',
11
+ factory(require) {
12
+ const React = require('react')
13
+ const h = React.createElement
14
+ const { useState, useRef, useEffect } = React
15
+
16
+ /** 五层定义:与 lqa-kit/五层检查表.md 保持一致。 */
17
+ const LAYERS = {
18
+ 1: '逻辑一致性:后文是否推翻前文,时间、地点、人物、动机是否对得上,有没有自相矛盾',
19
+ 2: '专名与称谓:人名、地名、组织、称号前后是否一致,与角色设定和中文原文是否对得上',
20
+ 3: '信息增减:英文是否加了中文没有的信息(设定、态度、动作),或丢了中文有的信息',
21
+ 4: '人物口吻:这句话像不像这个身份、阶级、年龄的人说的;有没有把客气变抬杠、把委婉变直白',
22
+ 5: '语域:维多利亚时期英式英语;禁现代美式、禁网络用语、禁时代错置',
23
+ 6: '重写型本地化:英文是重写稿不是直译;查它作为独立成稿是否成立——设定一致、线索完整、不越权新增设定、口吻成立、语域统一',
24
+ }
25
+
26
+ const MODES = [
27
+ { id: 'auto', label: '全查(推荐)', layers: [1, 2, 3, 4, 5, 6] },
28
+ { id: 'adapt', label: '改写型专项', layers: [6] },
29
+ { id: 'full', label: '直译型五层', layers: [1, 2, 3, 4, 5] },
30
+ { id: 'logic', label: '逻辑矛盾', layers: [1] },
31
+ { id: 'names', label: '专名称谓', layers: [2] },
32
+ { id: 'info', label: '信息增减', layers: [3] },
33
+ { id: 'tone', label: '人物口吻', layers: [4] },
34
+ { id: 'register', label: '英式语域', layers: [5] },
35
+ ]
36
+
37
+ /**
38
+ * 把用户粘贴的文本整理成一条完整的分析请求。
39
+ * 纯函数,便于单独验证。
40
+ * @param {{text?: string, layers?: number[], fix?: boolean}} o - 输入。
41
+ * @returns {string} 可直接作为用户消息发送的提示词;文本为空时返回空串。
42
+ */
43
+ function buildPrompt(o) {
44
+ const text = String((o && o.text) || '').replace(/\r\n/g, '\n').trim()
45
+ if (text === '') return ''
46
+ const picked = o && Array.isArray(o.layers) && o.layers.length > 0 ? o.layers : [1, 2, 3, 4, 5, 6]
47
+ const hasRewrite = picked.indexOf(6) !== -1
48
+ const hasFive = picked.some((n) => n >= 1 && n <= 5)
49
+ const out = []
50
+ if (hasRewrite && hasFive) {
51
+ out.push('【LQA 通读】请把下面这段当作一整段来读。先判断它属于哪种:直译型(基本逐句对应中文)还是改写型(为了英文节奏、笑点、口吻重写过)。一句话给出判断依据,然后按对应标准查。')
52
+ out.push('')
53
+ out.push('无论哪种都要查:')
54
+ out.push('- 逻辑一致性:后文是否推翻前文,时间、地点、人物、动机是否对得上')
55
+ out.push('- 专名与称谓:人名、地名、组织、称号是否前后一致,与角色设定对不对得上')
56
+ out.push('- 人物口吻:像不像这个身份、阶级、年龄的人说的')
57
+ out.push('- 语域:维多利亚英式;禁现代美式、网络语、时代错置')
58
+ out.push('')
59
+ out.push('如果判定是直译型,额外查:')
60
+ out.push('- 信息增减:逐条对照中文,英文加了什么、丢了什么')
61
+ out.push('')
62
+ out.push('如果判定是改写型,额外查:')
63
+ out.push('- 设定一致性:改写有没有改出与前文矛盾的事实')
64
+ out.push('- 线索完整性:玩家从英文能不能推出和中文版一样的结论;线索被改没、改弱、挪走或提前说破')
65
+ out.push('- 越权新增:有没有凭空发明世界观、新设定、新人物关系')
66
+ out.push('- 跨语言事实:和中文/其它语言版本不同,是有意改写还是事实变了')
67
+ out.push('')
68
+ out.push('输出格式:')
69
+ out.push('1) 先给 3–5 行总评:类型判断 + 能不能上线 + 最危险的 1–2 处;改写型还要说哪几处改写比直译好。')
70
+ out.push('2) 再给一张 Markdown 表格:行号 | 原文 | 检查项 | 严重度 | 问题 | 建议改法')
71
+ out.push(' 严重度用 Critical / Major / Minor;行号沿用我给的编号,没有就按自然段从 1 数。')
72
+ out.push('3) 最后单独列「Critical 清单」,没有就写「无」。')
73
+ out.push('')
74
+ out.push('规则:')
75
+ out.push('- 判定为改写型就不要逐句对照、不要要求直译;改写得好与改写错了要分开说。')
76
+ out.push('- 侦探题材:线索被弄丢或提前说破,一律 Critical。')
77
+ out.push('- 不确定的标「待核」,不要编。')
78
+ out.push('- 我给了中文时:直译型以中文为对照;改写型中文只作设定参考。')
79
+ if (o && o.fix === false) out.push('- 只指出问题,不用给改法。')
80
+ out.push('')
81
+ out.push('文本:')
82
+ out.push(text)
83
+ return out.join('\n')
84
+ }
85
+ if (hasRewrite) {
86
+ out.push('【LQA 重写型本地化通读】这一版英文是重写稿,不是直译。不要逐句对照,不要要求直译。')
87
+ out.push('判断标准换成:它作为一份独立的英文成稿,是否还成立。')
88
+ out.push('')
89
+ out.push('检查项:')
90
+ out.push('A 设定一致性:与已知设定、前文是否矛盾(时间、地点、人物关系、组织、事件顺序)')
91
+ out.push('B 线索完整性:玩家从英文里还能不能推出和中文版一样的结论;线索有没有被改没、改弱、挪到别处,或者被提前说破')
92
+ out.push('C 信息增减:新增的信息是否越权(凭空发明世界观、新设定、新人物关系);丢掉的信息是否影响理解或后续剧情')
93
+ out.push('D 人物口吻:改写后这个人还像不像这个人(身份、阶级、年龄、和对方的关系)')
94
+ out.push('E 语域与时代:维多利亚英式;禁现代美式、网络语、时代错置')
95
+ out.push('F 跨语言一致:和中文版或其它语言版本不同,是有意改写,还是事实变了')
96
+ out.push('')
97
+ out.push('输出格式:')
98
+ out.push('1) 先给 3–5 行总评:能不能上线;最危险的一处;以及哪几处改写其实比直译好,明确说出来。')
99
+ out.push('2) 再给一张 Markdown 表格:行号 | 类型(改写/新增/丢失/矛盾/口吻/语域)| 严重度 | 说明 | 建议')
100
+ out.push(' 严重度用 Critical / Major / Minor;行号沿用我给的编号,没有就按自然段从 1 数。')
101
+ out.push('3) 最后单独列「Critical 清单」,没有就写「无」。')
102
+ out.push('')
103
+ out.push('规则:')
104
+ out.push('- 中文版只作设定参考,不作为逐句对照的标准;允许改写,但改写不能改事实、不能改掉线索。')
105
+ out.push('- 侦探题材:线索被改写弄丢或提前说破,一律 Critical。')
106
+ out.push('- 区分「改写得好」和「改写错了」,不要一律判错。')
107
+ out.push('- 不确定的标「待核」,不要编。')
108
+ if (o && o.fix === false) out.push('- 只指出问题,不用给改写建议。')
109
+ out.push('')
110
+ out.push('文本:')
111
+ out.push(text)
112
+ return out.join('\n')
113
+ }
114
+ out.push('【LQA 五层通读】请把下面这段当作一整段来读,先看上下文,不要逐词查。')
115
+ out.push('')
116
+ out.push('检查层:')
117
+ for (const n of picked) out.push('- ' + LAYERS[n])
118
+ out.push('')
119
+ out.push('输出格式:')
120
+ out.push('1) 先给 3–5 行总评:这段能不能上线、最危险的 1–2 处是什么。')
121
+ out.push('2) 再给一张 Markdown 表格:行号 | 原文 | 层 | 严重度 | 问题 | 建议改法')
122
+ out.push(' 严重度用 Critical / Major / Minor;行号沿用我给的编号,没有编号就按自然段从 1 数。')
123
+ out.push('3) 最后单独列「Critical 清单」,没有就写「无」。')
124
+ out.push('')
125
+ out.push('规则:')
126
+ out.push('- 不确定的标「待核」,不要编。')
127
+ out.push('- 我给了中文就以中文为准判断英文;没给就只判断英文内部一致性。')
128
+ if (o && o.fix === false) out.push('- 只指出问题,不用给改法。')
129
+ out.push('- 不要重写整段,只改有问题的行。')
130
+ out.push('')
131
+ out.push('文本:')
132
+ out.push(text)
133
+ return out.join('\n')
134
+ }
135
+
136
+ const COLOR = {
137
+ text: 'var(--dsw-alias-text-primary, #e8e8ea)',
138
+ muted: 'var(--dsw-alias-text-secondary, #9a9aa2)',
139
+ border: 'var(--dsw-alias-border-secondary, #36363d)',
140
+ bg: 'var(--dsw-alias-bg-elevated, #1d1d22)',
141
+ brand: 'var(--dsw-alias-brand-primary, #4d6bfe)',
142
+ danger: 'var(--dsw-alias-text-danger, #e26a6a)',
143
+ }
144
+
145
+ const btn = (primary) => ({
146
+ appearance: 'none',
147
+ border: '1px solid ' + (primary ? COLOR.brand : COLOR.border),
148
+ background: primary ? COLOR.brand : 'transparent',
149
+ color: primary ? '#fff' : COLOR.text,
150
+ borderRadius: 7,
151
+ padding: '5px 12px',
152
+ font: 'inherit',
153
+ fontSize: 13,
154
+ cursor: 'pointer',
155
+ lineHeight: 1.6,
156
+ })
157
+
158
+ const chip = (active) => ({
159
+ appearance: 'none',
160
+ border: '1px solid ' + (active ? COLOR.brand : COLOR.border),
161
+ background: active ? 'color-mix(in srgb, ' + COLOR.brand + ' 18%, transparent)' : 'transparent',
162
+ color: active ? COLOR.text : COLOR.muted,
163
+ borderRadius: 999,
164
+ padding: '3px 10px',
165
+ font: 'inherit',
166
+ fontSize: 12,
167
+ cursor: 'pointer',
168
+ })
169
+
170
+ /** 折叠态入口 + 展开态面板。 */
171
+ function LqaPanel(props) {
172
+ const [open, setOpen] = useState(false)
173
+ const [text, setText] = useState('')
174
+ const [mode, setMode] = useState('auto')
175
+ const [fix, setFix] = useState(true)
176
+ const [busy, setBusy] = useState(false)
177
+ const [error, setError] = useState('')
178
+ const [notice, setNotice] = useState('')
179
+ const areaRef = useRef(null)
180
+
181
+ useEffect(() => {
182
+ if (!open) return undefined
183
+ const timer = setTimeout(() => {
184
+ if (areaRef.current) areaRef.current.focus()
185
+ }, 0)
186
+ const onKey = (event) => {
187
+ if (event.key === 'Escape') setOpen(false)
188
+ }
189
+ document.addEventListener('keydown', onKey)
190
+ return () => {
191
+ clearTimeout(timer)
192
+ document.removeEventListener('keydown', onKey)
193
+ }
194
+ }, [open])
195
+
196
+ const layers = (MODES.find(m => m.id === mode) || MODES[0]).layers
197
+ const prompt = buildPrompt({ text, layers, fix })
198
+
199
+ const send = () => {
200
+ if (busy) return
201
+ if (prompt === '') {
202
+ setError('先把要查的文本粘进来。')
203
+ return
204
+ }
205
+ setError('')
206
+ setBusy(true)
207
+ Promise.resolve()
208
+ .then(() => props.sendPrompt(prompt))
209
+ .then(() => {
210
+ setText('')
211
+ setOpen(false)
212
+ setNotice('已发送,看对话里的分析。')
213
+ })
214
+ .catch((err) => {
215
+ setError('发送失败:' + String((err && err.message) || err))
216
+ })
217
+ .finally(() => setBusy(false))
218
+ }
219
+
220
+ const copy = () => {
221
+ if (prompt === '') {
222
+ setError('先把要查的文本粘进来。')
223
+ return
224
+ }
225
+ setError('')
226
+ const done = () => setNotice('提示词已复制,可自己粘到输入框。')
227
+ if (typeof navigator !== 'undefined' && navigator.clipboard && navigator.clipboard.writeText) {
228
+ navigator.clipboard.writeText(prompt).then(done, () => setError('复制失败,请手动全选复制。'))
229
+ } else {
230
+ setError('这个环境不支持剪贴板,请手动全选复制。')
231
+ }
232
+ }
233
+
234
+ if (!open) {
235
+ return h('div', { style: { display: 'flex', alignItems: 'center', gap: 8, padding: '2px 0' } },
236
+ h('button', {
237
+ type: 'button',
238
+ onClick: () => { setOpen(true); setNotice('') },
239
+ title: '打开 LQA 通读面板',
240
+ 'aria-expanded': false,
241
+ style: Object.assign(btn(false), { display: 'inline-flex', alignItems: 'center', gap: 6 }),
242
+ }, h('span', { 'aria-hidden': true }, '⌕'), 'LQA 通读'),
243
+ notice !== '' && h('span', { style: { color: COLOR.muted, fontSize: 12 } }, notice))
244
+ }
245
+
246
+ return h('div', {
247
+ role: 'group',
248
+ 'aria-label': 'LQA 通读面板',
249
+ style: {
250
+ border: '1px solid ' + COLOR.border,
251
+ background: COLOR.bg,
252
+ borderRadius: 10,
253
+ padding: 10,
254
+ margin: '4px 0',
255
+ boxShadow: '0 6px 24px rgba(0,0,0,0.25)',
256
+ },
257
+ },
258
+ h('div', { style: { display: 'flex', alignItems: 'center', gap: 8, marginBottom: 8 } },
259
+ h('strong', { style: { fontSize: 13, color: COLOR.text } }, 'LQA 五层通读'),
260
+ h('span', { style: { fontSize: 12, color: COLOR.muted, flex: 1 } }, '整段粘贴,由当前会话通读'),
261
+ h('button', {
262
+ type: 'button',
263
+ onClick: () => setOpen(false),
264
+ 'aria-label': '收起面板',
265
+ style: Object.assign(btn(false), { padding: '2px 8px' }),
266
+ }, '×')),
267
+
268
+ h('div', { style: { display: 'flex', flexWrap: 'wrap', gap: 6, marginBottom: 8 } },
269
+ MODES.map(m => h('button', {
270
+ key: m.id,
271
+ type: 'button',
272
+ onClick: () => setMode(m.id),
273
+ 'aria-pressed': mode === m.id,
274
+ style: chip(mode === m.id),
275
+ }, m.label))),
276
+
277
+ h('textarea', {
278
+ ref: areaRef,
279
+ value: text,
280
+ onChange: (event) => { setText(event.target.value); setNotice('') },
281
+ onKeyDown: (event) => {
282
+ if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) {
283
+ event.preventDefault()
284
+ send()
285
+ }
286
+ },
287
+ placeholder: '粘贴整段英文(或中英对照)。按顺序、一行一句,带角色名更好。\n公司未上线文本请先确认能否外发。',
288
+ spellCheck: false,
289
+ style: {
290
+ width: '100%',
291
+ boxSizing: 'border-box',
292
+ minHeight: 132,
293
+ maxHeight: 280,
294
+ resize: 'vertical',
295
+ background: 'transparent',
296
+ color: COLOR.text,
297
+ border: '1px solid ' + COLOR.border,
298
+ borderRadius: 8,
299
+ padding: 8,
300
+ font: 'inherit',
301
+ fontSize: 13,
302
+ lineHeight: 1.6,
303
+ },
304
+ }),
305
+
306
+ h('div', { style: { display: 'flex', alignItems: 'center', gap: 8, marginTop: 8, flexWrap: 'wrap' } },
307
+ h('button', { type: 'button', onClick: send, disabled: busy, style: Object.assign(btn(true), busy ? { opacity: 0.6, cursor: 'default' } : {}) },
308
+ busy ? '发送中…' : '发送分析'),
309
+ h('button', { type: 'button', onClick: copy, style: btn(false) }, '复制提示词'),
310
+ h('label', { style: { display: 'inline-flex', alignItems: 'center', gap: 4, fontSize: 12, color: COLOR.muted } },
311
+ h('input', { type: 'checkbox', checked: fix, onChange: (event) => setFix(event.target.checked) }),
312
+ '给改法'),
313
+ h('span', { style: { flex: 1 } }),
314
+ h('span', { style: { fontSize: 12, color: COLOR.muted } }, 'Ctrl+Enter 发送')),
315
+
316
+ error !== '' && h('div', { role: 'alert', style: { marginTop: 6, fontSize: 12, color: COLOR.danger } }, error))
317
+ }
318
+
319
+ return {
320
+ inject: ['slots', 'sessions'],
321
+ apply(ctx) {
322
+ ctx.slots.inject('conversation.composer.dock', () => ctx.slots.register({
323
+ name: 'conversation.composer.dock',
324
+ id: 'lqa-panel',
325
+ order: 40,
326
+ inject: (sessionId) => ({
327
+ sendPrompt: (message) => {
328
+ const scope = ctx.sessions.scope(sessionId)
329
+ const conversation = scope === undefined ? undefined : scope.get('conversation')
330
+ if (conversation === undefined || conversation === null) {
331
+ throw new Error('当前会话还没有可用的输入通道,先发一条消息再试')
332
+ }
333
+ return conversation.send(message)
334
+ },
335
+ }),
336
+ }, LqaPanel))
337
+ },
338
+ /** 暴露给本地语法/单元测试,不参与运行时。 */
339
+ test: { buildPrompt, MODES, LAYERS },
340
+ }
341
+ },
342
+ })
@@ -0,0 +1,3 @@
1
+ - insert:
2
+ - id: lqa-panel
3
+ name: 'dsh-lqa-panel'
package/docs/DETAIL.md ADDED
@@ -0,0 +1,25 @@
1
+ # LQA 五层通读面板
2
+
3
+ 输入框下方的 LQA 入口:把整段文案粘进来,选检查层,直接作为一条用户消息发给当前会话,由 Agent 通读后出清单。
4
+
5
+ ## 做什么
6
+
7
+ - 折叠态是输入框下方的一个小按钮「LQA 通读」;点开后是文本域 + 检查层 + 发送。
8
+ - 检查层八选一:全查(推荐,自动判断直译/改写)、改写型专项、直译型五层、逻辑矛盾、专名称谓、信息增减、人物口吻、英式语域。默认「全查」:先判断这段是直译还是改写,再按对应标准查,不需要你自己先分类。
9
+ - 「重写型本地化」是另一套标准:英文是重写稿而不是直译时用。它不逐句对照,查的是设定一致性、线索完整性、信息增减是否越权、人物口吻、语域、跨语言事实是否变了;侦探题材里线索被改没或提前说破算 Critical。
10
+ - 发送时把提示词写死成固定结构:先总评,再 Markdown 表格(行号 / 原文 / 层 / 严重度 / 问题 / 建议改法),最后 Critical 清单;不确定的标「待核」。
11
+ - 「复制提示词」把同一条提示词放进剪贴板,方便手动粘到输入框。
12
+
13
+ ## 怎么用
14
+
15
+ 1. 打开一个会话,在输入框下方点「LQA 通读」。
16
+ 2. 粘贴整段文本(一行一句、按顺序、带角色名最好)。
17
+ 3. 选检查层,点「发送分析」(或 Ctrl+Enter)。分析会作为这一轮的回复出现在对话里。
18
+
19
+ ## 边界
20
+
21
+ - 它不判断对错,也不内置模型:判断由当前会话的 Agent 完成,文本会随这条消息发往该会话所用的模型服务。
22
+ - 不读屏、不抓游戏、不碰游戏进程;输入什么就发什么。
23
+ - 公司未上线文本能否外发,由使用者自己按 NDA 确认;面板不做任何脱敏。
24
+ - 面板文案目前是中文;没有做多语言。
25
+ - 只在这个插件的输入框里工作,不替换宿主输入框。
package/icon.svg ADDED
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64" role="img" aria-label="LQA panel">
2
+ <rect x="4" y="6" width="56" height="52" rx="15" fill="#1f2a44"/>
3
+ <circle cx="28" cy="29" r="11" fill="none" stroke="#6fd3c7" stroke-width="4"/>
4
+ <path d="M36 37 L45 46" fill="none" stroke="#6fd3c7" stroke-width="4" stroke-linecap="round"/>
5
+ <path d="M20 50h24" stroke="#e8eefc" stroke-width="3" stroke-linecap="round" opacity="0.75"/>
6
+ <path d="M24 44h16" stroke="#e8eefc" stroke-width="3" stroke-linecap="round" opacity="0.45"/>
7
+ </svg>
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ /** Host half of the LQA panel bundle; all rendering lives in client.js. */
2
+ export function apply() {}
package/locale/en.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "LQA five-layer review panel",
4
+ "description": "Opens a panel below the composer: paste a whole passage, pick the review layers, and send it to the current session for a whole-context LQA pass.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "LQA 五层通读面板",
4
+ "description": "在输入框下方打开面板:粘贴整段文案,选检查层,直接发给当前会话做通读式 LQA。",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/package.json CHANGED
@@ -1,6 +1,46 @@
1
1
  {
2
2
  "name": "dsh-lqa-panel",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "private": false,
5
+ "type": "module",
6
+ "description": "LQA five-layer review panel for DeepSeek Harness: paste a quest text into the composer dock and send it to the current session for a five-layer localization review.",
7
+ "keywords": [
8
+ "dsh-plugin",
9
+ "deepseek-harness",
10
+ "lqa",
11
+ "game-localization",
12
+ "localization-qa"
13
+ ],
14
+ "license": "MIT",
15
+ "author": "xsarthur90-art",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/xsarthur90-art/lqa-toolkit.git"
19
+ },
20
+ "homepage": "https://github.com/xsarthur90-art/lqa-toolkit#dsh-lqa-panel",
21
+ "bugs": {
22
+ "url": "https://github.com/xsarthur90-art/lqa-toolkit/issues"
23
+ },
24
+ "exports": {
25
+ ".": "./index.js",
26
+ "./client": "./client.js",
27
+ "./locale/*.json": "./locale/*.json",
28
+ "./icon": "./icon.svg"
29
+ },
30
+ "files": [
31
+ "index.js",
32
+ "client.js",
33
+ "cordis.patch.yml",
34
+ "locale/*.json",
35
+ "docs",
36
+ "icon.svg"
37
+ ],
38
+ "dsh": {
39
+ "bundle": { "patch": "./cordis.patch.yml" },
40
+ "client": {
41
+ "platform": "web",
42
+ "immediately": true,
43
+ "inject": ["@deepseek-ai/dsh-client-ui-conversation"]
44
+ }
45
+ }
46
+ }