feat: manually mirror opencoze's code from bytedance

Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
fanlv
2025-07-20 17:36:12 +08:00
commit 890153324f
14811 changed files with 1923430 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type MessageType } from '@coze-common/chat-core';
export const MESSAGE_TYPE_VALID_IN_TEXT_LIST: Omit<MessageType[], ''> = [
'answer',
'question',
'ack',
'task_manual_trigger',
];

View File

@@ -0,0 +1,17 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const NO_MESSAGE_ID_MARK = 'NO_MESSAGE_ID';

View File

@@ -0,0 +1,35 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const MESSAGE_BOX_CONTAINER_MARGIN_X_PC = 24;
export const MESSAGE_BOX_CONTAINER_MARGIN_X_MOBILE = 10;
export const MESSAGE_BOX_AVATAR_SIZE = 32;
export const MESSAGE_BOX_AVATAR_MARGIN_RIGHT = 12;
export const MESSAGE_BOX_BORDER = 1;
export const EXPECT_CONTEXT_WIDTH_PC =
MESSAGE_BOX_CONTAINER_MARGIN_X_PC * 2 +
MESSAGE_BOX_AVATAR_SIZE +
MESSAGE_BOX_AVATAR_MARGIN_RIGHT +
MESSAGE_BOX_BORDER * 2;
export const EXPECT_CONTEXT_WIDTH_MOBILE =
MESSAGE_BOX_CONTAINER_MARGIN_X_MOBILE * 2 +
MESSAGE_BOX_AVATAR_SIZE +
MESSAGE_BOX_AVATAR_MARGIN_RIGHT +
MESSAGE_BOX_BORDER * 2;
export const MD_BOX_INNER_PADDING = 26;