perf
This commit is contained in:
parent
cf6ca31aa4
commit
1104efaa1a
12
package.json
12
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kevisual/query",
|
"name": "@kevisual/query",
|
||||||
"version": "0.0.17",
|
"version": "0.0.18",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"module": "dist/index.js",
|
"module": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
@ -25,12 +25,12 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-node-resolve": "^16.0.1",
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
||||||
"@rollup/plugin-typescript": "^12.1.2",
|
"@rollup/plugin-typescript": "^12.1.2",
|
||||||
"rollup": "^4.36.0",
|
"rollup": "^4.40.2",
|
||||||
"rollup-plugin-dts": "^6.2.0",
|
"rollup-plugin-dts": "^6.2.1",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.8.2",
|
"typescript": "^5.8.3",
|
||||||
"zustand": "^5.0.3"
|
"zustand": "^5.0.4"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@1.22.22",
|
"packageManager": "yarn@1.22.22",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@ -59,6 +59,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"openai": "^4.88.0"
|
"openai": "^4.98.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -27,7 +27,7 @@ export const adapter = async (opts: AdapterOpts, overloadOpts?: RequestInit) =>
|
|||||||
if (opts?.url?.startsWith('http')) {
|
if (opts?.url?.startsWith('http')) {
|
||||||
url = new URL(opts.url);
|
url = new URL(opts.url);
|
||||||
} else {
|
} else {
|
||||||
origin = window?.location?.origin || 'http://localhost:11015';
|
origin = window?.location?.origin || 'http://localhost:51015';
|
||||||
url = new URL(opts.url, origin);
|
url = new URL(opts.url, origin);
|
||||||
}
|
}
|
||||||
const isGet = method === 'GET';
|
const isGet = method === 'GET';
|
||||||
|
@ -62,8 +62,8 @@ export class QueryWs {
|
|||||||
resolve(true);
|
resolve(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.error('WebSocket 连接超时');
|
console.error('WebSocket 连接超时', that.url);
|
||||||
reject('timeout');
|
resolve(false);
|
||||||
}, timeout);
|
}, timeout);
|
||||||
ws.onopen = (ev) => {
|
ws.onopen = (ev) => {
|
||||||
store.getState().setConnected(true);
|
store.getState().setConnected(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user