Session-Level Conversation History Management (#1113)

This commit is contained in:
tanzhenxin
2025-12-03 18:04:48 +08:00
committed by GitHub
parent a7abd8d09f
commit 0a75d85ac9
114 changed files with 9257 additions and 4039 deletions

View File

@@ -55,9 +55,7 @@ describe('SubagentManager', () => {
} as unknown as ToolRegistry;
// Create mock Config object using test utility
mockConfig = makeFakeConfig({
sessionId: 'test-session-id',
});
mockConfig = makeFakeConfig({});
// Mock the tool registry and project root methods
vi.spyOn(mockConfig, 'getToolRegistry').mockReturnValue(mockToolRegistry);

View File

@@ -65,7 +65,6 @@ async function createMockConfig(
toolRegistryMocks = {},
): Promise<{ config: Config; toolRegistry: ToolRegistry }> {
const configParams: ConfigParameters = {
sessionId: 'test-session',
model: DEFAULT_GEMINI_MODEL,
targetDir: '.',
debugMode: false,

View File

@@ -572,6 +572,7 @@ export class SubAgentScope {
const responded = new Set<string>();
let resolveBatch: (() => void) | null = null;
const scheduler = new CoreToolScheduler({
config: this.runtimeContext,
outputUpdateHandler: undefined,
onAllToolCallsComplete: async (completedCalls) => {
for (const call of completedCalls) {
@@ -710,7 +711,6 @@ export class SubAgentScope {
}
},
getPreferredEditor: () => undefined,
config: this.runtimeContext,
onEditorClose: () => {},
});