mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-26 10:55:27 +00:00
feat(agent): support dynamic annotationId resolution across chat and comments (#375)
* feat(agent): improve timestamp precision and proxy selection for video screenshots * feat(agent): support dynamic annotationId resolution across chat and comments * fix(agent): scope annotation resolution to asset and format has_markup consistently
This commit is contained in:
@@ -470,12 +470,12 @@ describe('DatabaseSessionStorage', () => {
|
||||
providers: mockProviders,
|
||||
})
|
||||
|
||||
// 4. Assert that the tools were instantiated using the new comment ID and user ID
|
||||
expect(createAnalyzeImageToolSpy).toHaveBeenCalledWith(user.id, 'new-comment-456')
|
||||
expect(createScreenshotToolSpy).toHaveBeenCalledWith(user.id, 'new-comment-456')
|
||||
// 4. Assert that the tools were instantiated using user ID
|
||||
expect(createAnalyzeImageToolSpy).toHaveBeenCalledWith(user.id)
|
||||
expect(createScreenshotToolSpy).toHaveBeenCalledWith(user.id)
|
||||
})
|
||||
|
||||
it('should use the current comment ID for media tools in subsequent turns (video)', async () => {
|
||||
it('should instantiate media tools with user ID in subsequent turns (video)', async () => {
|
||||
const { agent, user, team } = await setupTestData()
|
||||
|
||||
// Create a project and asset to satisfy FK constraints
|
||||
@@ -524,9 +524,9 @@ describe('DatabaseSessionStorage', () => {
|
||||
providers: mockProviders,
|
||||
})
|
||||
|
||||
// 4. Assert that the tools were instantiated using the new comment ID and user ID
|
||||
expect(createScreenshotToolSpy).toHaveBeenCalledWith(user.id, 'new-comment-456')
|
||||
expect(createAnalyzeImageToolSpy).toHaveBeenCalledWith(user.id, 'new-comment-456')
|
||||
// 4. Assert that the tools were instantiated using user ID
|
||||
expect(createScreenshotToolSpy).toHaveBeenCalledWith(user.id)
|
||||
expect(createAnalyzeImageToolSpy).toHaveBeenCalledWith(user.id)
|
||||
})
|
||||
|
||||
describe('P1 Bug Reproductions', () => {
|
||||
|
||||
Reference in New Issue
Block a user