chore: format all frontend files (#430)

This commit is contained in:
tecvan
2025-07-31 23:15:48 +08:00
committed by GitHub
parent 8b078ff013
commit 6995cec404
8787 changed files with 11975 additions and 10924 deletions

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const convertBytes = (bytes: number, decimals = 2) => {
if (!bytes) {
return '0 Byte';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import dayjs from 'dayjs';
export const formatMessageBoxContentTime = (contentTime: number): string => {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const defaultEnable = (value?: boolean) => {
if (typeof value === 'undefined') {
return true;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const getFileExtensionAndName = (fileName: string) => {
const dotIndex = fileName.lastIndexOf('.');
if (dotIndex < 0) {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const getImageDisplayAttribute = (
width: number,
height: number,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from './convert-bytes';
export * from './default-enable';
export * from './is-file';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Is it under the Webkit kernel browser of the Apple platform?
* Note: This judgment condition is not equal to under Apple devices, because some Apple devices (such as Mac) can run non-native Webkit engine browsers, such as Chromium (Blink)

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type IFileContent } from '@coze-common/chat-uikit-shared';
export const isFile = (

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
type IFunctionCallContent,
type IMessage,

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type IImageContent } from '@coze-common/chat-uikit-shared';
// eslint-disable-next-line @typescript-eslint/no-explicit-any

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type ISuggestionContent } from '@coze-common/chat-uikit-shared';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const isSuggestion = (value: any): value is ISuggestionContent =>

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const isText = (value: any): value is string =>
value && typeof value === 'string';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { isObject } from 'lodash-es';
import { type Reporter } from '@coze-arch/logger';

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface StoreStruct {
coze_home_mention_tip_showed: boolean;
coze_home_favorite_list_display: boolean;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ContentType, type Message } from '@coze-common/chat-core';
export const makeFakeImageMessage = ({

View File

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

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Browser from 'bowser';
let getIsMobileCache: boolean | undefined;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const enum UiKitReportEvents {
FailReadLocalStorage = 'uikit_FailReadLocalStorage',
FailWriteLocalStorage = 'uikit_FailWriteLocalStorage',

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @Deprecated very very bad, change to typeSafeJsonParse ASAP.
*/