This commit is contained in:
熊潇 2025-05-15 22:21:52 +08:00
parent cf6ca31aa4
commit 1104efaa1a
3 changed files with 9 additions and 9 deletions

View File

@ -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"
} }
} }

View File

@ -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';

View File

@ -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);