mirror of
https://github.com/cline/cline.git
synced 2026-09-19 02:05:44 +08:00
Report disabled CLI compaction as not compacted
This commit is contained in:
@@ -387,8 +387,7 @@ describe("createInteractiveSessionRuntime", () => {
|
||||
expect(result).toEqual({
|
||||
messagesBefore: messages.length,
|
||||
messagesAfter: messages.length,
|
||||
workingContextMessagesAfter: compactionState.messages.length,
|
||||
compacted: true,
|
||||
compacted: false,
|
||||
});
|
||||
expect(manager.updateSessionCompactionState).not.toHaveBeenCalled();
|
||||
expect(runtime.getActiveSessionId()).toBe(sessionId);
|
||||
|
||||
@@ -644,7 +644,14 @@ export function createInteractiveSessionRuntime(input: {
|
||||
const updated = await compactionSidecar.update(() =>
|
||||
manager.updateSessionCompactionState(sourceSessionId, compactionState),
|
||||
);
|
||||
if (!updated.updated && !updated.disabled) {
|
||||
if (updated.disabled) {
|
||||
return {
|
||||
messagesBefore,
|
||||
messagesAfter: messagesBefore,
|
||||
compacted: false,
|
||||
};
|
||||
}
|
||||
if (!updated.updated) {
|
||||
throw new Error("Compaction could not be saved. Try again.");
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user