@notrico/pi-fold 3.0.5 → 3.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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/docs/compatibility-testing.md +17 -0
- package/docs/implementation.md +1 -1
- package/docs/renderer-reference.md +1 -1
- package/index.ts +37 -23
- package/package.json +3 -2
- package/scripts/compatibility-check.mjs +40 -0
- package/scripts/compatibility-cli-smoke.mjs +41 -0
- package/scripts/preview-scroll.mjs +9 -0
- package/scripts/preview-work-strip.mjs +15 -1
- package/scripts/test.mjs +2 -2
- package/src/action-intent.ts +5 -1
- package/src/display-card.ts +2 -1
- package/src/fold-command.ts +7 -3
- package/src/fullscreen-overlays.ts +13 -11
- package/src/inspection.ts +19 -12
- package/src/modern-native-tools.ts +13 -7
- package/src/modern-prompts-adapter.ts +9 -7
- package/src/modern-skill-prompts.ts +17 -10
- package/src/modern-subagent-messages.ts +16 -7
- package/src/modern-subagent-spacing.ts +8 -6
- package/src/modern-thinking-adapter.ts +13 -9
- package/src/modern-thinking.ts +1 -1
- package/src/modern-tool-images.ts +8 -6
- package/src/modern-tools.ts +74 -30
- package/src/modern-workflows.ts +12 -7
- package/src/permission-presentation.ts +2 -1
- package/src/runtime-compatibility.ts +53 -14
- package/src/work-strip.ts +11 -9
- package/tests/action-intent.test.mjs +2 -0
- package/tests/codemode-wheel.test.mjs +111 -0
- package/tests/codemode.test.mjs +1 -1
- package/tests/compatibility-fallbacks.test.mjs +99 -0
- package/tests/display-cache-lifecycle.test.mjs +3 -3
- package/tests/fold-command.test.mjs +4 -4
- package/tests/fullscreen-overlays.test.mjs +4 -2
- package/tests/inspection.test.mjs +1 -1
- package/tests/modern-prompts.test.mjs +2 -2
- package/tests/modern-subagent-messages.test.mjs +2 -2
- package/tests/modern-thinking.test.mjs +2 -2
- package/tests/modern-tools.test.mjs +17 -8
- package/tests/modern-workflows.test.mjs +2 -2
- package/tests/ordinary-prompts.test.mjs +0 -1
- package/tests/preview-example.test.mjs +2 -2
- package/tests/runtime-compatibility.test.mjs +48 -21
- package/tests/subagent-spacing.test.mjs +1 -1
- package/tests/work-strip-hierarchy.test.mjs +0 -1
- package/tests/work-strip.test.mjs +13 -0
|
@@ -146,3 +146,16 @@ try {
|
|
|
146
146
|
assert.equal(JSON.stringify(manager.getBranch().filter(e=>e.type==='message')).includes('DETAILS_REMAIN_AVAILABLE'),true);
|
|
147
147
|
console.log('Work strip native grouping, settlement, scrollback, decisions, nested inspection, children, replay, fallback and disposal passed');
|
|
148
148
|
} finally {dispose();}
|
|
149
|
+
|
|
150
|
+
// A changed native container must delegate before reading its former children.
|
|
151
|
+
{
|
|
152
|
+
const proto = core.InteractiveMode.prototype, original = proto.addMessageToChat;
|
|
153
|
+
let calls = 0, reason;
|
|
154
|
+
proto.addMessageToChat = function() { calls++; return 'native result'; };
|
|
155
|
+
const fallback = registerWorkStrip(pi, mode, undefined, value => { reason = value; });
|
|
156
|
+
try {
|
|
157
|
+
assert.equal(proto.addMessageToChat.call({ chatContainer: {}, ui: {} }, { role: 'user' }), 'native result');
|
|
158
|
+
assert.equal(calls, 1);
|
|
159
|
+
assert.match(reason, /chat container changed/);
|
|
160
|
+
} finally { fallback.dispose(); proto.addMessageToChat = original; }
|
|
161
|
+
}
|