🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
🔥 refactor(stt): remove deprecated `/webapi/stt` route and frontend mic entry (#15999)
Arvin Xuacbf969cdcd3
diff --git a/src/app/(backend)/webapi/stt/openai/route.ts b/src/app/(backend)/webapi/stt/openai/route.tsdeleted file mode 100644index a481bd4f265..00000000000--- a/src/app/(backend)/webapi/stt/openai/route.ts+++ /dev/null@@ -1,30 +0,0 @@-import { type OpenAISTTPayload } from '@lobehub/tts';-import { createOpenaiAudioTranscriptions } from '@lobehub/tts/server';--import { createBizOpenAI } from '@/app/(backend)/_deprecated/createBizOpenAI';--export const POST = async (req: Request) => {- const formData = await req.formData();- const speechBlob = formData.get('speech') as Blob;- const optionsString = formData.get('options') as string;- const payload = {- options: JSON.parse(optionsString),- speech: speechBlob,- } as OpenAISTTPayload;-- const openaiOrErrResponse = createBizOpenAI(req);-- // if resOrOpenAI is a Response, it means there is an error,just return it- if (openaiOrErrResponse instanceof Response) return openaiOrErrResponse;-- const res = await createOpenaiAudioTranscriptions({- openai: openaiOrErrResponse as any,- payload,- });-- return new Response(JSON.stringify(res), {- headers: {- 'content-type': 'application/json;charset=UTF-8',- },- });-};diff --git a/src/features/AgentSetting/AgentTTS/index.tsx b/src/features/AgentSetting/AgentTTS/index.tsxindex 7b1582e7d69..e3a58538cd1 100644--- a/src/features/AgentSetting/AgentTTS/index.tsx+++ b/src/features/AgentSetting/AgentTTS/index.tsx@@ -18,7 +18,7 @@ import { ttsOptions } from './options';import SelectWithTTSPreview from './SelectWithTTSPreview';const TTS_SETTING_KEY = 'tts';-const { openaiVoiceOptions, localeOptions } = VoiceList;+const { openaiVoiceOptions } = VoiceList;const AgentTTS = memo(() => {const { t } = useTranslation('setting');@@ -76,19 +76,6 @@ const AgentTTS = memo(() => {label: t('settingTTS.voice.title'),name: [TTS_SETTING_KEY, 'voice', 'microsoft'],},- {- children: (- <Select- options={[- { label: t('settingCommon.lang.autoMode'), value: 'auto' },- ...(localeOptions || []),- ]}- />- ),- desc: t('settingTTS.sttLocale.desc'),- label: t('settingTTS.sttLocale.title'),- name: [TTS_SETTING_KEY, 'sttLocale'],- },],icon: Mic,title: t('settingTTS.title'),diff --git a/src/features/ChatInput/ActionBar/STT/browser.tsx b/src/features/ChatInput/ActionBar/STT/browser.tsxdeleted file mode 100644index d920a0d52e6..00000000000--- a/src/features/ChatInput/ActionBar/STT/browser.tsx+++ /dev/null@@ -1,126 +0,0 @@-import { getMessageError } from '@lobechat/fetch-sse';-import { type ChatMessageError } from '@lobechat/types';-import { type SpeechRecognitionOptions } from '@lobehub/tts/react';-import { useSpeechRecognition } from '@lobehub/tts/react';-import isEqual from 'fast-deep-equal';-import { memo, useCallback, useState } from 'react';-import { useTranslation } from 'react-i18next';-import { type SWRConfiguration } from 'swr';--import { useAgentStore } from '@/store/agent';-import { agentByIdSelectors } from '@/store/agent/selectors';-import { useChatStore } from '@/store/chat';-import { operationSelectors } from '@/store/chat/selectors';-import { useGlobalStore } from '@/store/global';-import { globalGeneralSelectors } from '@/store/global/selectors';-import { useUserStore } from '@/store/user';-import { settingsSelectors } from '@/store/user/selectors';--import { useAgentId } from '../../hooks/useAgentId';-import CommonSTT from './common';--interface STTConfig extends SWRConfiguration {- onTextChange: (value: string) => void;-}--const useBrowserSTT = (config: STTConfig) => {- const ttsSettings = useUserStore(settingsSelectors.currentTTS, isEqual);- const agentId = useAgentId();- const ttsAgentSettings = useAgentStore(- (s) => agentByIdSelectors.getAgentTTSById(agentId)(s),- isEqual,- );- const locale = useGlobalStore(globalGeneralSelectors.currentLanguage);-- const autoStop = ttsSettings.sttAutoStop;- const sttLocale =- ttsAgentSettings?.sttLocale && ttsAgentSettings.sttLocale !== 'auto'- ? ttsAgentSettings.sttLocale- : locale;-- return useSpeechRecognition(sttLocale, {- ...config,- autoStop,- } as SpeechRecognitionOptions);-};--const BrowserSTT = memo<{ mobile?: boolean }>(({ mobile }) => {- const [error, setError] = useState<ChatMessageError>();- const { t } = useTranslation('chat');-- const [loading, updateMessageInput] = useChatStore((s) => [- operationSelectors.isAgentRuntimeRunning(s),- s.updateMessageInput,- ]);-- const setDefaultError = useCallback(- (err?: any) => {- setError({ body: err, message: t('stt.responseError', { ns: 'error' }), type: 500 });- },- [t],- );-- const { start, isLoading, stop, formattedTime, time, response, isRecording } = useBrowserSTT({- onError: (err) => {- stop();- setDefaultError(err);- },- onErrorRetry: (err) => {- stop();- setDefaultError(err);- },- onSuccess: async () => {- if (!response) return;- if (response.status === 200) return;- const message = await getMessageError(response);- if (message) {- setError(message);- } else {- setDefaultError();- }- stop();- },- onTextChange: (text) => {- if (loading) stop();- if (text) updateMessageInput(text);- },- });-- const desc = t('stt.action');-- const handleTriggerStartStop = useCallback(() => {- if (loading) return;- if (!isLoading) {- start();- } else {- stop();- }- }, [loading, isLoading, start, stop]);-- const handleCloseError = useCallback(() => {- setError(undefined);- stop();- }, [stop]);-- const handleRetry = useCallback(() => {- setError(undefined);- start();- }, [start]);-- return (- <CommonSTT- desc={desc}- error={error}- formattedTime={formattedTime}- handleCloseError={handleCloseError}- handleRetry={handleRetry}- handleTriggerStartStop={handleTriggerStartStop}- isLoading={isLoading}- isRecording={isRecording}- mobile={mobile}- time={time}- />- );-});--export default BrowserSTT;diff --git a/src/features/ChatInput/ActionBar/STT/common.tsx b/src/features/ChatInput/ActionBar/STT/common.tsxdeleted file mode 100644index 4ab1a7d5715..00000000000--- a/src/features/ChatInput/ActionBar/STT/common.tsx+++ /dev/null@@ -1,118 +0,0 @@-import { type ChatMessageError } from '@lobechat/types';-import { Alert, Button, Flexbox, Highlighter } from '@lobehub/ui';-import { createStaticStyles, cssVar } from 'antd-style';-import { Mic, MicOff } from 'lucide-react';-import { memo, useState } from 'react';-import { useTranslation } from 'react-i18next';--import Action from '../components/Action';--const styles = createStaticStyles(({ css }) => ({- recording: css`- width: 8px;- height: 8px;- border-radius: 50%;- background: ${cssVar.colorError};- `,-}));--const CommonSTT = memo<{- desc: string;- error?: ChatMessageError;- formattedTime: string;- handleCloseError: () => void;- handleRetry: () => void;- handleTriggerStartStop: () => void;- isLoading: boolean;- isRecording: boolean;- mobile?: boolean;- time: number;-}>(- ({- mobile,- isLoading,- formattedTime,- time,- isRecording,- error,- handleRetry,- handleTriggerStartStop,- handleCloseError,- desc,- }) => {- const { t } = useTranslation('chat');- const [dropdownOpen, setDropdownOpen] = useState(false);-- const handleDropdownVisibleChange = (open: boolean) => {- setDropdownOpen(open);- };-- return (- <Action- active={isRecording}- icon={isLoading ? MicOff : Mic}- title={dropdownOpen ? undefined : desc}- variant={mobile ? 'outlined' : 'borderless'}- dropdown={{- menu: {- // @ts-expect-error waiting for antd to fix this- activeKey: 'time',- items: [- {- key: 'title',- label: (- <Flexbox>- <div style={{ fontWeight: 'bolder' }}>{t('stt.action')}</div>- </Flexbox>- ),- },- {- key: 'time',- label: (- <Flexbox horizontal align={'center'} gap={8}>- <div className={styles.recording} />- {time > 0 ? formattedTime : t(isRecording ? 'stt.loading' : 'stt.prettifying')}- </Flexbox>- ),- },- ],- },- onOpenChange: handleDropdownVisibleChange,- open: dropdownOpen || !!error || isRecording || isLoading,- placement: mobile ? 'topRight' : 'top',- popupRender: error- ? () => (- <Alert- closable- style={{ alignItems: 'center' }}- title={error.message}- type="error"- action={- <Button size={'small'} type={'primary'} onClick={handleRetry}>- {t('retry', { ns: 'common' })}- </Button>- }- extra={- error.body && (- <Highlighter- actionIconSize={'small'}- language={'json'}- variant={'borderless'}- >- {JSON.stringify(error.body, null, 2)}- </Highlighter>- )- }- onClose={handleCloseError}- />- )- : undefined,- trigger: 'click',- }}- onClick={handleTriggerStartStop}- />- );- },-);--export default CommonSTT;diff --git a/src/features/ChatInput/ActionBar/STT/index.tsx b/src/features/ChatInput/ActionBar/STT/index.tsxdeleted file mode 100644index 122ae8e03f0..00000000000--- a/src/features/ChatInput/ActionBar/STT/index.tsx+++ /dev/null@@ -1,33 +0,0 @@-import isEqual from 'fast-deep-equal';-import { memo } from 'react';--import {- featureFlagsSelectors,- serverConfigSelectors,- useServerConfigStore,-} from '@/store/serverConfig';-import { useUserStore } from '@/store/user';-import { settingsSelectors } from '@/store/user/selectors';--import BrowserSTT from './browser';-import OpenaiSTT from './openai';--const STT = memo<{ mobile?: boolean }>(({ mobile }) => {- const { sttServer } = useUserStore(settingsSelectors.currentTTS, isEqual);- const { enableSTT } = useServerConfigStore(featureFlagsSelectors);- const enableBusinessFeatures = useServerConfigStore(serverConfigSelectors.enableBusinessFeatures);-- if (!enableSTT) return;-- if (enableBusinessFeatures) {- return <BrowserSTT mobile={mobile} />;- }- switch (sttServer) {- case 'openai': {- return <OpenaiSTT mobile={mobile} />;- }- }- return <BrowserSTT mobile={mobile} />;-});--export default STT;diff --git a/src/features/ChatInput/ActionBar/STT/openai.tsx b/src/features/ChatInput/ActionBar/STT/openai.tsxdeleted file mode 100644index 046daba1c2e..00000000000--- a/src/features/ChatInput/ActionBar/STT/openai.tsx+++ /dev/null@@ -1,137 +0,0 @@-import { getMessageError } from '@lobechat/fetch-sse';-import { type ChatMessageError } from '@lobechat/types';-import { getRecordMineType } from '@lobehub/tts';-import { type OpenAISTTOptions } from '@lobehub/tts/react';-import { useOpenAISTT } from '@lobehub/tts/react';-import isEqual from 'fast-deep-equal';-import { memo, useCallback, useState } from 'react';-import { useTranslation } from 'react-i18next';-import { type SWRConfiguration } from 'swr';--import { createHeaderWithOpenAI } from '@/services/_header';-import { API_ENDPOINTS } from '@/services/_url';-import { useAgentStore } from '@/store/agent';-import { agentByIdSelectors } from '@/store/agent/selectors';-import { useChatStore } from '@/store/chat';-import { operationSelectors } from '@/store/chat/selectors';-import { useGlobalStore } from '@/store/global';-import { globalGeneralSelectors } from '@/store/global/selectors';-import { useUserStore } from '@/store/user';-import { settingsSelectors } from '@/store/user/selectors';--import { useAgentId } from '../../hooks/useAgentId';-import CommonSTT from './common';--interface STTConfig extends SWRConfiguration {- onTextChange: (value: string) => void;-}--const useOpenaiSTT = (config: STTConfig) => {- const ttsSettings = useUserStore(settingsSelectors.currentTTS, isEqual);- const agentId = useAgentId();- const ttsAgentSettings = useAgentStore(- (s) => agentByIdSelectors.getAgentTTSById(agentId)(s),- isEqual,- );- const locale = useGlobalStore(globalGeneralSelectors.currentLanguage);-- const autoStop = ttsSettings.sttAutoStop;- const sttLocale =- ttsAgentSettings?.sttLocale && ttsAgentSettings.sttLocale !== 'auto'- ? ttsAgentSettings.sttLocale- : locale;-- return useOpenAISTT(sttLocale, {- ...config,- api: {- headers: createHeaderWithOpenAI(),- serviceUrl: API_ENDPOINTS.stt,- },- autoStop,- options: {- mineType: getRecordMineType(),- model: ttsSettings.openAI.sttModel,- },- } as OpenAISTTOptions);-};--const OpenaiSTT = memo<{ mobile?: boolean }>(({ mobile }) => {- const [error, setError] = useState<ChatMessageError>();- const { t } = useTranslation('chat');-- const [loading, updateMessageInput] = useChatStore((s) => [- operationSelectors.isAgentRuntimeRunning(s),- s.updateMessageInput,- ]);-- const setDefaultError = useCallback(- (err?: any) => {- setError({ body: err, message: t('stt.responseError', { ns: 'error' }), type: 500 });- },- [t],- );-- const { start, isLoading, stop, formattedTime, time, response, isRecording } = useOpenaiSTT({- onError: (err) => {- stop();- setDefaultError(err);- },- onErrorRetry: (err) => {- stop();- setDefaultError(err);- },- onSuccess: async () => {- if (!response) return;- if (response.status === 200) return;- const message = await getMessageError(response);- if (message) {- setError(message);- } else {- setDefaultError();- }- stop();- },- onTextChange: (text) => {- if (loading) stop();- if (text) updateMessageInput(text);- },- });-- const desc = t('stt.action');-- const handleTriggerStartStop = useCallback(() => {- if (loading) return;- if (!isLoading) {- start();- } else {- stop();- }- }, [loading, isLoading, start, stop]);-- const handleCloseError = useCallback(() => {- setError(undefined);- stop();- }, [stop]);-- const handleRetry = useCallback(() => {- setError(undefined);- start();- }, [start]);-- return (- <CommonSTT- desc={desc}- error={error}- formattedTime={formattedTime}- handleCloseError={handleCloseError}- handleRetry={handleRetry}- handleTriggerStartStop={handleTriggerStartStop}- isLoading={isLoading}- isRecording={isRecording}- mobile={mobile}- time={time}- />- );-});--export default OpenaiSTT;diff --git a/src/features/ChatInput/ActionBar/config.ts b/src/features/ChatInput/ActionBar/config.tsindex 1da3c41d836..b5b082dcd06 100644--- a/src/features/ChatInput/ActionBar/config.ts+++ b/src/features/ChatInput/ActionBar/config.ts@@ -10,7 +10,6 @@ import Plus from './Plus';import PromptTransform from './PromptTransform';import SaveTopic from './SaveTopic';import Search from './Search';-import STT from './STT';import ContextWindow from './Token';import Tools from './Tools';import Typo from './Typo';@@ -31,7 +30,6 @@ export const actionMap = {promptTransform: PromptTransform,saveTopic: SaveTopic,search: Search,- stt: STT,temperature: Params,tools: Tools,typo: Typo,diff --git a/src/features/FloatingChatPanel/ChatBody.tsx b/src/features/FloatingChatPanel/ChatBody.tsxindex 9f8ac085145..91904f6eabd 100644--- a/src/features/FloatingChatPanel/ChatBody.tsx+++ b/src/features/FloatingChatPanel/ChatBody.tsx@@ -26,7 +26,7 @@ const ChatBody = memo(() => {><ChatList /></Flexbox>- <ChatInput leftActions={['typo', 'stt']} rightActions={['contextWindow']} />+ <ChatInput leftActions={['typo']} rightActions={['contextWindow']} /></Flexbox>);});diff --git a/src/features/Portal/Thread/Chat/index.tsx b/src/features/Portal/Thread/Chat/index.tsxindex 669933d7a3e..f85b536fc2f 100644--- a/src/features/Portal/Thread/Chat/index.tsx+++ b/src/features/Portal/Thread/Chat/index.tsx@@ -101,9 +101,7 @@ const ThreadChatContent = memo<ThreadChatContentProps>(({ isSubagentThread }) =><ChatList itemContent={itemContent} /></Flexbox></Suspense>- {!isSubagentThread && (- <ChatInput leftActions={['typo', 'stt']} rightActions={['contextWindow']} />- )}+ {!isSubagentThread && <ChatInput leftActions={['typo']} rightActions={['contextWindow']} />}</>);});diff --git a/src/routes/(main)/group/features/Conversation/MainChatInput/GroupChat.tsx b/src/routes/(main)/group/features/Conversation/MainChatInput/GroupChat.tsxindex 376a7e61dbd..a0ea5a38887 100644--- a/src/routes/(main)/group/features/Conversation/MainChatInput/GroupChat.tsx+++ b/src/routes/(main)/group/features/Conversation/MainChatInput/GroupChat.tsx@@ -21,7 +21,7 @@ import { useSendMenuItems } from './useSendMenuItems';const leftActions: ActionKeys[] = ['typo', 'fileUpload', '---', ['tools', 'params', 'clear']];-const dmLeftActions: ActionKeys[] = ['typo', 'fileUpload', '---', ['stt']];+const dmLeftActions: ActionKeys[] = ['typo', 'fileUpload'];const rightActions: ActionKeys[] = ['contextWindow'];diff --git a/src/routes/(main)/settings/service-model/index.tsx b/src/routes/(main)/settings/service-model/index.tsxindex 13a394ddf3a..2ecbacb848a 100644--- a/src/routes/(main)/settings/service-model/index.tsx+++ b/src/routes/(main)/settings/service-model/index.tsx@@ -8,7 +8,6 @@ import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfiimport Image from '../image/features/Image';import OpenAI from '../tts/features/OpenAI';-import STT from '../tts/features/STT';const Page = () => {const { t } = useTranslation('setting');@@ -17,12 +16,7 @@ const Page = () => {<><SettingHeader title={t('tab.serviceModel')} /><ModelAssignmentsForm />- {enableSTT && (- <>- <STT />- <OpenAI />- </>- )}+ {enableSTT && <OpenAI />}{showAiImage && <Image />}</>);diff --git a/src/routes/(main)/settings/tts/features/OpenAI.tsx b/src/routes/(main)/settings/tts/features/OpenAI.tsxindex db3c5d82b26..c48ba8a362b 100644--- a/src/routes/(main)/settings/tts/features/OpenAI.tsx+++ b/src/routes/(main)/settings/tts/features/OpenAI.tsx@@ -13,7 +13,7 @@ import { usePermission } from '@/hooks/usePermission';import { useUserStore } from '@/store/user';import { settingsSelectors } from '@/store/user/selectors';-import { opeanaiSTTOptions, opeanaiTTSOptions } from './const';+import { opeanaiTTSOptions } from './const';const OpenAI = memo(() => {const { t } = useTranslation('setting');@@ -40,19 +40,6 @@ const OpenAI = memo(() => {label: t('settingTTS.openai.ttsModel'),name: ['openAI', 'ttsModel'],},- {- children: (- <Tooltip title={reason}>- <Select- disabled={!canManageServiceModel}- options={opeanaiSTTOptions}- style={{ width: 448 }}- />- </Tooltip>- ),- label: t('settingTTS.openai.sttModel'),- name: ['openAI', 'sttModel'],- },],extra: loading && <Icon spin icon={Loader2Icon} size={16} style={{ opacity: 0.5 }} />,title: t('settingTTS.openai.title'),diff --git a/src/routes/(main)/settings/tts/features/STT.tsx b/src/routes/(main)/settings/tts/features/STT.tsxdeleted file mode 100644index b3306de9eba..00000000000--- a/src/routes/(main)/settings/tts/features/STT.tsx+++ /dev/null@@ -1,81 +0,0 @@-'use client';--import { type FormGroupItemType } from '@lobehub/ui';-import { Form, Icon, Skeleton, Tooltip } from '@lobehub/ui';-import { Select } from '@lobehub/ui/base-ui';-import { Switch } from 'antd';-import isEqual from 'fast-deep-equal';-import { Loader2Icon } from 'lucide-react';-import { memo, useState } from 'react';-import { useTranslation } from 'react-i18next';--import { FORM_STYLE } from '@/const/layoutTokens';-import { usePermission } from '@/hooks/usePermission';-import { useUserStore } from '@/store/user';-import { settingsSelectors } from '@/store/user/selectors';--import { sttOptions } from './const';--const STT = memo(() => {- const { t } = useTranslation('setting');- const { allowed: canManageServiceModel, reason } = usePermission('manage_settings');- const [form] = Form.useForm();- const { tts } = useUserStore(settingsSelectors.currentSettings, isEqual);- const [setSettings, isUserStateInit] = useUserStore((s) => [s.setSettings, s.isUserStateInit]);- const [loading, setLoading] = useState(false);-- if (!isUserStateInit) return <Skeleton active paragraph={{ rows: 5 }} title={false} />;-- const stt: FormGroupItemType = {- children: [- {- children: (- <Tooltip title={reason}>- <Select disabled={!canManageServiceModel} options={sttOptions} style={{ width: 448 }} />- </Tooltip>- ),- desc: t('settingTTS.sttService.desc'),- label: t('settingTTS.sttService.title'),- name: 'sttServer',- },- {- children: (- <Tooltip title={reason}>- <Switch disabled={!canManageServiceModel} />- </Tooltip>- ),- desc: t('settingTTS.sttAutoStop.desc'),- label: t('settingTTS.sttAutoStop.title'),- layout: 'horizontal',- name: 'sttAutoStop',- valuePropName: 'checked',- },- ],- extra: loading && <Icon spin icon={Loader2Icon} size={16} style={{ opacity: 0.5 }} />,- title: t('settingTTS.stt'),- };-- return (- <Form- collapsible={false}- form={form}- initialValues={tts}- items={[stt]}- itemsType={'group'}- variant={'filled'}- onValuesChange={async (values) => {- if (!canManageServiceModel) return;-- setLoading(true);- await setSettings({- tts: values,- });- setLoading(false);- }}- {...FORM_STYLE}- itemMinWidth={undefined}- />- );-});--export default STT;diff --git a/src/routes/(main)/settings/tts/features/const.tsx b/src/routes/(main)/settings/tts/features/const.tsxindex f6f930d0357..aec10038b09 100644--- a/src/routes/(main)/settings/tts/features/const.tsx+++ b/src/routes/(main)/settings/tts/features/const.tsx@@ -17,21 +17,3 @@ export const opeanaiTTSOptions: SelectProps['options'] = [value: 'tts-1-hd',},];--export const opeanaiSTTOptions: SelectProps['options'] = [- {- label: <LabelRenderer Icon={OpenAI.Avatar} label={'whisper-1'} />,- value: 'whisper-1',- },-];--export const sttOptions: SelectProps['options'] = [- {- label: 'OpenAI',- value: 'openai',- },- {- label: 'Browser',- value: 'browser',- },-];diff --git a/src/routes/(main)/settings/tts/index.tsx b/src/routes/(main)/settings/tts/index.tsxindex 810e8bd3ac8..252ed1e7bdf 100644--- a/src/routes/(main)/settings/tts/index.tsx+++ b/src/routes/(main)/settings/tts/index.tsx@@ -3,14 +3,12 @@ import { useTranslation } from 'react-i18next';import SettingHeader from '@/routes/(main)/settings/features/SettingHeader';import OpenAI from './features/OpenAI';-import STT from './features/STT';const Page = () => {const { t } = useTranslation('setting');return (<><SettingHeader title={t('tab.tts')} />- <STT /><OpenAI /></>);diff --git a/src/services/__tests__/_url.test.ts b/src/services/__tests__/_url.test.tsindex 24ae71fc515..dad2721dd56 100644--- a/src/services/__tests__/_url.test.ts+++ b/src/services/__tests__/_url.test.ts@@ -6,7 +6,6 @@ describe('API_ENDPOINTS', () => {it('should return correct basePath URLs', () => {expect(API_ENDPOINTS.oauth).toBe('/api/auth');expect(API_ENDPOINTS.trace).toBe('/webapi/trace');- expect(API_ENDPOINTS.stt).toBe('/webapi/stt/openai');expect(API_ENDPOINTS.edge).toBe('/webapi/tts/edge');expect(API_ENDPOINTS.microsoft).toBe('/webapi/tts/microsoft');});diff --git a/src/services/_url.ts b/src/services/_url.tsindex 1f049feb1b2..575c032f4b9 100644--- a/src/services/_url.ts+++ b/src/services/_url.ts@@ -11,9 +11,6 @@ export const API_ENDPOINTS = {models: (provider: string) => `/webapi/models/${provider}`,modelPull: (provider: string) => `/webapi/models/${provider}/pull`,- // STT- stt: '/webapi/stt/openai',-// TTStts: (provider: string) => `/webapi/tts/${provider}`,edge: '/webapi/tts/edge',