docs(frontend): use new doc styles (#11)

* docs: use new doc styles

* docs: remove comment

* docs: remove comment

* docs: remove comment

---------

Co-authored-by: tecvan <tecvan.fe@gmail.com>
This commit is contained in:
tecvan
2025-07-26 12:36:38 +08:00
committed by GitHub
parent d045dea008
commit 9ca1ae506f
49 changed files with 58 additions and 836 deletions

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import path from 'path';
import { defineConfig } from '@coze-arch/rsbuild-config';
@@ -103,8 +103,6 @@ const mergedConfig = defineConfig({
/\/node_modules\/(marked|@dagrejs|@tanstack)\//,
],
alias: {
// TODO: fixme late开源之前需要干掉这个
'@slardar/web/client': '@slardar/web/cn',
'@coze-arch/foundation-sdk': require.resolve(
'@coze-foundation/foundation-sdk',
),

View File

@@ -42,6 +42,7 @@ module.exports = [
'**/es/**',
'**/lib/**',
'**/.codebase/**',
'**/.github/**',
'**/.changeset/**',
'**/config/**',
'**/common/scripts/**',

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @coze-arch/max-line-per-function */
import { NavLink, useParams } from 'react-router-dom';
import ReactMarkdown from 'react-markdown';
@@ -47,8 +47,8 @@ import {
type ConnectResultInfo,
} from '@coze-agent-ide/space-bot';
import styles from '../index.module.less';
import { PublishResultArea } from './component/publish-result-area';
import styles from '../index.module.less';
interface PublishResultProps {
// 隐藏Banner
@@ -190,7 +190,6 @@ export const PublishResult = ({
type: IntelligenceType.Bot,
spaceId: String(spaceId),
intelligenceId: String(botId),
// 开源版暂不支持该功能
enable: FLAGS['bot.studio.publish_management'] && !IS_OPEN_SOURCE,
});

View File

@@ -119,7 +119,7 @@ const ToolHeader: FC<ToolHeaderProps> = ({
/>
<span className={s.title}>{I18n.t('plugin_edit_tool_title')}</span>
<OauthButtonAction />
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{FLAGS['bot.devops.plugin_mockset'] ? (
<Tooltip
style={{ display: mocksetDisabled ? 'block' : 'none' }}

View File

@@ -13,12 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createContext, useContext } from 'react';
export enum BotCreatorScene {
Bot = 'bot',
/** 开源版暂不支持该功能 */
DouyinBot = 'douyin-bot',
}

View File

@@ -144,7 +144,7 @@ export const MoreMenuButton: FC = () => {
spaceId,
enable:
showPublishManageMenu &&
// 开源版暂不支持该功能
// 即将支持,敬请期待
FLAGS['bot.studio.publish_management'] &&
!IS_OPEN_SOURCE,
});
@@ -172,7 +172,7 @@ export const MoreMenuButton: FC = () => {
<Dropdown
render={
<Dropdown.Menu mode="menu">
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{showPublishManageMenu &&
FLAGS['bot.studio.publish_management'] &&
!IS_OPEN_SOURCE
@@ -196,7 +196,7 @@ export const MoreMenuButton: FC = () => {
: null}
{hideOpenIn ? null : (
<>
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{showPublishManageMenu &&
FLAGS['bot.studio.publish_management'] &&
!IS_OPEN_SOURCE ? (

View File

@@ -154,7 +154,6 @@ export function ModelOption({
{model.name}
</Typography.Title>
<div className="shrink-0 flex gap-[6px]">
{/* 抖音分身场景下不展示改 tag开源版暂不支持该功能 */}
{model.model_status_details?.is_free_model &&
scene !== BotCreatorScene.DouyinBot ? (
<Tag size="mini" color="primary" className="!coz-mg-plus">

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { uniq } from 'lodash-es';
import { useRequest } from 'ahooks';
import { useMultiAgentStore } from '@coze-studio/bot-detail-store/multi-agent';
@@ -60,7 +60,6 @@ export const useGetModelList = () => {
const res = await SpaceApi.GetTypeList({
cur_model_ids: expectedIdList,
model: true,
// 开源版暂不支持该功能
...(scene === BotCreatorScene.DouyinBot && {
model_scene: ModelScene.Douyin,
}),

View File

@@ -70,7 +70,7 @@ const useAgentSkillPluginSettingModalController = (
},
{
refreshDeps: [commonParams],
// 开源版暂不支持该功能
// 即将支持,敬请期待
ready: visible && FLAGS['bot.devops.plugin_mockset'],
},
);

View File

@@ -73,7 +73,7 @@ const usePartMainController = (pluginInfo: PluginInfoForPlayground) => {
value: PARA.toLowerCase(),
},
];
// 开源版暂不支持该功能
// 即将支持,敬请期待
if (FLAGS['bot.devops.plugin_mockset']) {
keyOptions.unshift({
label: I18n.t('bot_ide_plugin_setting_modal_mockset_tab'),

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useShallow } from 'zustand/react/shallow';
import cls from 'classnames';
import { useBotInfoStore } from '@coze-studio/bot-detail-store/bot-info';
@@ -99,7 +99,7 @@ const AgentIdePrompt = (props: AgentIdePromptProps) => {
librarys={libraryList}
onAddLibrary={addLibrary}
spaceId={space_id}
// Agent IDE 在抖音分身场景下需要传入分身id进行判断当前资源是否存在 开源版暂不支持该功能
// Agent IDE 在抖音分身场景下需要传入分身id进行判断当前资源是否存在
avatarBotId={
businessType === BusinessType.DouyinAvatar ? botId : undefined
}

View File

@@ -39,7 +39,7 @@ export function ChangeButton({
}: ChangeButtonProps) {
const [FLAGS] = useFlags();
// 开源版暂不支持该功能
// 即将支持,敬请期待
const showText = modeInfo?.showText || FLAGS['bot.studio.prompt_diff'];
const ToolTipFragment = tooltip ? Tooltip : React.Fragment;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, {
useEffect,
useMemo,
@@ -133,7 +133,6 @@ export const OnboardingMessage = forwardRef<
initValues={onboardingContent}
isReadonly={isReadonly}
isGenerating={isLoading}
// 开源版暂不支持该功能
plainText={scene === BotCreatorScene.DouyinBot}
onChange={submitEditor}
onBlur={() => {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type SetStateAction } from 'react';
import { type PluginPricingRule } from '@coze-arch/bot-api/plugin_develop';
@@ -98,6 +98,6 @@ export interface PublisherBotInfo {
hasPublished?: boolean;
// 收费插件列表
pluginPricingRules?: Array<PluginPricingRule>;
// 业务类型 DouyinAvatar=1 抖音分身 开源版暂不支持该功能
// 业务类型 DouyinAvatar=1 抖音分身
businessType?: BusinessType;
}

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import eventEmitter from 'eventemitter3';
vi.stubGlobal('IS_OVERSEA', false);
@@ -54,9 +54,6 @@ export const testSetup = () => {
}),
})),
}));
vi.mock('@slardar/web/client', () => ({
createMinimalBrowserClient: vi.fn(),
}));
// mock上传插件实现
vi.mock('../src/plugins/upload-plugin', () => ({
ChatCoreUploadPlugin: class {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { devtools } from 'zustand/middleware';
import { create } from 'zustand';
import {
@@ -28,7 +28,6 @@ interface ICommonConfig {
homeBannerTask?: Array<HomeBannerDisplay>;
quickStart?: Array<QuickStartConfig>;
oceanProjectSpaces?: Array<string>;
/** 开源版暂不支持该功能 */
douyinAvatarSpaces?: Array<string>;
}
export interface ICommonConfigStoreState {

View File

@@ -134,7 +134,7 @@ export const DynamicChatList = ({
!!canEdit &&
!!list?.length &&
!inBatch &&
// 开源版暂不支持该功能
// 即将支持,敬请期待
FLAGS['bot.automation.conversation_batch_delete'];
const exitBatch = () => {
setInBatch(false);

View File

@@ -99,7 +99,7 @@ export const GlobalHandler = ({
useWsListener((props: WsMessageProps) => {
if (
// 开源版暂不支持该功能
// 即将支持,敬请期待
!FLAGS['bot.automation.project_multi_tab'] ||
!leftPanelResourceType.includes(props.bizType)
) {

View File

@@ -65,7 +65,7 @@ const PrimarySidebarCore = ({
>
<div className={styles.title}>
{I18n.t('project_resource_sidebar_title')}
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{FLAGS['bot.automation.dependency_tree'] ? (
<>
<Button

View File

@@ -77,12 +77,12 @@ export const ModelOptionItem: React.FC<OptionItemProps> = ({
const tags: OptionItemTag[] = [];
const shouldShowEndPoint = showEndPointName && endPointName;
// 开源版暂不支持该功能
// 即将支持,敬请期待
const displayName = FLAGS['bot.studio.model_select_switch_end_point_name_pos']
? endPointName || name
: name;
// 开源版暂不支持该功能
// 即将支持,敬请期待
const displayEndPointName = FLAGS[
'bot.studio.model_select_switch_end_point_name_pos'
]

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable max-lines */
/* eslint-disable max-lines-per-function */
@@ -37,15 +37,6 @@ import { useCurrentEnterpriseInfo } from '@coze-foundation/enterprise-store-adap
import { PictureUpload } from '@coze-common/biz-components/picture-upload';
import { logger } from '@coze-arch/logger';
import { I18n } from '@coze-arch/i18n';
import { safeJSONParse } from '@coze-arch/bot-utils';
import { useFlags } from '@coze-arch/bot-flags';
import {
type PrivateLink,
type commonParamSchema,
} from '@coze-arch/bot-api/plugin_develop';
import { FileBizType, IconType } from '@coze-arch/bot-api/developer_api';
import { DeveloperApi, PluginDevelopApi } from '@coze-arch/bot-api';
import { InfoPopover } from '@coze-agent-ide/bot-plugin-tools/infoPopover';
import { IconCozPlus, IconCozTrashCan } from '@coze-arch/coze-design/icons';
import {
Cascader,
@@ -60,6 +51,15 @@ import {
Typography,
withField,
} from '@coze-arch/coze-design';
import { safeJSONParse } from '@coze-arch/bot-utils';
import { useFlags } from '@coze-arch/bot-flags';
import {
type PrivateLink,
type commonParamSchema,
} from '@coze-arch/bot-api/plugin_develop';
import { FileBizType, IconType } from '@coze-arch/bot-api/developer_api';
import { DeveloperApi, PluginDevelopApi } from '@coze-arch/bot-api';
import { InfoPopover } from '@coze-agent-ide/bot-plugin-tools/infoPopover';
import {
findAuthTypeItemV2,
@@ -142,7 +142,6 @@ export const PluginForm: FC<{
{
ready:
compareLevel === UserLevel.Enterprise &&
// 开源版暂不支持该功能
FLAGS['bot.studio.plugin_vpc'] &&
!IS_OPEN_SOURCE,
},
@@ -225,7 +224,6 @@ export const PluginForm: FC<{
if (
editInfo?.meta_info?.private_link_id &&
compareLevel === UserLevel.Enterprise &&
// 开源版暂不支持该功能
FLAGS['bot.studio.plugin_vpc']
) {
setDisableEditUrl(true);
@@ -292,7 +290,6 @@ export const PluginForm: FC<{
return (
<>
{compareLevel === UserLevel.Enterprise &&
// 开源版暂不支持该功能
FLAGS['bot.studio.plugin_vpc'] ? (
<FormSelect
label={{

View File

@@ -443,7 +443,7 @@ export const useGetToolColumns = (props: UseGetToolColumnsProps) => {
visible={record.api_id === showDropdownItem?.api_id}
render={
<Dropdown.Menu className="px-[4px]">
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{FLAGS2['bot.devops.plugin_import_export'] ? (
<Dropdown.Item
disabled={
@@ -459,7 +459,7 @@ export const useGetToolColumns = (props: UseGetToolColumnsProps) => {
{I18n.t('code_snippet')}
</Dropdown.Item>
) : null}
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{FLAGS2['bot.devops.plugin_mockset'] ? (
<Dropdown.Item
className="rounded-[4px]"

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { IntelligenceType } from '@coze-arch/idl/intelligence_api';
import { I18n } from '@coze-arch/i18n';
import { Tag } from '@coze-arch/coze-design';
@@ -38,7 +38,6 @@ export const IntelligenceTag: React.FC<IntelligenceTagProps> = ({
</Tag>
);
}
// 开源版暂不支持该功能
if (intelligenceType === IntelligenceType.DouyinAvatarBot) {
return (
<Tag color="red" size="small" className="w-fit">

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
type IntelligenceData,
type SearchScope,
@@ -29,7 +29,7 @@ export enum DevelopCustomTypeStatus {
All = 0,
Project = 1,
Agent = 2,
DouyinAvatarBot = 3, // single agent 类型的抖音分身 开源版暂不支持该功能
DouyinAvatarBot = 3, // single agent 类型的抖音分身
}
export interface DraftIntelligenceList {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useNavigate, useParams } from 'react-router-dom';
import qs from 'qs';
@@ -39,7 +39,6 @@ export const KnowledgeUploadPage = () => {
UnitType.TEXT_DOC) as UnitType;
const opt = (locationSearchParams.get('opt') || OptType.ADD) as OptType;
const docID = locationSearchParams.get('doc_id') || '';
// 开源版暂不支持该功能
const isDouyinBot =
locationSearchParams.get('is_douyin') === 'true' ? true : false;
const { dataset_id, space_id } = useParams();

View File

@@ -75,7 +75,7 @@ export const usePromptConfig: UseEntityConfigHook = ({
usePromptConfiguratorModal({
spaceId,
source: 'resource_library',
// 开源版暂不支持该功能
// 即将支持,敬请期待
enableDiff: FLAGS['bot.studio.prompt_diff'],
onUpdateSuccess: reloadList,
onDiff: ({ libraryId }) => {

View File

@@ -91,7 +91,7 @@ export const PublishButton = ({
intelligenceId: projectId,
spaceId,
enable: !!(
// 开源版暂不支持该功能
// 即将支持,敬请期待
(
FLAGS['bot.studio.publish_management'] &&
hasPublished &&
@@ -186,7 +186,7 @@ export const PublishButton = ({
<Divider />
</div>
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{FLAGS['bot.studio.publish_management'] && !IS_OPEN_SOURCE ? (
<div>
<div className="coz-fg-secondary font-[500] px-[8px] pt-[4px] pb-0 mb-[2px]">

View File

@@ -86,7 +86,7 @@ export const TemplateConfigForm = forwardRef<
// eslint-disable-next-line @coze-arch/max-line-per-function
>(({ record, userInfo }, ref) => {
const [FLAGS] = useFlags();
// 开源版暂不支持该功能
// 即将支持,敬请期待
const customRequest = FLAGS['bot.studio.project_publish_imagex']
? uploadCustomRequestImageX
: uploadCustomRequest;

View File

@@ -44,7 +44,7 @@ export const PublishRecord: FC<{
type: IntelligenceType.Project,
spaceId,
intelligenceId: projectId,
// 开源版暂不支持该功能
// 即将支持,敬请期待
enable: FLAGS['bot.studio.publish_management'] && !IS_OPEN_SOURCE,
});
@@ -58,7 +58,7 @@ export const PublishRecord: FC<{
<div className="text-[12px] coz-fg-dim leading-[16px]">
{I18n.t('project_release_already_released_desc')}
</div>
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{FLAGS['bot.studio.publish_management'] && !IS_OPEN_SOURCE ? (
<div className="text-[12px] coz-fg-dim leading-[16px]">
{I18n.t('release_management_detail1', {

View File

@@ -89,7 +89,7 @@ export const useCreateWorkflowModal = ({
};
const workflowModalInitState = useMemo(() => {
// 开源版暂不支持该功能
// 即将支持,敬请期待
if (isWorkflowMode || FLAGS['bot.community.store_imageflow']) {
return {
productCategory: 'all',

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { ReactNode } from 'react';
import {
@@ -126,7 +126,6 @@ export const useWorkflowResourceMenuActions = (
{
hide:
!enablePublishEntry || // 上架入口加白
// 开源版暂不支持该功能
(!FLAGS['bot.community.store_imageflow'] && isImageFlow) || // Imageflow 不支持商店
!isSelfCreator ||
bizExtend?.plugin_id === '0',

View File

@@ -65,7 +65,7 @@ const getFileChildren = () => {
// 1. 是否开启了auto start节点支持音色字段能力
// 2. 是否开启了语音资源功能
// 开源版暂不支持该功能
// 即将支持,敬请期待
if (
FLAGS['bot.automation.start_support_voice'] &&
FLAGS['bot.studio.library_voice_resource']

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ReactNode } from 'react';
import { VARIABLE_TYPE_ALIAS_MAP, ViewVariableType } from '@coze-workflow/base';
@@ -89,7 +89,6 @@ const getFileChildren = (
generateVariableOption({ type: ViewVariableType.Video, parentPath }),
// 1. 是否开启了auto start节点支持音色字段能力
// 2. 是否开启了语音资源功能
// 开源版暂不支持该功能
FLAGS['bot.automation.start_support_voice'] &&
FLAGS['bot.studio.library_voice_resource']
? generateVariableOption({ type: ViewVariableType.Voice })

View File

@@ -62,7 +62,7 @@ export const Inputs = withFieldArray(
tooltip={I18n.t('ltm_240826_01')}
testId={getNodeSetterId(fieldName)}
actions={[
// 开源版暂不支持该功能
// 即将支持,敬请期待
isChatflow && FLAGS['bot.automation.ltm_enhance'] ? (
<HistorySwitchField name="inputs.historySetting.enableChatHistory" />
) : null,

View File

@@ -118,7 +118,7 @@ export const FormRender = withNodeConfigForm(() => {
hasFeedback={false}
/>
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{isChatflow && FLAGS['bot.automation.message_auto_write'] ? (
<Section title={I18n.t('basic_setting')} tooltip="">
<SwitchField

View File

@@ -91,7 +91,7 @@ export const EditorWithPromptKit: FC<EditorWithPromptKitProps> = props => {
const promptValue = useRef<string>(value || '');
const [FLAGS] = useFlags();
// 开源版暂不支持该功能
// 即将支持,敬请期待
const isHitLLMPromptSkills = FLAGS['bot.automation.llm_prompt_skills'];
const { open, node: PromptLibrary } = usePromptLibraryModal({
@@ -158,7 +158,7 @@ export const EditorWithPromptKit: FC<EditorWithPromptKitProps> = props => {
<InputSlotWidget mode="input" />
<LibraryBlockWidget
{
// 开源版暂不支持该功能
// 即将支持,敬请期待
...(isHitLLMPromptSkills
? {
librarys: libraries,
@@ -179,7 +179,7 @@ export const EditorWithPromptKit: FC<EditorWithPromptKitProps> = props => {
/>
<HighlightExpressionOnActive />
{/* 开源版暂不支持该功能 */}
{/* 即将支持,敬请期待 */}
{isHitLLMPromptSkills ? (
<ContentSearchPopover
variableTree={variableTree}