Skip to content

feat: Add agent removal function#1147

Merged
lyj715824 merged 12 commits intoiflytek:mainfrom
lyj715824:bugfix/superteam
Apr 7, 2026
Merged

feat: Add agent removal function#1147
lyj715824 merged 12 commits intoiflytek:mainfrom
lyj715824:bugfix/superteam

Conversation

@lyj715824
Copy link
Copy Markdown
Contributor

Summary

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring

Related Issue

Changes

Testing

  • Existing tests pass
  • New tests added (if applicable)
  • Manual testing completed

Screenshots (if applicable)

Checklist

  • Code follows project coding standards
  • Self-review completed
  • Documentation updated (if needed)
  • Breaking changes documented

@lyj715824 lyj715824 merged commit 33f5794 into iflytek:main Apr 7, 2026
7 of 8 checks passed
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ yjlu12
❌ lyj715824


yjlu12 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the bot synchronization logic in MarketPublishStrategy to support shared spaces and enhances the frontend by displaying bot creation times and creators. It also refactors the agent list's take-down functionality and introduces a check to prevent users from deleting bots created by others. Feedback from the review suggests consolidating duplicated date formatting logic into a shared utility and replacing hardcoded Chinese strings with internationalized translation keys to ensure the application remains localizable.

Comment on lines +114 to +118
const formatCreateTime = useCallback((value?: string) => {
if (!value) return '';
const normalized = value.replace(' ', 'T');
return dayjs.utc(normalized).utcOffset(8).format('YYYY-MM-DD HH:mm');
}, []);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The date formatting logic (including the hardcoded UTC offset) is duplicated across multiple files: home-page/index.tsx, agent-list/index.tsx, and agent-page/index.tsx. This logic should be extracted into a shared utility function in a common directory (e.g., src/utils/date.ts) to ensure consistency, reduce code duplication, and improve maintainability.

Comment on lines +46 to +47
const creatorLabel = '\u521b\u5efa\u4eba\uff1a';
const createdAtLabel = '\u521b\u5efa\u65f6\u95f4\uff1a';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The labels for 'Creator' and 'Creation Time' are hardcoded as Chinese strings. Since the project uses react-i18next, these should be retrieved using the t function to support internationalization. Note that the t function is defined later in the component, so these constants should be moved after the useTranslation hook call or the t function should be used directly in the JSX.

Comment on lines +704 to +706
message.warning(
'\u65e0\u6cd5\u5220\u9664\u4ed6\u4eba\u521b\u5efa\u7684\u667a\u80fd\u4f53'
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The warning message is hardcoded in Chinese. Please use the t function to retrieve the localized string from the translation files, ensuring the application remains localizable.

Suggested change
message.warning(
'\u65e0\u6cd5\u5220\u9664\u4ed6\u4eba\u521b\u5efa\u7684\u667a\u80fd\u4f53'
);
message.warning(
t('agentPage.agentPage.cannotDeleteOthersAgent')
);

Comment on lines +38 to +40
message.warning(
'\u65e0\u6cd5\u5220\u9664\u4ed6\u4eba\u521b\u5efa\u7684\u667a\u80fd\u4f53'
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The warning message is hardcoded. Use the t function for internationalization consistency across the project.

Suggested change
message.warning(
'\u65e0\u6cd5\u5220\u9664\u4ed6\u4eba\u521b\u5efa\u7684\u667a\u80fd\u4f53'
);
message.warning(
t('agentPage.deleteBot.cannotDeleteOthersAgent')
);

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.

2 participants