@helixlife-ai/xiantao 0.1.35 → 0.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/constants.js +1 -1
- package/dist/lib/http.js +1 -1
- package/package.json +1 -1
package/dist/lib/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const o="opencode",A=".config/helixlife/config.json",t=".config/helixlife/update-check.json",c=".config/helixlife/config.json",e="https://agent.helixlife.
|
|
1
|
+
const o="opencode",A=".config/helixlife/config.json",t=".config/helixlife/update-check.json",c=".config/helixlife/config.json",e="https://agent.helixlife.cn"?.trim(),_=process.env.XTZ_BUILD_XIANTAO_LOGIN_URL?.trim(),n=(e||"https://agent.helixlife.cn").replace(/\/+$/,""),T=_||"https://agent.helixlife.cn/",I="c0b6febb-52dd-4525-970a-61bbe9e263ff",U="2d491694-8c8d-11ee-9409-00163e118c99";export{o as DEFAULT_AGENT,n as DEFAULT_XIANTAO_BASE_URL,T as DEFAULT_XIANTAO_LOGIN_URL,I as DEFAULT_XIANTAO_TOOL_PRODUCT_UUID,c as XIANTAO_CONFIG_PATH,U as XIANTAO_HISTORY_UUID,A as XTZ_CONFIG_PATH,t as XTZ_UPDATE_CHECK_PATH};
|
package/dist/lib/http.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{XtzError as
|
|
1
|
+
import{XtzError as s,raiseApiError as c}from"./errors.js";import{debugHttpError as p,debugHttpRequest as u,debugHttpResponse as m}from"./debug.js";async function y(r,t={},o={}){let e;u(r,t);try{e=await fetch(r,t)}catch(i){throw p(r,i),new s("\u7F51\u7EDC\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002")}const a=await e.text();m(r,e,a);const n=f(e,a);return o.allowErrorPayload?.(n,e)||e.ok||await c(n,o),n}function f(r,t){try{return JSON.parse(t)}catch{const o=[`HTTP ${r.status}`,r.headers.get("content-type")?.trim()].filter(Boolean).join(", "),e=l(t);throw new s(e?`\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\uFF08${o}\uFF09\uFF1A${e}`:`\u670D\u52A1\u8FD4\u56DE\u4E86\u65E0\u6CD5\u89E3\u6790\u7684\u54CD\u5E94\uFF08${o}\uFF09\u3002`)}}function l(r){const t=r.trim().replace(/\s+/g," ");return t?t.length>160?`${t.slice(0,160)}...`:t:""}export{y as requestJson};
|