chore: format all frontend files (#430)
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 = (
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import {
|
||||
type IFunctionCallContent,
|
||||
type IMessage,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 =>
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 = ({
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user