Skip to content

fix(chat): include user name and email in AI chat instructions#1817

Merged
ehayes2000 merged 1 commit intomainfrom
push-ulppzkmovoyq
Mar 6, 2026
Merged

fix(chat): include user name and email in AI chat instructions#1817
ehayes2000 merged 1 commit intomainfrom
push-ulppzkmovoyq

Conversation

@ehayes2000
Copy link
Copy Markdown
Contributor

Summary

  • The AI chat system prompt was reading userInfo().name from getLegacyUserPermissions, which returns the stale User."name" column (null for most users)
  • Now fetches first_name/last_name via authServiceClient.getUserName() — the same API the Account settings page uses, which reads from macro_user_info
  • Also includes the user's email address in the prompt

Test plan

  • Open AI chat and send a message
  • Verify the AI knows your first/last name and email address (e.g. ask "what's my name?")
  • Verify Account settings page still displays name correctly

🤖 Generated with Claude Code

The old code read from userInfo().name which comes from the stale
User.name column (often null). Now fetches first_name/last_name via
getUserName() (same source as the Account settings page) and includes
the user's email address.
@ehayes2000 ehayes2000 requested a review from a team as a code owner March 6, 2026 17:44
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 6, 2026

@ehayes2000 ehayes2000 merged commit d4f3f77 into main Mar 6, 2026
23 checks passed
@ehayes2000 ehayes2000 deleted the push-ulppzkmovoyq branch March 6, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant