feat(agent): inject user name and role into chat context

This commit is contained in:
yiling
2026-07-27 11:24:48 +08:00
parent b8345f7c46
commit cd3c7f3641
6 changed files with 151 additions and 5 deletions
@@ -164,4 +164,11 @@ describe('AgentChatPromptBuilder', () => {
expect(result).toContain('File Name: new-folder')
expect(result).toContain('Asset Path Context:\nprojects/my-proj/new-folder')
})
it('should build prompt with user info when provided and not continuation', () => {
const builder = new AgentChatPromptBuilder('a1').withUserInfo('Alice', 'owner')
const result = builder.build()
expect(result).toContain('User Info:\nName: Alice\nRole: owner')
})
})