feat: 发布 1.1.3,提示词只注入一次并修复插件加载

This commit is contained in:
叫我小杨同学 committed 2026-09-18 14:10:58 +08:00
1 parent ea2632cd75
commit d49a3b5eed
10 files changed
+434 -61

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
import assert from "node:assert/strict";
import { lastHumanUserText } from "../lib/rewind.js";
const events = [
{ type: "turn/start", seq: 1 },
{
type: "user/message",
seq: 2,
data: { content: [{ type: "text", text: "first" }], source: { kind: "user" } },
},
{ type: "turn/end", seq: 3 },
{ type: "turn/start", seq: 4 },
{
type: "user/message",
seq: 5,
data: { content: [{ type: "text", text: "second" }], source: { kind: "user" } },
},
{
type: "user/message",
seq: 6,
data: { content: [{ type: "text", text: "[MNEMON] skip" }], source: { kind: "plugin", plugin: "dsh-mnemon" } },
},
];
assert.equal(lastHumanUserText(events), "second");
assert.equal(lastHumanUserText([]), "");
assert.equal(lastHumanUserText(null), "");
console.log("rewind-last-user ok");