dsh-input-traffic 0.7.10 → 0.7.11
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/CHANGELOG.md +6 -0
- package/dsh.plugin.json +1 -1
- package/lib/client.js +26 -1
- package/lib/client.js.map +1 -1
- package/lib/types/client/steer-queue-dock.d.ts +26 -0
- package/lib/types/client/steer-queue-dock.d.ts.map +1 -1
- package/lib/types/client/steer-queue-dock.js +28 -1
- package/lib/types/client/steer-queue-dock.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
### 修复:注入上下文不再占位等待区
|
|
6
|
+
|
|
7
|
+
`next-step` 带里混着两类行:人真的插的话(`source.kind === 'user'`,web 控制器会给它盖上 `rpcId`),与服务/插件推给模型的上下文(宿主自己的 `user-approval` / `policy` / `time-context` 通知,以及第三方插件的意见)。旧实现把整个 `next-step` 都当“🟡 插话中”画出来,于是“The approval policy changed from "ask" to "never"”这类系统通知出现在用户的等待区里,还带着编辑 / 重排 / 重发按钮——那是对着不是人写的东西开的操作。现在新增纯函数 `isHumanSteer(row)`,黄色带只画真人插话;没带 `source` 的旧行(本地 fixture、老宿主)照旧可见,不会误伤真队列。上下文本身仍照常进模型。
|
|
8
|
+
|
|
3
9
|
## 0.7.7 (2026-10-27)
|
|
4
10
|
|
|
5
11
|
两条外部 issue(feidky)的修复;无宿主兼容面变更,`engines.dsh` 枚举与 peers 保持 0.7.6。
|
package/dsh.plugin.json
CHANGED
package/lib/client.js
CHANGED
|
@@ -704,6 +704,31 @@ window.__ModuleLoader__.load({
|
|
|
704
704
|
return null;
|
|
705
705
|
}
|
|
706
706
|
/**
|
|
707
|
+
* Whether one `next-step` inbox row is a steer the person typed, rather than
|
|
708
|
+
* context some producer injected into the same band.
|
|
709
|
+
*
|
|
710
|
+
* The host merges two different things into `next-step`:
|
|
711
|
+
* - a human steer — `source.kind === 'user'` (the web controller stamps it with
|
|
712
|
+
* an `rpcId`), the yellow tier this dock exists to plan;
|
|
713
|
+
* - model-facing context pushed by a service or plugin with its own
|
|
714
|
+
* `source.kind` — the host's own `user-approval` / `policy` / `time-context`
|
|
715
|
+
* notices, and third-party notes such as perm-gate's block opinion.
|
|
716
|
+
*
|
|
717
|
+
* Only the first is an input the person still owns. Drawing the second as a
|
|
718
|
+
* planned message put host notices (“The approval policy changed…”) into the
|
|
719
|
+
* waiting area with edit / reorder / resend affordances that cannot work on
|
|
720
|
+
* them, and competed with the user's own queue for attention.
|
|
721
|
+
*
|
|
722
|
+
* Lenient on purpose: a row with no `source` at all (local fixtures, older
|
|
723
|
+
* hosts) stays visible, so nothing legitimately queued can disappear.
|
|
724
|
+
* @param row - one `next-step` inbox row.
|
|
725
|
+
* @returns true when the row is a human steer.
|
|
726
|
+
*/
|
|
727
|
+
function isHumanSteer(row) {
|
|
728
|
+
const kind = row.source?.kind;
|
|
729
|
+
return kind === void 0 || kind === "user";
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
707
732
|
* Auto-grow one edit textarea to its content. The CSS max-height caps the
|
|
708
733
|
* growth; beyond it the textarea scrolls internally. Height is reset first so
|
|
709
734
|
* shrink (deleting lines) also tracks the content.
|
|
@@ -735,7 +760,7 @@ window.__ModuleLoader__.load({
|
|
|
735
760
|
...row,
|
|
736
761
|
text: textOf(row.content) ?? row.text ?? null
|
|
737
762
|
})), [inbox]);
|
|
738
|
-
const steering = (0, react.useMemo)(() => (inbox?.["next-step"] ?? []).map((row) => ({
|
|
763
|
+
const steering = (0, react.useMemo)(() => (inbox?.["next-step"] ?? []).filter(isHumanSteer).map((row) => ({
|
|
739
764
|
...row,
|
|
740
765
|
text: textOf(row.content) ?? row.text ?? null
|
|
741
766
|
})), [inbox]);
|