@rtc-agent/component 0.1.5-rc.0 → 0.1.5-rc.1
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/assets/{shared-worker-DWdeA8LH.js → shared-worker-DCHyP9C5.js} +106 -106
- package/dist/{en-US-5X8Pusw5.js → en-US-ckomj5Hk.js} +1 -1
- package/dist/{index-CDXHF2WH.js → index-B4hb17Br.js} +1 -1
- package/dist/{index-BAvGn_mA.js → index-BhUNxh1S.js} +20 -10
- package/dist/index.js +1 -1
- package/dist/index.umd.js +2 -2
- package/package.json +5 -5
|
@@ -2047,15 +2047,24 @@ class ZI {
|
|
|
2047
2047
|
* 从消息 content 中提取纯文本
|
|
2048
2048
|
*
|
|
2049
2049
|
* content 存储格式:
|
|
2050
|
-
* -
|
|
2051
|
-
* -
|
|
2050
|
+
* - 新格式(修复后):完整的 ContentData JSON,如 '{"type":"user_message","data":{"text":"..."}}'
|
|
2051
|
+
* - 旧格式(历史数据):纯文本字符串或只有 data 的对象,如 '{"text":"..."}'
|
|
2052
|
+
* - 纯文本:直接返回
|
|
2052
2053
|
*/
|
|
2053
2054
|
_extractTextFromContent(e) {
|
|
2055
|
+
var r;
|
|
2054
2056
|
if (!e) return "";
|
|
2055
2057
|
try {
|
|
2056
|
-
const
|
|
2057
|
-
if (
|
|
2058
|
-
|
|
2058
|
+
const n = JSON.parse(e);
|
|
2059
|
+
if (n && typeof n == "object") {
|
|
2060
|
+
if ("type" in n) {
|
|
2061
|
+
if (n.type === "text" || n.type === "markdown" || n.type === "thinking")
|
|
2062
|
+
return n.data ?? "";
|
|
2063
|
+
if (n.type === "user_message")
|
|
2064
|
+
return ((r = n.data) == null ? void 0 : r.text) ?? "";
|
|
2065
|
+
} else if ("text" in n && typeof n.text == "string")
|
|
2066
|
+
return n.text;
|
|
2067
|
+
}
|
|
2059
2068
|
} catch {
|
|
2060
2069
|
}
|
|
2061
2070
|
return e;
|
|
@@ -64780,7 +64789,7 @@ class _9 {
|
|
|
64780
64789
|
try {
|
|
64781
64790
|
for (; ; ) {
|
|
64782
64791
|
this.pendingCheck = !1;
|
|
64783
|
-
const e = await this.persistence.getNextRtcToProcess();
|
|
64792
|
+
const e = await this.persistence.getNextRtcToProcess(void 0);
|
|
64784
64793
|
if (!e) {
|
|
64785
64794
|
if (console.log("[RtcProcessor] processLoop: no more RTC to process, exiting"), this.pendingCheck)
|
|
64786
64795
|
continue;
|
|
@@ -64927,7 +64936,7 @@ class _9 {
|
|
|
64927
64936
|
}
|
|
64928
64937
|
function xT(t) {
|
|
64929
64938
|
return new SharedWorker(
|
|
64930
|
-
"" + new URL("assets/shared-worker-
|
|
64939
|
+
"" + new URL("assets/shared-worker-DCHyP9C5.js", import.meta.url).href,
|
|
64931
64940
|
{
|
|
64932
64941
|
name: t == null ? void 0 : t.name
|
|
64933
64942
|
}
|
|
@@ -65408,6 +65417,7 @@ const vo = class vo {
|
|
|
65408
65417
|
throw new Error("[PersistenceController] connect() called without userId; refusing to open a shared database");
|
|
65409
65418
|
const n = {
|
|
65410
65419
|
databaseName: `rtc-agent-${r}`,
|
|
65420
|
+
deviceId: e,
|
|
65411
65421
|
client: {
|
|
65412
65422
|
endpoint: To.wsEndpoint,
|
|
65413
65423
|
getToken: () => {
|
|
@@ -70860,7 +70870,7 @@ function _L() {
|
|
|
70860
70870
|
NT || (NT = !0, RC());
|
|
70861
70871
|
}
|
|
70862
70872
|
const Jt = "zh-CN", Br = ["en-US"], DT = {
|
|
70863
|
-
"en-US": async () => (await import("./en-US-
|
|
70873
|
+
"en-US": async () => (await import("./en-US-ckomj5Hk.js")).default
|
|
70864
70874
|
}, { getLocale: SL, setLocale: LC } = U9({
|
|
70865
70875
|
sourceLocale: Jt,
|
|
70866
70876
|
targetLocales: Br,
|
|
@@ -74655,7 +74665,7 @@ let ko = class extends xr {
|
|
|
74655
74665
|
this._modulesPromise || (this._modulesPromise = Promise.all([
|
|
74656
74666
|
import("./marked.esm-Dch69AxC.js"),
|
|
74657
74667
|
import("./purify.es-C-6FFqDW.js"),
|
|
74658
|
-
import("./index-
|
|
74668
|
+
import("./index-B4hb17Br.js")
|
|
74659
74669
|
]).then(([c, h, p]) => ({
|
|
74660
74670
|
marked: c.marked,
|
|
74661
74671
|
DOMPurify: h.default,
|
|
@@ -80973,7 +80983,7 @@ let ds = class extends xr {
|
|
|
80973
80983
|
return this._modulesPromise || (this._modulesPromise = Promise.all([
|
|
80974
80984
|
import("./marked.esm-Dch69AxC.js"),
|
|
80975
80985
|
import("./purify.es-C-6FFqDW.js"),
|
|
80976
|
-
import("./index-
|
|
80986
|
+
import("./index-B4hb17Br.js")
|
|
80977
80987
|
]).then(([t, e, r]) => ({
|
|
80978
80988
|
marked: t.marked,
|
|
80979
80989
|
DOMPurify: e.default,
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as s, D as t, E as n, F as o, a as r, R as i, S as d, b as l, c, d as u, e as F, f as g, h as m, i as p, j as E, l as R, o as S, p as A, v as T, w as f, k as h, m as v, z as w, n as C } from "./index-
|
|
1
|
+
import { C as s, D as t, E as n, F as o, a as r, R as i, S as d, b as l, c, d as u, e as F, f as g, h as m, i as p, j as E, l as R, o as S, p as A, v as T, w as f, k as h, m as v, z as w, n as C } from "./index-BhUNxh1S.js";
|
|
2
2
|
export {
|
|
3
3
|
s as CancelledError,
|
|
4
4
|
t as DEFAULT_SKILL_STATE,
|