@@ -11,8 +11,8 @@ import axios, {
1111import { useCache } from '@/utils/useCache'
1212import { getLocale } from './utils'
1313import { useAssistantStore } from '@/stores/assistant'
14- import { i18n } from '@/i18n'
15- const t = i18n . global . t
14+ // import { i18n } from '@/i18n'
15+ // const t = i18n.global.t
1616const assistantStore = useAssistantStore ( )
1717const { wsCache } = useCache ( )
1818// Response data structure
@@ -65,10 +65,10 @@ class HttpService {
6565 this . setupInterceptors ( )
6666 }
6767
68- private cancelCurrentRequest ( message : string ) {
68+ /* private cancelCurrentRequest(message: string) {
6969 this.cancelTokenSource.cancel(message)
7070 this.cancelTokenSource = axios.CancelToken.source()
71- }
71+ } */
7272
7373 private setupInterceptors ( ) {
7474 // Request interceptor
@@ -112,15 +112,15 @@ class HttpService {
112112 return config
113113 }
114114
115- try {
115+ /* try {
116116 const request_key = LicenseGenerator.generate()
117117 config.headers['X-SQLBOT-KEY'] = request_key
118118 } catch (e: any) {
119119 if (e?.message?.includes('offline')) {
120120 this.cancelCurrentRequest('license-key error detected')
121121 showLicenseKeyError()
122122 }
123- }
123+ } */
124124
125125 // Request logging
126126 // console.log(`[Request] ${config.method?.toUpperCase()} ${config.url}`)
@@ -293,15 +293,15 @@ class HttpService {
293293 }
294294 }
295295
296- try {
296+ /* try {
297297 const request_key = LicenseGenerator.generate()
298298 heads['X-SQLBOT-KEY'] = request_key
299299 } catch (e: any) {
300300 if (e?.message?.includes('offline')) {
301301 controller?.abort('license-key error detected')
302302 showLicenseKeyError()
303303 }
304- }
304+ } */
305305
306306 const real_url = import . meta. env . VITE_API_BASE_URL
307307 return fetch ( real_url + url , {
@@ -422,7 +422,7 @@ class HttpService {
422422export const request = new HttpService ( {
423423 baseURL : import . meta. env . VITE_API_BASE_URL ,
424424} )
425-
425+ /*
426426const showLicenseKeyError = (msg?: string) => {
427427 ElMessageBox.confirm(t('license.error_tips'), {
428428 confirmButtonType: 'primary',
@@ -438,3 +438,4 @@ const showLicenseKeyError = (msg?: string) => {
438438 },
439439 })
440440}
441+ */
0 commit comments