chore: version up to 2.80.35 and package with experience memory
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
trimHistoryToBudget,
|
||||
truncateSystemPromptContext,
|
||||
classifyStopReason,
|
||||
shouldShowTruncationNotice,
|
||||
estimateModelParamsB,
|
||||
CONTEXT_OPEN_MARKER,
|
||||
CONTEXT_CLOSE_MARKER,
|
||||
@@ -111,3 +112,18 @@ describe('contextManager.classifyStopReason', () => {
|
||||
expect(classifyStopReason(undefined)).toBe('unknown');
|
||||
});
|
||||
});
|
||||
|
||||
describe('contextManager.shouldShowTruncationNotice', () => {
|
||||
it('suppresses output-limit notices for visibly short answers', () => {
|
||||
expect(shouldShowTruncationNotice('output-limit', 80, 4096)).toBe(false);
|
||||
});
|
||||
|
||||
it('shows output-limit notices when output consumed most of the budget', () => {
|
||||
expect(shouldShowTruncationNotice('output-limit', 3900, 4096)).toBe(true);
|
||||
});
|
||||
|
||||
it('always surfaces context overflow and error stops', () => {
|
||||
expect(shouldShowTruncationNotice('context-overflow', 10, 4096)).toBe(true);
|
||||
expect(shouldShowTruncationNotice('error', 10, 4096)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user