chore: migrate fe 250722

This commit is contained in:
tecvan
2025-07-22 13:35:49 +08:00
parent b46a0c6c12
commit 60d42100f0
330 changed files with 9761 additions and 19074 deletions

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { api, type InferEditorAPIFromPlugins } from '@coze-editor/editor/react';
import preset from '@coze-editor/editor/preset-code';
import { type EditorView } from '@codemirror/view';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import { Renderer, EditorProvider } from '@coze-editor/editor/react';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useEffect } from 'react';
import { Renderer, EditorProvider } from '@coze-editor/editor/react';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useEffect, useRef } from 'react';
import { type EditorAPI } from '../editor/preset';

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 type {

View File

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

View File

@@ -126,7 +126,7 @@ export const useWorkflowResourceMenuActions = (
{
hide:
!enablePublishEntry || // 上架入口加白
// 社区版暂不支持该功能
// 开源版暂不支持该功能
(!FLAGS['bot.community.store_imageflow'] && isImageFlow) || // Imageflow 不支持商店
!isSelfCreator ||
bizExtend?.plugin_id === '0',

View File

@@ -56,7 +56,7 @@ const flowModeOptions = [
value: WorkflowMode.ChatFlow,
},
].filter(item => {
// 社区版本暂不支持对话流
// 开源版本暂不支持对话流
if (item.value === WorkflowMode.ChatFlow && IS_OPEN_SOURCE) {
return false;
}

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { CommentEditorBlock } from '../../type';
import { getCozeCom, getCozeCn } from './util';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { getCozeCom, getCozeCn } from './util';
export const commentEditorMockHTML = `<h1><u><strong>Workflow Comment</strong></u></h1><p><strong>[Format]</strong></p><p><strong>Bold</strong> <em>Italic</em> <u>Underline</u> <del>Strikethrough</del> <del><u><em><strong>Mixed</strong></em></u></del></p><p><strong>[Quote]</strong></p><blockquote><p>This line should be displayed as a quote.</p></blockquote><blockquote><p>Line 2: content.</p></blockquote><blockquote><p>Line 3: content.</p></blockquote><p><strong>[Bullet List]</strong></p><ul><li>item order 1</li><li>item order 2</li><li>item order 3</li></ul><p><strong>[Numbered List]</strong></p><ol><li>item order 1</li><li>item order 2</li><li>item order 3</li></ol><p><strong>[Hyper Link]</strong></p><p>Coze 👉🏻 <a href="${getCozeCom()}">coze.com</a></p><p>Coze for CN 👉🏻 <a href="${getCozeCn()}">coze.cn</a></p><p><strong>[Heading]</strong></p><h1>Heading 1</h1><h2>Heading 2</h2><h3>Heading 3</h3><h3><u><em><strong>Heading Formatted</strong></em></u></h3>`;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { commentEditorMockMarkdown } from './markdown';
export { commentEditorMockText } from './text';
export { commentEditorMockBlocks } from './blocks';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { commentEditorMockBlocks } from './blocks';
export const commentEditorMockJSON = JSON.stringify(commentEditorMockBlocks);

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { getCozeCom, getCozeCn } from './util';
export const commentEditorMockMarkdown = `# __**Workflow Comment**__

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const commentEditorMockText = `Workflow Comment
[Format]
Bold Italic Underline Strikethrough Mixed

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const getCozeCom = () => ['https://', 'coze.com'].join('');
export const getCozeCn = () => ['https://', 'coze.cn'].join('');

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

@@ -89,7 +89,7 @@ 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

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { get } from 'lodash-es';
import {
ValidateTrigger,

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}

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { inject, injectable } from 'inversify';
import { type FormModelV2 } from '@flowgram-adapter/free-layout-editor';
import { FlowNodeFormData } from '@flowgram-adapter/free-layout-editor';
@@ -22,8 +22,8 @@ import { WorkflowDocument } from '@flowgram-adapter/free-layout-editor';
import { WorkflowNodeData } from '@coze-workflow/nodes';
import { workflowApi, StandardNodeType, BlockInput } from '@coze-workflow/base';
import { I18n } from '@coze-arch/i18n';
import { Modal } from '@coze-arch/coze-design';
import { type GetApiDetailRequest } from '@coze-arch/bot-api/workflow_api';
import { Modal } from '@coze-arch/coze-design';
import { WorkflowPlaygroundContext } from '@/workflow-playground-context';
import { isNodeV2 } from '@/nodes-v2';