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:
Yiling-J
2026-09-02 15:17:56 +08:00
committed by GitHub
parent 5a754bcb94
commit 35b57cc0ab
19 changed files with 869 additions and 133 deletions
@@ -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', () => {