Skip to content

feat: Adding agent support for AI Configs #893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 23, 2025

Conversation

ctawiah
Copy link
Contributor

@ctawiah ctawiah commented Jun 26, 2025

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Provide links to any issues in this repository or elsewhere relating to this pull request.

Describe the solution you've provided

Provide a clear and concise description of what you expect to happen.

Describe alternatives you've considered

Provide a clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context about the pull request here.

Copy link
Contributor

github-actions bot commented Jun 26, 2025

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 168910 bytes
Compressed size limit: 200000
Uncompressed size: 789063 bytes

Copy link
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 25024 bytes
Compressed size limit: 26000
Uncompressed size: 122509 bytes

Copy link
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 17636 bytes
Compressed size limit: 20000
Uncompressed size: 90259 bytes

Copy link
Contributor

github-actions bot commented Jun 26, 2025

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 21719 bytes
Compressed size limit: 25000
Uncompressed size: 74696 bytes

@ctawiah ctawiah changed the title Adding agent support for AI Configs feat: Adding agent support for AI Configs Jun 26, 2025
@ctawiah ctawiah marked this pull request as ready for review June 26, 2025 17:36
@ctawiah ctawiah requested a review from a team as a code owner June 26, 2025 17:36
@ctawiah ctawiah requested a review from andrewklatzke June 26, 2025 17:37
cursor[bot]

This comment was marked as outdated.

Copy link

cursor bot commented Jul 15, 2025

🚨 BugBot couldn't run

Something went wrong. Try again by commenting "bugbot run", or contact support (requestId: serverGenReqId_18dafc40-282b-4e1b-ab38-6508e582def5).

@tanderson-ld tanderson-ld self-requested a review July 22, 2025 18:05
agents<const T extends readonly LDAIAgentConfig[]>(
agentConfigs: T,
context: LDContext,
): Promise<Record<T[number]['key'], LDAIAgent>>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does agents have typing related to LDAIAgentConfig and takes configs but agent (singular) up above does not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .agents function takes a list of keys as input and returns a map using those same keys. The typing ensures that the editor's IntelliSense can provide accurate suggestions when retrieving values, its to help users access only the keys they originally passed in.


await Promise.all(
agentConfigs.map(async (config) => {
const agent = await this._evaluateAgent(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this promise encounter any errors/failures?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The _evaluateAgent function calls the underlying LaunchDarkly client, which shouldn’t produce any errors, my understanding is that our SDKs are designed not to return errors during evaluation.

@tanderson-ld
Copy link
Contributor

CI Check is failing.

@ctawiah ctawiah requested a review from tanderson-ld July 22, 2025 21:21
@ctawiah
Copy link
Contributor Author

ctawiah commented Jul 22, 2025

CI Check is failing.

Fixed

@tracisiebel tracisiebel merged commit bf95b92 into main Jul 23, 2025
27 checks passed
@tracisiebel tracisiebel deleted the ctawiah/REL-8419/add-agent-support branch July 23, 2025 16:41
@github-actions github-actions bot mentioned this pull request Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants