mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-19 10:43:08 +00:00
Fix: Restore views properly, model selection for commit and pr and speed up some cli models with session resume (#801)
* Changes from fix/restoring-view * feat: Add resume query safety checks and optimize store selectors * feat: Improve session management and model normalization * refactor: Extract prompt building logic and handle file path parsing for renames
This commit is contained in:
@@ -303,6 +303,36 @@ describe('agent-service.ts', () => {
|
||||
|
||||
expect(fs.writeFile).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should include context/history preparation for Gemini requests', async () => {
|
||||
let capturedOptions: any;
|
||||
const mockProvider = {
|
||||
getName: () => 'gemini',
|
||||
executeQuery: async function* (options: any) {
|
||||
capturedOptions = options;
|
||||
yield {
|
||||
type: 'result',
|
||||
subtype: 'success',
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
vi.mocked(ProviderFactory.getProviderForModelName).mockReturnValue('gemini');
|
||||
vi.mocked(ProviderFactory.getProviderForModel).mockReturnValue(mockProvider as any);
|
||||
vi.mocked(promptBuilder.buildPromptWithImages).mockResolvedValue({
|
||||
content: 'Hello',
|
||||
hasImages: false,
|
||||
});
|
||||
|
||||
await service.sendMessage({
|
||||
sessionId: 'session-1',
|
||||
message: 'Hello',
|
||||
model: 'gemini-2.5-flash',
|
||||
});
|
||||
|
||||
expect(contextLoader.loadContextFiles).toHaveBeenCalled();
|
||||
expect(capturedOptions).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('stopExecution', () => {
|
||||
|
||||
Reference in New Issue
Block a user