Skip to content

Conversation

@Smidge
Copy link
Contributor

@Smidge Smidge commented Jul 16, 2025

No description provided.

Copilot AI review requested due to automatic review settings July 16, 2025 12:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a migration from brainType to llmId in the PersonaConfig interface, maintaining backward compatibility during the transition period.

  • Replaced brainType with optional llmId in the CustomPersonaConfig interface
  • Added deprecation warnings when brainType is used in API calls
  • Updated documentation to reflect the new field and deprecation notice

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/types/PersonaConfig.ts Updates interface to use llmId instead of brainType and modifies type guard to check for both fields
src/modules/CoreApiRestClient.ts Adds deprecation warnings when brainType is detected in persona configurations
README.md Updates documentation with deprecation notice and example using new llmId field

Comment on lines +51 to +55
if (personaConfig && 'brainType' in personaConfig) {
console.warn(
'Warning: brainType is deprecated and will be removed in a future version. Please use llmId instead.',
);
}
Copy link

Copilot AI Jul 16, 2025

Choose a reason for hiding this comment

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

The deprecation warning logic is duplicated in two methods. Consider extracting this into a private method to avoid code duplication.

Suggested change
if (personaConfig && 'brainType' in personaConfig) {
console.warn(
'Warning: brainType is deprecated and will be removed in a future version. Please use llmId instead.',
);
}
this._logDeprecationWarningForBrainType(personaConfig);

Copilot uses AI. Check for mistakes.
@Smidge Smidge merged commit 7da2f15 into main Jul 16, 2025
6 checks passed
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