Merge remote-tracking branch 'upstream/main' into feat/secret-friendly-names
This commit is contained in:
@@ -11,6 +11,8 @@ import { AuthStorage } from "@oh-my-pi/pi-coding-agent/session/auth-storage";
|
||||
import { SessionManager } from "@oh-my-pi/pi-coding-agent/session/session-manager";
|
||||
import { TempDir } from "@oh-my-pi/pi-utils";
|
||||
|
||||
const UNRENDERABLE_SNAPCOMPACT_TEXT = "\uE000\uE001\uE002\uE003\uE004\uE005\uE006\uE007\uE008\uE009";
|
||||
|
||||
interface Harness {
|
||||
session: AgentSession;
|
||||
sessionManager: SessionManager;
|
||||
@@ -47,7 +49,7 @@ async function createHarness(tempDir: TempDir, authStorage: AuthStorage, options
|
||||
const settings = Settings.isolated({
|
||||
"compaction.strategy": "snapcompact",
|
||||
// Force a 1-token recent window so the post-turn cut always splits off the
|
||||
// last turn and summarizes the seeded (CJK) history. With the default
|
||||
// last turn and summarizes the seeded unrenderable history. With the default
|
||||
// 20k window the cut keeps both tiny messages, leaving nothing for
|
||||
// snapcompact's renderability preflight to scan.
|
||||
"compaction.keepRecentTokens": 1,
|
||||
@@ -164,7 +166,7 @@ describe("AgentSession auto-snapcompact local-blocker fallback", () => {
|
||||
seedMessages: [
|
||||
{
|
||||
role: "user",
|
||||
content: "你好,请帮我审查这段代码。它的逻辑似乎有问题,我无法理解为何返回空结果。",
|
||||
content: UNRENDERABLE_SNAPCOMPACT_TEXT.repeat(10),
|
||||
timestamp: Date.now(),
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user